From 3aca59f4f3bb286f150056ab01ccbbee57b1e7cc Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 31 Aug 2011 11:08:00 -0400 Subject: [PATCH] run-tests saved generated C to *.gen.c --- run-tests | 7 ++++++- tests/.gitignore | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/run-tests b/run-tests index 6a9fb31..5d685ac 100755 --- a/run-tests +++ b/run-tests @@ -14,10 +14,15 @@ def main(argv): exe = 'tests/' + test_name if os.path.exists(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: sys.stdout.write('Failed to compile test %s\n' % test_name) 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): output = Popen([exe], stdout=PIPE).communicate()[0] if os.path.exists(exe + '.out'): diff --git a/tests/.gitignore b/tests/.gitignore index d26c090..ae93a28 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1 +1,2 @@ test??? +*.gen.*