Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
f4227d3c
Commit
f4227d3c
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-08-14 18:39:12 by sof]
Moved to main regression test area
parent
cb5e6c57
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/tests/README
+0
-48
0 additions, 48 deletions
ghc/compiler/tests/README
with
0 additions
and
48 deletions
ghc/compiler/tests/README
deleted
100644 → 0
+
0
−
48
View file @
cb5e6c57
-------------------------------------------------------------------------------
GHC COMPILER TESTS
-------------------------------------------------------------------------------
This directory contains tests for various bits of the internals of ghc.
Note that tests for other parts of the ghc system (such as the driver,
parser, runtime system, standard prelude) belong elsewhere.
Each test takes the form of a single program (for example, reader001.hs)
and a files which specify ghc's expected error output (reader001.stderr).
"make reader001.runtest" will compile reader001.hs using ghc and compare
the resulting output with that specified in the file reader001.stderr.
"make all" run all tests.
-------------------------------------------------------------------------------
ADDING A NEW TEST
-------------------------------------------------------------------------------
To add a new test copy your Haskell program into an appropriately named
file in the appropriate directory (for example, "typecheck/tc093.hs" for
the 93rd typechecker test).
If the test needs to set the compiler options to something other than
the default for the directory, either modify the SRC_HC_OPTS (applies
to all tests in that directory), or set some extra per-file compiler
options. For example,
tc093_HC_OPTS = -noC -ddump-tc
-noC tells not bother generating any C (not point in doing that, since we
only want to test the typechecker). -ddump-tc tells ghc to dump the
typechecker state.
Depending on the tests/ subdirectory, a default exit code is
expected from all tests therein, normally 0 (==success).
Per-file options to the runtests script can be set as follows
tc093_RUNTEST_OPTS = -x 1
telling the test script that the compiler is expected to fail
on tc093.
"touch" the file tc093.stderr. "make tc093.o" will then run
the compiler and fail (because the expected output doesn't match the empty
tc093.stderr). However, it is then easy to update tc093.stderr with the
stuff printed out during "make tc093.o".
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment