|
@@ -21,9 +21,17 @@ def generate(test):
|
|
|
else:
|
|
else:
|
|
|
lines.append(line)
|
|
lines.append(line)
|
|
|
|
|
|
|
|
|
|
+ # Create test file
|
|
|
with open('test.c', 'w') as file:
|
|
with open('test.c', 'w') as file:
|
|
|
file.write(template.format(tests='\n'.join(lines)))
|
|
file.write(template.format(tests='\n'.join(lines)))
|
|
|
|
|
|
|
|
|
|
+ # Remove build artifacts to force rebuild
|
|
|
|
|
+ try:
|
|
|
|
|
+ os.remove('test.o')
|
|
|
|
|
+ os.remove('lfs')
|
|
|
|
|
+ except OSError:
|
|
|
|
|
+ pass
|
|
|
|
|
+
|
|
|
def compile():
|
|
def compile():
|
|
|
os.environ['CFLAGS'] = os.environ.get('CFLAGS', '') + ' -Werror'
|
|
os.environ['CFLAGS'] = os.environ.get('CFLAGS', '') + ' -Werror'
|
|
|
subprocess.check_call(['make', '--no-print-directory', '-s'], env=os.environ)
|
|
subprocess.check_call(['make', '--no-print-directory', '-s'], env=os.environ)
|