Commit 0ae8de2e authored by simonmar's avatar simonmar
Browse files

[project @ 2001-08-22 13:36:15 by simonmar]

Run each test in its own directory, rather than trying to run them all
from the directory in which the driver was started.  This is required
because several tests expect to be able to open auxilliary files in
the current directory.
parent 5beeb5fa
......@@ -32,6 +32,16 @@ def qualify ( $_filename_frag )
fi
}
def testnameWith ( $_filename_frag )
{
if $_filename_frag == ""
then
return $testname
else
return $testname ++ "." ++ $_filename_frag
fi
}
---------------------------------------------------------------
--- COMPILATION ---
---------------------------------------------------------------
......@@ -109,18 +119,21 @@ def simple_run_main( $_extra_args )
{
-- figure out what to use for stdin
$devnull = "/dev/null"
if $stdin == "" then
$stdin = qualify("stdin")
if $stdin /= "" then
$use_stdin = $stdin
else
$stdin = testnameWith("stdin")
$stdin_path = $testdir ++ "/" ++ $stdin
$use_stdin = if exists($stdin_path) then $stdin else $devnull
fi
$use_stdin = if exists($stdin) then $stdin else $devnull
$run_stdout = qualify("run.stdout")
$run_stderr = qualify("run.stderr")
$run_stdout = testnameWith("run.stdout")
$run_stderr = testnameWith("run.stderr")
rm_or_fail($run_stdout)
rm_or_fail($run_stderr)
$cmd = qualify("")
++ " " ++ $_extra_args
$cmd = "cd " ++ $testdir ++ " && "
++ "./" ++ $testname ++ " " ++ $_extra_args
++ " < " ++ $use_stdin
++ " > " ++ $run_stdout
++ " 2> " ++ $run_stderr
......
Supports Markdown
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