2019-04-23 22:17:59 +01:00
|
|
|
#!/usr/bin/env python
|
2017-07-24 22:38:48 +01:00
|
|
|
|
|
|
|
|
from __future__ import print_function
|
2019-04-22 18:22:43 +01:00
|
|
|
import os, sys, subprocess, shutil
|
2017-07-24 22:38:48 +01:00
|
|
|
|
2019-04-22 23:13:34 +01:00
|
|
|
|
2017-09-06 15:07:58 +02:00
|
|
|
def single_run(test_project):
|
2019-04-22 18:22:43 +01:00
|
|
|
# run the test
|
|
|
|
|
subprocess.check_call(
|
2019-04-23 22:17:25 +01:00
|
|
|
[sys.executable, '-m', 'pytest', '-vv', os.path.join(test_project, 'cibuildwheel_test.py')],
|
2019-04-22 18:22:43 +01:00
|
|
|
)
|
2017-07-24 22:38:48 +01:00
|
|
|
|
|
|
|
|
|
2017-09-06 15:07:58 +02:00
|
|
|
if __name__ == '__main__':
|
|
|
|
|
import argparse
|
2017-07-24 22:38:48 +01:00
|
|
|
|
2017-09-06 15:07:58 +02:00
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
|
parser.add_argument("test_project_dir")
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
project_path = os.path.abspath(args.test_project_dir)
|
2019-11-20 22:20:53 +01:00
|
|
|
|
2017-09-06 15:07:58 +02:00
|
|
|
if not os.path.exists(project_path):
|
|
|
|
|
print('No test project not found.', file=sys.stderr)
|
|
|
|
|
exit(2)
|
|
|
|
|
|
|
|
|
|
single_run(project_path)
|