Skip to content

Commit d1b8bec

Browse files
committed
Modify run_tests.py to test cpython alone
1 parent edbe3c2 commit d1b8bec

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

integration_tests/run_tests.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
"test_math1.py"
1919
]
2020

21+
# At present we run these tests on cpython, later we should also move to lpython
22+
test_cpython = [
23+
"test_generics_01.py"
24+
]
25+
26+
2127
def main():
2228
print("Compiling...")
2329
for pyfile in tests:
@@ -30,7 +36,9 @@ def main():
3036
if r != 0:
3137
print("Command '%s' failed." % cmd)
3238
sys.exit(1)
39+
3340
print("Running...")
41+
python_path="src/runtime/ltypes"
3442
for pyfile in tests:
3543
basename = os.path.splitext(pyfile)[0]
3644
cmd = "integration_tests/%s" % (basename)
@@ -39,7 +47,16 @@ def main():
3947
if r != 0:
4048
print("Command '%s' failed." % cmd)
4149
sys.exit(1)
42-
python_path="src/runtime/ltypes"
50+
cmd = "PYTHONPATH=%s python integration_tests/%s" % (python_path,
51+
pyfile)
52+
print("+ " + cmd)
53+
r = os.system(cmd)
54+
if r != 0:
55+
print("Command '%s' failed." % cmd)
56+
sys.exit(1)
57+
58+
print("Running cpython tests...")
59+
for pyfile in test_cpython:
4360
cmd = "PYTHONPATH=%s python integration_tests/%s" % (python_path,
4461
pyfile)
4562
print("+ " + cmd)

0 commit comments

Comments
 (0)