| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Update submodules stm, hpc and unix.
Differential Revision: https://phabricator.haskell.org/D1921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implicit parameter isn't actually very relevant to the CallStack
machinery, so we hide the implementation details behind a constraint
alias
```
type HasCallStack = (?callStack :: CallStack)
```
This has a few benefits:
1. No need to enable `ImplicitParams` in user code.
2. No need to remember the `?callStack` naming convention.
3. Gives us the option to change the implementation details in the
future with less user-land breakage.
The revised `CallStack` API is exported from `GHC.Stack` and makes no
mention of the implicit parameter.
Test Plan: ./validate
Reviewers: simonpj, austin, hvr, bgamari
Reviewed By: simonpj, bgamari
Subscribers: thomie
Projects: #ghc
Differential Revision: https://phabricator.haskell.org/D1818
|
|
|
|
|
|
| |
* T2552 (#10037) is failng for all threaded opt_ways, not for WAY=prof.
* TH_spliceE5_prof (#11495) is failing when ghc_dynamic
* Rename ghci_dynamic to ghc_dynamic. It's the same thing.
|
|
|
|
|
|
|
| |
On AIX, `ld` doesn't support `-x` and ignores it. However, a warning is
emitted to stderr which ends up triggering false positives in some of
GHC's testsuite tests. So we simply filter out that noise as part of
normalising stderr.
|
|
|
|
|
|
|
|
|
|
|
| |
D1629 introduced this normalization which was not Python 2.6 compatible
due to the use of the `flags` argument of `re.sub`. Fix this.
Test Plan: Validate
Reviewers: austin, thomie
Differential Revision: https://phabricator.haskell.org/D1718
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given:
* `file = "foo.a.b"`
* `osuf = ".a.b"` -- Note the initial dot.
* `new_osuf = "c"`
Before (bad, the last character of the filename is dropped):
`dropTail (length osuf + 1) file <.> new_osuf == "fo.c"`
After (good):
`stripExtension osuf file <.> new_osuf` == "foo.c"
This regression was introduced in commit c489af73 (#5554). That commit
fixed a similar but different bug, and care has been taken to not
reintroduce it (using the the newly introduced
`System.Filepath.stripExtension`).
Given:
* `file = "foo.a.b"`
* `osuf = "a.b"`
* `new_osuf = "c"`
Before c489af73 (bad, the full suffix should get replaced):
`replaceExtension file new_osuf == "foo.a.c"`
After c489af73 (good):
`dropTail (length osuf + 1) file <.> new_osuf == "foo.c"`
After this commit (still good):
`stripExtension osuf file <.> new_osuf == "foo.c"`
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D1692
GHC Trac Issues: #9760
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: run tests on powerpc and x86_64
Reviewers: hvr, austin, thomie, bgamari
Reviewed By: thomie, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1694
|
|
|
|
|
| |
Python 3 support seems to have mildly bitrotten since #9184 was closed.
Luckily, only some minor tweaks seem necessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the Typeable implementation would intentionally create TyCon
representations with bogus fingerprints to avoid fingerprints (which may
change often) from leaking into test output. As pointed out by Richard
in #10376 this is very bad as simply enabling a debug flag,
`-dsuppress-uniques`, completely breaks the soundness of `Typeable`!
This patch removes this behavior and replaces it with logic in the
testsuite driver to filter out spurious changes due to Typeable
representations.
Test Plan: Validate
Reviewers: austin, simonpj, goldfire
Reviewed By: goldfire
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1629
GHC Trac Issues: #10376
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
(Apologies for the size of this patch, I couldn't make a smaller one
that was validate-clean and also made sense independently)
(Some of this code is derived from GHCJS.)
This commit adds support for running interpreted code (for GHCi and
TemplateHaskell) in a separate process. The functionality is
experimental, so for now it is off by default and enabled by the flag
-fexternal-interpreter.
Reaosns we want this:
* compiling Template Haskell code with -prof does not require
building the code without -prof first
* when GHC itself is profiled, it can interpret unprofiled code, and
the same applies to dynamic linking. We would no longer need to
force -dynamic-too with TemplateHaskell, and we can load ordinary
objects into a dynamically-linked GHCi (and vice versa).
* An unprofiled GHCi can load and run profiled code, which means it
can use the stack-trace functionality provided by profiling without
taking the performance hit on the compiler that profiling would
entail.
Amongst other things; see
https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi for more details.
Notes on the implementation are in Note [Remote GHCi] in the new
module compiler/ghci/GHCi.hs. It probably needs more documenting,
feel free to suggest things I could elaborate on.
Things that are not currently implemented for -fexternal-interpreter:
* The GHCi debugger
* :set prog, :set args in GHCi
* `recover` in Template Haskell
* Redirecting stdin/stdout for the external process
These are all doable, I just wanted to get to a working validate-clean
patch first.
I also haven't done any benchmarking yet. I expect there to be slight hit
to link times for byte code and some penalty due to having to
serialize/deserialize TH syntax, but I don't expect it to be a serious
problem. There's also lots of low-hanging fruit in the byte code
generator/linker that we could exploit to speed things up.
Test Plan:
* validate
* I've run parts of the test suite with
EXTRA_HC_OPTS=-fexternal-interpreter, notably tests/ghci and tests/th.
There are a few failures due to the things not currently implemented
(see above).
Reviewers: simonpj, goldfire, ezyang, austin, alanz, hvr, niteria, bgamari, gibiansky, luite
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This puts the "Relevant bindings" section at the end.
It uses a TcErrors.Report Monoid to divide messages by importance and
then mappends them together. This is not the most efficient way since
there are various intermediate Reports and list appends, but it probably
doesn't matter since error messages shouldn't get that large, and are
usually prepended. In practice, everything is `important` except
`relevantBindings`, which is `supplementary`.
ErrMsg's errMsgShortDoc and errMsgExtraInfo were extracted into ErrDoc,
which has important, context, and suppelementary fields. Each of those
three sections is marked with a bullet character, '•' on unicode
terminals and '*' on ascii terminals. Since this breaks tons of tests,
I also modified testlib.normalise_errmsg to strip out '•'s.
--- Additional notes:
To avoid prepending * to an empty doc, I needed to filter empty docs.
This seemed less error-prone than trying to modify everyone who produces
SDoc to instead produce Maybe SDoc. So I added `Outputable.isEmpty`.
Unfortunately it needs a DynFlags, which is kind of bogus, but otherwise
I think I'd need another Empty case for SDoc, and then it couldn't be a
newtype any more.
ErrMsg's errMsgShortString is only used by the Show instance, which is
in turn only used by Show HscTypes.SourceError, which is in turn only
needed for the Exception instance. So it's probably possible to get rid
of errMsgShortString, but that would a be an unrelated cleanup.
Fixes #11014.
Test Plan: see above
Reviewers: austin, simonpj, thomie, bgamari
Reviewed By: thomie, bgamari
Subscribers: simonpj, nomeata, thomie
Differential Revision: https://phabricator.haskell.org/D1427
GHC Trac Issues: #11014
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Users are sometimes confused why their test doesn't run. It is usually
because of a misspelled testname, for example using 'TEST=1234' instead
of 'TEST=T1234'. After this patch it is hopefully more clear what the
problem is, showing:
ERROR: tests not found: ['1234']
Instead of:
0 total tests, which gave rise to
0 test cases, of which
0 were skipped
Reviewed by: austin, bgamari
Differential Revision: https://phabricator.haskell.org/D1388
|
|
|
|
|
|
| |
Reviewed by: kgardas
Differential Revision: https://phabricator.haskell.org/D1311
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default top-level exception handler now uses the `Show` instance for
`ErrorCall` when printing exceptions, so it will actually print the out-of-band
data (e.g. `CallStack`s) in compiled binaries, instead of just printing the
error message.
This also updates the hpc submodule to fix the test output.
Reviewed By: austin, thomie
Differential Revision: https://phabricator.haskell.org/D1217
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To keep validates fast, we only one run one way. But I think that
it's important for some tests to run them a few ways, just to
make sure functionality, e.g. the profiler, is working. This commit
changes the logic so that any way specified in extra_ways is always
run for fast. The big changes is now profiling tests are run on
validate.
I also made it so the G1 garbage collector tests only run on slow.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, thomie, bgamari
Reviewed By: austin, thomie, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1251
|
|
|
|
| |
This fixes some tests on Windows, for example T2120.
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D1206
|
|
|
|
| |
Differential Revision: https://phabricator.haskell.org/D1207
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`make test` now runs all tests for a single way only. Use `make slowtest` to
get the previous behaviour (i.e. run all tests for all ways).
The intention is to use this new `make test` setting for Phabricator, as
a reasonable compromise between `make fasttest` (what it previously
used) and a fullblown `make slowtest` (which runs all tests for all
ways).
See Note [validate and testsuite speed] in toplevel Makefile.
Differential Revision: https://phabricator.haskell.org/D1178
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename `platform_wordsize_qualify` to `find_expected_file`, and make
it return a filename instead of an (absolute) filepath.
* Replace most usages of `qualify` by `in_testdir`. Others usage sites
will be deleted in a later commit.
These changes will be useful in a later commit, when we'll distinguish
between files in the source directory and those in a (newly created)
test directory.
Reviewed by: austin, bgamari
Differential Revision: https://phabricator.haskell.org/D1186
|
|
|
|
|
|
| |
Benchmark: in rootdirectory, run `time make test TEST=dummy VERBOSE=0`
Before this commit: 2.6s
After this commit: 0.7s
|
|
|
|
| |
No point in pretending the testsuite can be run with older versions of GHC.
|
|
|
|
| |
And *.stdout-ghc to *.stdout. We only have output files for ghc now.
|
|
|
|
|
| |
No point in pretending other compilers can use the GHC testsuite. This
makes the *.T files a bit shorter.
|
|
|
|
| |
It was introduced in 39c6c735c216d259854ee31b15ec87ea653f2b5d (2007).
|
|
|
|
|
| |
Some tests use the format: extra_run_opts('+RTS foo') (without closing
-RTS). Make it clear in testlib.py that this should work.
|
|
|
|
| |
I forgot to rename this in 5ddd90415f307cac72d75d86da58e552b168ee30.
|
|
|
|
|
|
|
|
|
|
|
| |
And rename timeout_multiplier to run_timeout_multiplier.
timeout_multiplier was added in commit
a00389794b839971c7d52ead9e8570bfaa25ac55. The name suggested that it
would affect any test, but it actually only affected tests that had a
run component, and only that run component (as needed by test T367).
Differential Revision: https://phabricator.haskell.org/D982
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a test failure, we show a diff between the expected and the actual
output. The method of how we do this has changed a couple of times:
* In 2007: 9951189ccf90b709436fa55ee49eeef031f79f4e
"On failure, diff the normalised test outputs"
* In 2011: 3019b1e409c129ef7af63e6a7408fb36ec44444b
"When the output files differ, present the diffs between the *actual*
output, not the normalised output. The latter may have newlines
removed, making the diff unreadable."
* In 2015 (now): do something in between.
- Do apply the normalisers again, to make the diff smaller (only
showing the actual problem).
- But don't apply normalise_whitespace, as it indeed makes the diff
unreadable.
Differential Revision: https://phabricator.haskell.org/D984
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The testsuite driver has a little known feature to check which files
each test writes to, whether there are tests that write to same file,
and whether the tests leave any files behind when CLEANUP=1. It uses
strace under the hood.
This commit fixes some bitrot, and filters out some more strace lines
that we're not interested in (and are shown as framework failures
otherwise).
Differential Revision: https://phabricator.haskell.org/D979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the following tests from expect_fail to expect_broken: and list
the ticket number:
* driver/sigof03m/sigof03 (#9252)
* driver/static001 (#8127)
* partial-sigs/should_compile/EqualityConstraint (#9478)
* partial-sigs/should_compile/ExtraNumAMROn (#9478)
* partial-sigs/should_compile/PatBind2 (#9478)
* partial-sigs/should_fail/TidyClash2 (#9478)
* simplCore/should_compile/T8832 (#8832)
The following tests are still marked as expect_fail, but it is not
clearly documented why so:
* gadt/lazypatok
* indexed-types/should_fail/SkolemOccursLoop
All other expect_fail tests are only expected to fail on either a
certain platform/os or for a certain way only.
Differential Revision: https://phabricator.haskell.org/D966
|
|
|
|
|
| |
Use the new function `normalise_drive_letter` to change D:\ to C:\
before comparing outputs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To make the test runner work under msys-native Python...
Commit 5258566ee5c89aa757b0cf1433169346319c018f broke the msys testsuite
driver (#10441). It changed the quoting of `config.compiler` from single
quotes to double quote, which turns out to not be compatible with what
the function `passThroughCmd` expected.
We could fix `passThroughCmd` to handle the case where `config.compiler`
is double quoted, and scatter some notes around to make sure the quoting
done in various places of the testsuite driver stay compatible.
Instead, this commit reverts 101c62e26286353dd3fac1ef54323529b64c9902,
which introdced the function `passThroughCmd` in the first place
(#9626). ezyang reports that doing this revert fixes the testsuite
driver for him using the the following version of msys2:
msys2-keyring r8.3864337-1
msys2-runtime 2.1.0.16351.cd3184b-1
msys2-runtime-devel 2.1.0.16351.cd3184b-1
msys2-w32api-headers 5.0.0.4456.c8b6742-1
msys2-w32api-runtime 5.0.0.4455.32db221-1
Ideally we'd know what minimum version of msys2 we require, but for now
this fix is better than nothing.
Only gintas ever reported the original problem, and he actually
mentioned shortly afterwards: "This may have been fixed by a recent
release of msys2, but I am not sure."
Differential Revision: https://phabricator.haskell.org/D952
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't let the output of tests that either have missing libraries or are
expected to be broken obscure real failures.
This makes it easier to analyse the testlogs.
The only consequence is that when a test fails because a certain library
isn't installed, you have to check the all.T file in which the test is
defined to actually find out _which_ library that is. Before it would
print something like
Compile failed (status 256) errors were:
stm052.hs:10:8: error:
Could not find module ‘System.Random’
Use -v to see a list of the files searched for.
And now it doesn't. I think this is an acceptable tradeoff.
Differential Revision: https://phabricator.haskell.org/D945
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* extra_clean argument should be a list
Add an assert to prevent regressions.
* properly clean package conf direcories
They are directories now, which was causing problems.
* properly clean write_interface_* tests
We were getting these errors:
[Errno 21] Is a directory: './driver/write_interface_oneshot'
[Errno 39] Directory not empty: './driver/write_interface_oneshot'
[Errno 21] Is a directory: './driver/write_interface_make'
[Errno 39] Directory not empty: './driver/write_interface_make'
* outputdir() is better than -outputdir, as it knows how to (pre)clean
itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* By default use V=0, and call the testsuite with VERBOSE=2, which we
did before only with validate --quiet. This disables printing the
test commands it runs.
* When --quiet is used, call the testsuite with VERBOSE=1. This
disables printing the '====> Scanning' lines, and doesn't print
which test is being run. So it only prints something when a test
accidentally prints to stdout or when it fails.
Don't set this option on Travis, as Travis will cancel a build if it
doesn't see any output for more than 10 minutes.
* When --quiet is used, set the new test option NO_PRINT_SUMMARY,
which skips printing the test summary. Only the list of unexpected
failures is printed, if there are any. Note that the full summary
can still be found in testsuite_summary.txt
* When --quiet is used, don't pass the `-v` flag to `ghc-pkg check`
* When --quiet is used, don't print the Oops! header. It shoud be
clear from the list of failing tests that something is wrong.
This is all done to get the most out of 30 lines of logfile. These changes can
be disabled later by simply not passing the --quiet flag to validate.
Differential Revision: https://phabricator.haskell.org/D942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite config/ghc to use getStdout (which use subprocess.Popen) instead
of os.popen, which is deprecated; this also avoids the use of shell
Also:
* Move getStdout to driver/testutil.py so both config/ghc and
driver/runtests.py can use it
* Remove support for Python below 2.4, which doesn't have subprocess
Reviewed By: thomie
Differential Revision: https://phabricator.haskell.org/D908
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following tests would result in framework failures when using a ghc
build with HADDOCK_DOCS=NO in mk/build.mk or mk/validate.mk:
* haddock.Cabal
* haddock.base
* haddock.compiler
Test Plan: run make in tests/perf/haddock
Differential Revision: https://phabricator.haskell.org/D899
|
|
|
|
|
|
|
|
|
|
|
| |
Add "error:" prefix to error-messages, also lowercase "Warning:"
message to match GCC behavior closer.
Reviewed By: thomie, austin
Differential Revision: https://phabricator.haskell.org/D811
GHC Trac Issues: #10021
|
|
|
|
|
|
|
|
|
| |
This is a followup to d4cf7051bc17182238b17ba1dc42e190fa5c6f0d, which
did the same for `expect_broken` tests.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D786
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running `make accept` on a directory in the testsuite, don't accept
the output of tests that are marked as expect_broken. This makes it
easier to review `git diff` after running `make accept`.
When you change an error message in the compiler that shows up in the
output of many tests, you can run `make accept` in the testsuite
directory, and all expected test output will be updated. But since your
change didn't magically fix all the other bugs in the compiler for which
we have an expect_broken test, the output for those tests should
probably not be updated.
Before, the effect of running `make accept` could be that some tests
would end up in the 'unexpected passes' group.
[skip ci]
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D781
|
|
|
|
|
|
|
|
| |
This is a followup to a3d0a7a0ba3a1ee458a9883011247561dfe22f4a.
Reviewed by: Rufflewind
Differential Revision: https://phabricator.haskell.org/D780
|
|
|
|
|
|
|
|
|
| |
Suppress the errors that appear in standard output when running gs on
bad.ps since it's expected to fail anyway.
Reviewed By: thomie, austin
Differential Revision: https://phabricator.haskell.org/D773
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Another bug in the #10164 series. Only Python 2.7 and up allow you to
omit the positional argument specifiers in format strings.
Test Plan: this fixes the Solaris builders
Reviewed By: kgardas
Differential Revision: https://phabricator.haskell.org/D750
GHC Trac Issues: #10164
|
|
|
|
| |
This got broken in commit 5258566.
|
|
|
|
|
|
|
|
|
| |
This should have been part of commit 5258566ee5c8, to allow expansion of
'{hp2ps}' in a command string to `config.hp2ps`.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D734
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If one runs the testsuite with a profiling compiler, during the import
of `testlib.py`, `testlib.py` sets the global variable `gs_working`. To
do so, it executes a few statements which require the function
`strip_quotes` to be in scope. But that function only gets defined at
the very end of testlib.py.
This patch moves the definition of `strip_quotes` to testutil.py, which
is imported at the very top of testlib.py. This unbreaks the nightly
builders.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D728
|
|
|
|
|
|
|
|
|
| |
The ghci script tests were using different RTS flags from the normal
ghci tests. This commit makes them use the same flags.
Reviewers: austin
Differential Revision: https://phabricator.haskell.org/D724
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use format strings instead of string concatenation.
* Wrap `config.compiler`, `config.hpc` etc. in quotes in `mk/test.mk`, so we
don't have to in .T scripts and driver/testlib.py.
Update hpc submodule (test cleanup)
Reviewers: austin
Differential Revision: https://phabricator.haskell.org/D718
|