Commit fa52a8c9 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Allow the "< /dev/null" when running tests to be disabled

The user001 test in the unix package can fail when stdin comes from a
file.
parent edf235a1
......@@ -145,6 +145,9 @@ class TestOptions:
# don't compare output
self.ignore_output = 0
# don't give anything as stdin
self.no_stdin = 0
# compile this test to .hc only
self.compile_to_hc = 0
......
......@@ -93,6 +93,9 @@ def _expect_broken( opts, bug ):
def ignore_output( opts ):
opts.ignore_output = 1
def no_stdin( opts ):
opts.no_stdin = 1
# -----
def expect_fail_for( ways ):
......@@ -631,10 +634,14 @@ def simple_run( name, way, prog, args ):
my_rts_flags = rts_flags(way)
if getTestOpts().no_stdin:
stdin_comes_from = ''
else:
stdin_comes_from = ' <' + use_stdin
cmd = 'cd ' + testdir + ' && ' \
+ prog + ' ' + args + ' ' \
+ my_rts_flags + ' ' \
+ ' <' + use_stdin \
+ stdin_comes_from \
+ ' >' + run_stdout \
+ ' 2>' + run_stderr
......
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