diff --git a/bin/run_test.py b/bin/run_test.py index 94db6512..af361a65 100755 --- a/bin/run_test.py +++ b/bin/run_test.py @@ -22,7 +22,7 @@ def single_run(test_project): print('%s built successfully. %i wheels built.' % (test_project, len(wheels))) # check some wheels were actually built - assert len(wheels) >= 3 + subprocess.check_call([sys.executable, os.path.join(test_project, 'check.py')]) # clean up shutil.rmtree('wheelhouse') diff --git a/bin/run_tests.py b/bin/run_tests.py index bcae61c5..b39999f6 100755 --- a/bin/run_tests.py +++ b/bin/run_tests.py @@ -14,7 +14,7 @@ if __name__ == '__main__': ### run the integration tests - test_projects = glob('test/??_*') + test_projects = sorted(glob('test/??_*')) if len(test_projects) == 0: print('No test projects found. Aborting.', file=sys.stderr) diff --git a/test/01_basic/check.py b/test/01_basic/check.py new file mode 100644 index 00000000..bec98563 --- /dev/null +++ b/test/01_basic/check.py @@ -0,0 +1,9 @@ +import glob +import subprocess +import sys + +build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') +expected_identifiers = build_identifiers +built_wheels = glob.glob('wheelhouse/*.whl') + +assert len(built_wheels) == len(expected_identifiers) diff --git a/test/02_test/check.py b/test/02_test/check.py new file mode 100644 index 00000000..bec98563 --- /dev/null +++ b/test/02_test/check.py @@ -0,0 +1,9 @@ +import glob +import subprocess +import sys + +build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') +expected_identifiers = build_identifiers +built_wheels = glob.glob('wheelhouse/*.whl') + +assert len(built_wheels) == len(expected_identifiers) diff --git a/test/03_before_build/check.py b/test/03_before_build/check.py new file mode 100644 index 00000000..bec98563 --- /dev/null +++ b/test/03_before_build/check.py @@ -0,0 +1,9 @@ +import glob +import subprocess +import sys + +build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') +expected_identifiers = build_identifiers +built_wheels = glob.glob('wheelhouse/*.whl') + +assert len(built_wheels) == len(expected_identifiers) diff --git a/test/04_build_skip/check.py b/test/04_build_skip/check.py new file mode 100644 index 00000000..6f199b0e --- /dev/null +++ b/test/04_build_skip/check.py @@ -0,0 +1,9 @@ +import glob +import subprocess +import sys + +build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') +expected_identifiers = [identifier for identifier in build_identifiers if "cp3" in identifier and "cp34" not in identifier] +built_wheels = glob.glob('wheelhouse/*.whl') + +assert len(built_wheels) == len(expected_identifiers) diff --git a/test/05_environment/check.py b/test/05_environment/check.py new file mode 100644 index 00000000..bec98563 --- /dev/null +++ b/test/05_environment/check.py @@ -0,0 +1,9 @@ +import glob +import subprocess +import sys + +build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') +expected_identifiers = build_identifiers +built_wheels = glob.glob('wheelhouse/*.whl') + +assert len(built_wheels) == len(expected_identifiers) diff --git a/test/06_docker_images/check.py b/test/06_docker_images/check.py new file mode 100644 index 00000000..bec98563 --- /dev/null +++ b/test/06_docker_images/check.py @@ -0,0 +1,9 @@ +import glob +import subprocess +import sys + +build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') +expected_identifiers = build_identifiers +built_wheels = glob.glob('wheelhouse/*.whl') + +assert len(built_wheels) == len(expected_identifiers) diff --git a/test/07_ssl/check.py b/test/07_ssl/check.py new file mode 100644 index 00000000..bec98563 --- /dev/null +++ b/test/07_ssl/check.py @@ -0,0 +1,9 @@ +import glob +import subprocess +import sys + +build_identifiers = subprocess.check_output([sys.executable, '-m', 'cibuildwheel', '--print-build-identifiers'], universal_newlines=True).strip().split('\n') +expected_identifiers = build_identifiers +built_wheels = glob.glob('wheelhouse/*.whl') + +assert len(built_wheels) == len(expected_identifiers)