diff options
Diffstat (limited to 'python')
-rwxr-xr-x | python/setup.py | 7 | ||||
-rw-r--r-- | python/tox.ini | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/python/setup.py b/python/setup.py index 9a7eaddf..05c16fc3 100755 --- a/python/setup.py +++ b/python/setup.py @@ -144,6 +144,11 @@ class build_py(_build_py): # _build_py is an old-style class, so super() doesn't work. _build_py.run(self) +class test_conformance(_build_py): + target = 'test_python' + def run(self): + os.system('cd ../conformance && make %s' % (test_conformance.target)) + if __name__ == '__main__': ext_module_list = [] @@ -152,6 +157,7 @@ if __name__ == '__main__': if cpp_impl in sys.argv: sys.argv.remove(cpp_impl) extra_compile_args = ['-Wno-write-strings', '-Wno-invalid-offsetof'] + test_conformance.target = 'test_python_cpp' if "clang" in os.popen('$CC --version').read(): extra_compile_args.append('-Wno-shorten-64-to-32') @@ -207,6 +213,7 @@ if __name__ == '__main__': cmdclass={ 'clean': clean, 'build_py': build_py, + 'test_conformance': test_conformance, }, install_requires=install_requires, ext_modules=ext_module_list, diff --git a/python/tox.ini b/python/tox.ini index a05460b5..683d82dc 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -15,6 +15,8 @@ commands = cpp: python setup.py -q build --cpp_implementation --warnings_as_errors python: python setup.py -q test -q cpp: python setup.py -q test -q --cpp_implementation + python: python setup.py -q test_conformance + cpp: python setup.py -q test_conformance --cpp_implementation deps = # Keep this list of dependencies in sync with setup.py. six |