run-tests saved generated C to *.gen.c
This commit is contained in:
parent
cb8402018f
commit
3aca59f4f3
@ -14,10 +14,15 @@ def main(argv):
|
|||||||
exe = 'tests/' + test_name
|
exe = 'tests/' + test_name
|
||||||
if os.path.exists(exe):
|
if os.path.exists(exe):
|
||||||
os.unlink(exe)
|
os.unlink(exe)
|
||||||
rc = Popen(['./jtlc', '-o', exe, test_source]).wait()
|
rc = Popen(['./jtlc', '-E', '-o', exe + '.gen.c', test_source]).wait()
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
sys.stdout.write('Failed to compile test %s\n' % test_name)
|
sys.stdout.write('Failed to compile test %s\n' % test_name)
|
||||||
passed = False
|
passed = False
|
||||||
|
if passed:
|
||||||
|
rc = Popen(['./jtlc', '-o', exe, test_source]).wait()
|
||||||
|
if rc != 0:
|
||||||
|
sys.stdout.write('Failed to compile test %s\n' % test_name)
|
||||||
|
passed = False
|
||||||
if os.path.exists(exe):
|
if os.path.exists(exe):
|
||||||
output = Popen([exe], stdout=PIPE).communicate()[0]
|
output = Popen([exe], stdout=PIPE).communicate()[0]
|
||||||
if os.path.exists(exe + '.out'):
|
if os.path.exists(exe + '.out'):
|
||||||
|
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
test???
|
test???
|
||||||
|
*.gen.*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user