Commit fa980b22 authored by sewardj's avatar sewardj
Browse files

[project @ 2001-06-25 09:49:12 by sewardj]

Enough commits to make it usable.
parent a2de2d3b
all: runtests test
all: runtests normalise_errmsg test
boot:
@echo "Make boot is not needed here"
runtests:
(cd driver && make runtests)
normalise_errmsg:
(cd utils/normalise_errmsg && make normalise_errmsg)
clean:
(cd driver && make clean)
(cd utils/normalise_errmsg && make clean)
test: runtests
driver/runtests --tool=../ghc/compiler/ghc-inplace \
......
......@@ -49,7 +49,7 @@ def guess_compiler_flags()
{
if $tool contains "ghc"
then
return "-no-recomp"
return "-no-recomp -dcore-lint"
else
if $tool contains "nhc"
then
......
Almost all tests have a single source file and fall into one of the
categories should_fail (to compile), should_compile, or should_run.
Stuff to do:
1. Place the source and any expected outputs for the test in
ghc-regress/appropriateDirectory/should_<whatever>
Place a should_xyz test in the should_xyz directory; putting it
elsewhere is possible, but confusing.
2. Edit all.T in the relevant directory and add a line for the
test. How to do this should be obvious. For the record, the
user-level functions are:
-- Run a should_run vanilla (single-source-file) test.
You can specify extra compile and run flags, and if the
run is expected to have a non-zero exit code, that too.
The run's .stderr must match the specified .stderr if
it exists. The run's .stdout must match at least one of
the specified .stdouts, if they exist.
vt ( extra_compile_args,
extra_run_args,
expected_nonzero_run_result )
-- Run a vanilla should_compile test. To pass, the compiler must
exit with 0, and the normalised .stderr, if it exists, must
match the normalised specified .stderr.
vtc ( extra_compile_args )
-- Run a vanilla should_fail test. To pass, the compiler must
exit with non-zero, and the normalised .stderr, which must exist,
must match the normalised specified .stderr.
vtf ( extra_compile_args )
LIMITATIONS
1. Only single-source-file tests are properly supported at the mo.
To be fixed.
2. All compilations are passed -no-recomp -dcore-lint, so there's
no point in adding them.
3. If you want to pass a flag to a whole bunch of tests, write a
small wrapper fn to do this. See vtc vs myvtc in
ghc-regress/typecheck/should_compile/all.T.
4. Current mis-/un-handled tests are documented in ghc-regress/NOTES.
ERROR MESSAGE NORMALISATION
Is done to reduce spurious failures due to changes in capitalisation
and whitespaces. Expected and actual error messages are normalised
prior to comparison. What it does:
-- Remove all whitespace lines
-- Merge all other whitespace into a single space.
-- Make all lowercase.
-- Look for file names and zap the directory part:
foo/var/xyzzy/somefile.ext --> somefile.ext
......@@ -13,7 +13,7 @@ comparison of compiler error messages less troublesome.
-- Look for file names and zap the directory part:
foo/var/xyzzy/somefile.ext --> somefile.ext
This progream is used by the test system (vanilla-test.T) to normalise
This program is used by the test system (vanilla-test.T) to normalise
actual compilation error messages before comparing them against
expected messages.
-}
......
NEMS_SRCS= Makefile
all: normalise_errmsg
boot:
@echo "Make boot is not needed here"
normalise_errmsg: $(NEMS_SRCS)
../../../ghc/compiler/ghc-inplace --make Main -o normalise_errmsg
clean:
/bin/rm -f normalise_errmsg *.o *.hi
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