Commit 284db99f authored by simonmar's avatar simonmar
Browse files

[project @ 2001-08-22 15:00:34 by simonmar]

Run the compiler from the directory in which the test source lives.
This allows simple multi-module tests using the vanilla test macros to
work (not strictly the right way to do it, but several of our tests
are of this kind).
parent d98ce54d
......@@ -53,12 +53,13 @@ def guess_compiler_flags()
def simple_build_Main_WRK ( $_extra_args, $compile_only )
{
$flags = guess_compiler_flags()
$errname = qualify("comp.stderr")
$exename = qualify("") -- ie, the exe name == the test name
$srcname = qualify("hs")
$errname = testnameWith("comp.stderr")
$srcname = testnameWith("hs")
rm_or_fail($errname)
rm_or_fail($exename)
$cmd = $tool ++ " " ++ $flags ++ " " ++ $_extra_args ++ " "
rm_or_fail($testname)
$cmd = "cd " ++ $testdir ++ " && " ++
$tool ++ " " ++ $flags ++ " " ++ $_extra_args ++ " "
++ (if defined $extra_hc_flags
then $extra_hc_flags
else "")
......@@ -66,7 +67,7 @@ def simple_build_Main_WRK ( $_extra_args, $compile_only )
then " -C "
else if $compile_only
then " -c "
else " -o " ++ $exename ++ " ")
else " -o " ++ $testname ++ " ")
++ $srcname ++ " &> " ++ $errname
$res = runCmd($cmd)
return $res
......
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