Files
cibuildwheel/bin/run_test.py
T
Joe Rickerby 21fb27faf7 Rework custom test machinery to give the individual tests more control
on how they're run, and combine environment.json and check.py
2019-04-22 18:22:43 +01:00

29 lines
697 B
Python
Executable File

#!/usr/bin/python
from __future__ import print_function
import os, sys, subprocess, shutil
def single_run(test_project):
# run the test
subprocess.check_call(
[sys.executable, '-m', 'pytest', '-v', os.path.join(test_project, 'cibuildwheel_test.py')]
)
# clean up
shutil.rmtree('wheelhouse')
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("test_project_dir")
args = parser.parse_args()
project_path = os.path.abspath(args.test_project_dir)
if not os.path.exists(project_path):
print('No test project not found.', file=sys.stderr)
exit(2)
single_run(project_path)