Debian Codegraph @

testrunner/lib_python_tests.py

raw symbols SCIP
1 #!/usr/bin/env python
2 from __future__ import print_function
3 """
4 This is what the buildbot runs to execute the lib-python tests
5 on top of pypy-c.
6 """
7
8 import json
9 import sys, os
10 import subprocess
11
12 rootdir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
13 os.environ['PYTHONPATH'] = rootdir
14 os.environ['PYTEST_PLUGINS'] = ''
15
16 config_json = subprocess.check_output([sys.executable, 'testrunner/get_info.py'])
17 config_dict = json.loads(config_json)
18 pypyopt = "--pypy=%s" % config_dict['target_path']
19
20 popen = subprocess.Popen(
21 [sys.executable, "pypy/test_all.py",
22 pypyopt,
23 "--timeout=1324", # make it easy to search for
24 "-rs",
25 "--duration=10",
26 "--resultlog=cpython.log", "lib-python",
27 ] + sys.argv[1:],
28 cwd=rootdir)
29
30 try:
31 ret = popen.wait()
32 except KeyboardInterrupt:
33 popen.kill()
34 print("\ninterrupted")
35 ret = 1
36
37 sys.exit(ret)