Skip to content

Commit

Permalink
change run-windows-tests.py to be slightly simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
droundy committed Jun 26, 2016
1 parent 1233aed commit d1f2510
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions run-windows-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,13 @@ def create_clean_tree(preppy='this file does not exist'):
print("prep command failed:", cmd)
exit(1)

def compile_cl(exe, ccode):
return 'cl -Wall -O2 -Fe%s %s' % (exe, ccode)
def compile_mingw(exe, ccode):
def compiler(exe, ccode):
return 'x86_64-w64-mingw32-gcc -Wall -O2 -o %s %s' % (exe, ccode)

for compiler in [compile_cl, compile_mingw]:
if os.system(compiler('tests/null-test.exe', 'tests/null.c')):
print('NOT using',compiler('code.exe', 'code.c'))
else:
cc = compiler
print('using',compiler('code.exe', 'code.c'))
if platform != 'linux':
runcode = lambda test,base: 'bigbro.exe %s 2> %s.err 1> %s.out' % (test, base, base)
else:
runcode = lambda test,base: 'wine64-development bigbro.exe %s 2> %s.err 1> %s.out' % (test, base, base)
break
if platform != 'linux':
runcode = lambda test,base: 'bigbro.exe %s 2> %s.err 1> %s.out' % (test, base, base)
else:
runcode = lambda test,base: 'wine64-development bigbro.exe %s 2> %s.err 1> %s.out' % (test, base, base)

print('running C tests:')
print('================')
Expand Down

0 comments on commit d1f2510

Please sign in to comment.