Commit a3a4a3e9 authored by Simon Marlow's avatar Simon Marlow
Browse files

ignore ".exe" in program output, for Windows

parent 928183f9
...@@ -896,7 +896,7 @@ def check_stdout_ok( name ): ...@@ -896,7 +896,7 @@ def check_stdout_ok( name ):
expected_stdout_file = '' expected_stdout_file = ''
if os.path.exists(actual_stdout_file): if os.path.exists(actual_stdout_file):
actual_stdout = open(actual_stdout_file).read() actual_stdout = normalise_output(open(actual_stdout_file).read())
else: else:
actual_stdout = '' actual_stdout = ''
actual_stdout_file = '' actual_stdout_file = ''
...@@ -917,7 +917,7 @@ def check_stderr_ok( name ): ...@@ -917,7 +917,7 @@ def check_stderr_ok( name ):
expected_stderr_file = '' expected_stderr_file = ''
if os.path.exists(actual_stderr_file): if os.path.exists(actual_stderr_file):
actual_stderr = open(actual_stderr_file).read() actual_stderr = normalise_output(open(actual_stderr_file).read())
else: else:
actual_stderr = '' actual_stderr = ''
actual_stderr_file = '' actual_stderr_file = ''
...@@ -974,6 +974,12 @@ def normalise_errmsg( str ): ...@@ -974,6 +974,12 @@ def normalise_errmsg( str ):
str = re.sub('([^\\s]+)\\.exe', '\\1', str) str = re.sub('([^\\s]+)\\.exe', '\\1', str)
return str return str
def normalise_output( str ):
# Remove a .exe extension (for Windows)
# This can occur in error messages generated by the program.
str = re.sub('([^\\s]+)\\.exe', '\\1', str)
return str
def if_verbose( n, str ): def if_verbose( n, str ):
if config.verbose >= n: if config.verbose >= n:
print str print str
......
C:\TEMP\fptools-head\fptools\ghc\tests\concurrent\should_run\conc021.bin: main thread exited (uncaught exception)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment