| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is controlled by -f[no-]diagnostics-show-caret.
Example of what it looks like:
```
|
42 | x = 1 + ()
| ^^^^^^
```
This is appended to each diagnostic message.
Test Plan:
testsuite/tests/warnings/should_fail/CaretDiagnostics1
testsuite/tests/warnings/should_fail/CaretDiagnostics2
Reviewers: simonpj, austin, bgamari
Reviewed By: simonpj, bgamari
Subscribers: joehillen, mpickering, Phyx, simonpj, alanz, thomie
Differential Revision: https://phabricator.haskell.org/D2718
GHC Trac Issues: #8809
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add prettyprinter tests, which take a file, parse it, pretty print it,
re-parse the pretty printed version and then compare the original and
new ASTs (ignoring locations)
Updates haddock submodule to match the AST changes.
There are three issues outstanding
1. Extra parens around a context are not reproduced. This will require an
AST change and will be done in a separate patch.
2. Currently if an `HsTickPragma` is found, this is not pretty-printed,
to prevent noise in the output.
I am not sure what the desired behaviour in this case is, so have left
it as before. Test Ppr047 is marked as expected fail for this.
3. Apart from in a context, the ParsedSource AST keeps all the parens from
the original source. Something is happening in the renamer to remove the
parens around visible type application, causing T12530 to fail, as the
dumped splice decl is after the renamer.
This needs to be fixed by keeping the parens, but I do not know where they
are being removed. I have amended the test to pass, by removing the parens
in the expected output.
Test Plan: ./validate
Reviewers: goldfire, mpickering, simonpj, bgamari, austin
Reviewed By: simonpj, bgamari
Subscribers: simonpj, goldfire, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D2752
GHC Trac Issues: #3384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
D2716 introduced colors into the output of GHC.
These color ourputs are done using escape characters output
to the terminal.
These however are wreaking havoc on the testsuite output as now
no stderr with a warning or error will match anymore.
Instead of accepting the new codes as expected values instead I
turn them off. So the testsuite is consistent on platforms/terminals we
don't support colors on.
Test Plan:
any test that outputs colors. e.g.
make test TEST=T9576
Reviewers: austin, Rufflewind, bgamari
Subscribers: thomie, #ghc_windows_task_force
Differential Revision: https://phabricator.haskell.org/D2787
GHC Trac Issues: #8809
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
It turns out that Phyx's fix for #12554 (D2684) still fails with mingw-w64
python 2.7. However, Python 3 (both msys2 and mingw-w64) work fine. Given that
supporting Python 2 has already become rather tiresome (as @thomie warned it
would), let's just move to python3 by default.
Test Plan: Validate
Reviewers: austin, Phyx
Reviewed By: Phyx
Subscribers: Phyx, thomie
Differential Revision: https://phabricator.haskell.org/D2766
GHC Trac Issues: #12554
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a land far far away, a project called Cygwin was born.
Cygwin used newlib as it's standard C library implementation.
But Cygwin wanted to emulate POSIX systems as closely as possible.
So it implemented `execv` using the Windows function `spawnve`.
Specifically
```
spawnve (_P_OVERLAY, path, argv, cur_environ ())
```
`_P_OVERLAY` is crucial, as it makes the function behave *sort of*
like execv on linux. the child process replaces the original process.
With one major difference because of the difference in process models
on Windows: the original process signals the caller that it's done.
this is why the file is still locked. because it's still running,
control was returned because the parent process was destroyed,
but the child is still running.
I think it's just pure dumb luck, that the older runtimes are slow
enough to give the process time to terminate before we tried deleting
the file. Which explains why you do have sporadic failures even on
older runtimes like 2.5.0, of a test or two (like T7307).
So this patch fixes a couple of things. I leverage the existing
`timeout.exe` to implement a workaround for this issue.
a) The old timeout used to start the process then assign it to the job.
This is slightly faulty since child processes are only assigned to a
job is their parent were assigned at the time they started. So this
was a race condition. I now create the process suspended, assign it
to the job and then resume it. Which means all child processes are
not running under the same job.
b) First things, Is to prevent dangling child processes. I mark the job
with `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE` so when the last process in
the job is done, it insures all processes under the job are killed.
c) Secondly, I change the way we wait for results. Instead of waiting
for the parent process to terminate, I wait for the job itself to
terminate.
There's a slight subtlety there, we can't wait on the job itself.
Instead we have to create an I/O Completion port and wait for signals
on it. See
https://blogs.msdn.microsoft.com/oldnewthing/20130405-00/?p=4743
This fixes the issues on all runtimes for me and makes T7307 pass
consistenly.
The threading was also simplified by hiding all the locking in a single
semaphore and a completion class. Futhermore some additional error
reporting was added.
For encoding the testsuite now no longer passes a file handle to the
subprocess since on windows, sh.exe seems to acquire a lock on the file
that is not released in a timely fashion.
I suspect this because cygwin seems to emulate console handles by
creating file handles and using those for std handles. So when we give
it an existing file handle it just locks the file. I what's happening is
that it's not releasing the handle until all shared cygwin processes are
dead. Which explains why it worked in single threaded mode.
So now instead we pass a pipe and do not interpret the resulting data.
Any bytes written to stdin or read out of stdout/stderr are done so in
binary mode and we do not interpret the data. The reason for this is
that we have encoding tests in GHC which pass invalid utf-8. If we try
to handle the data as text then python will throw an exception instead
of a test comparison failing.
Also I have fixed the ability to override `PYTHON` when calling `make
tests`. This now works the same as with `.\validate`.
Finally, after cleaning up the locks I was able to make the abort
behavior work correctly as I believe it was intended: when you press
Ctrl+C and send an interrupt signal, the testsuite finishes the active
tests and then gracefully exits showing you a report of the progress it
did make. So using Ctrl+C will not just *die* as it did before.
These changes lift the restriction on which python version you use
(msys/mingw) or which runtime or python 3 or python 2. All combinations
should now be supported.
Test Plan:
PATH=/usr/local/bin:/mingw64/bin:$APPDATA/cabal/bin:$PATH &&
PYTHON=/usr/bin/python THREADS=9 make test
THREADS=9 make test
PATH=/usr/local/bin:/mingw64/bin:$APPDATA/cabal/bin:$PATH &&
PYTHON=/usr/bin/python ./validate --quiet --testsuite-only
Reviewers: erikd, RyanGlScott, bgamari, austin
Subscribers: jrtc27, mpickering, thomie, #ghc_windows_task_force
Differential Revision: https://phabricator.haskell.org/D2684
GHC Trac Issues: #12725, #12554, #12661, #12004
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is often convenient to copy the test invocation and remove this flag
in order to see compiler traces. Moving it to the end makes it easier to
remove.
Remove trailing whitespace
Reviewers: austin, thomie, bgamari
Reviewed By: bgamari
Differential Revision: https://phabricator.haskell.org/D2543
|
|
|
|
|
|
| |
Reviewed by: Phyx
Differential Revision: https://phabricator.haskell.org/D2394
|
|
|
|
|
|
| |
* Set config settings directly in mk/test.mk, instead of indirectly in
config/ghc
* passing --hpcdir for WAY=hpc is unnecessary
|
|
|
|
| |
This allows the removal of the override_flags stuff in testlib.py.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no need for this flag anymore, since each test runs in a
newly created directory. Removing it cleans up testlib.py a bit.
There is a small risk that this renders some tests useless. It's hard to
know. Those tests should have specified -fforce-recomp` explicitly
anyway, so I'm not going to worry about it. I've fixed the ones that
failed without -fforce-recomp.
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D2346
|
|
|
|
|
|
|
|
|
|
|
| |
* See `Note [Why is there no stage1 setup function?]`.
* Move T2632 to the tests/stage1 directory (#10382).
Reviewed by: ezyang, nomeata, bgamari
Differential Revision: https://phabricator.haskell.org/D2341
GHC Trac Issues: #12197
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed in Phab:D1187, this approach makes it a bit easier to
inspect the test directory while working on a new test.
The only tests that needed changes are the ones that refer to files in
ancestor directories. Those files are now copied directly into the test
directory.
validate still runs the tests in a temporary directory in /tmp, see
`Note [Running tests in /tmp]` in testsuite/driver/runtests.py.
Update submodule hpc.
Reviewed by: simonmar
Differential Revision: https://phabricator.haskell.org/D2333
GHC Trac Issues: #11980
|
| |
|
|
|
|
| |
Refactoring only.
|
|
|
|
|
|
|
|
|
| |
The CHECK_FILES_WRITTEN feature is no longer necessary, since tests
don't write to the source directory anymore (#11980).
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D2162
|
|
|
|
| |
[skip ci]
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Also move the `cleanup` setting from `default_testopts` to `config`. The
`cleanup` setting is the same for all tests, hence it belongs in
`config`.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D2148
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As `-fno-show-warning-groups` shows associated warning groups regardless
of whether the respective warning group flag as been passed on the CLI,
the warning-group information may be confusing to users.
At this point, `-fshow-warning-groups` is useful mostly to GHC
developers and possibly GHC users who want to see which warning groups
an emitted warning is part of. (Btw, this is particularly interesting in
combination with `-Weverything` which enables *every* warning flag known
to GHC.)
Consequently, starting with this commit, one has to opt-in via
`-fshow-warning-groups` for GHC to show warning groups.
In order to reduce the testsuite delta in this commit, the
`-fshow-warning-groups` flag has been added to TEST_HC_OPTS.
|
|
|
|
| |
Refactoring only.
|
|
|
|
|
|
| |
Call `+$(PYTHON) ...` to fix #11569 instead.
See Note [Communicating options and variables to a submake].
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't use the GNU make function 'realpath' (reverting e66a81c6),
because it doesn't handle spaces in paths. Instead, use 'cygpath' to
convert Windows style paths (e.g. C:/foo/) to mingw style paths (e.g.
c/foo/), and then call 'which'.
Tests:
* make TEST_HC=ghc
* make TEST_HC=/d/home/thomie/ghc-validate/bindisttest/install\ \ \ dir/bin/ghc
* make TEST_HC=D:/home/thomie/ghc-validate/bindisttest/install\ \ \ dir/bin/ghc
Reviewed by: Phyx
Differential Revision: https://phabricator.haskell.org/D1431
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Amazingly, there were zero changes to the byte code generator and very
few changes to the interpreter - mainly because we've used good
abstractions that hide the differences between profiling and
non-profiling. So that bit was pleasantly straightforward, but there
were a pile of other wibbles to get the whole test suite through.
Note that a compiler built with -prof is now like one built with
-dynamic, in that to use TH you have to build the code the same way.
For dynamic, we automatically enable -dynamic-too when TH is required,
but we don't have anything equivalent for profiling, so you have to
explicitly use -prof when building code that uses TH with a profiled
compiler. For this reason Cabal won't work with TH. We don't expect
to ship a profiled compiler, so I think that's OK.
Test Plan: validate with GhcProfiled=YES in validate.mk
Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang
Reviewed By: ezyang
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1407
GHC Trac Issues: #4837, #545
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The LLVM backend does not currently work on PowerPC so disable it.
* Only run LLVM tests if the needed LLVM tools have been detected at
configure time.
Test Plan: Run LLVM tests on x86_64 and powerpc
Reviewers: austin, bgamari, hvr, thomie
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1421
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: it works
Reviewers: bgamari, rwbarton, austin
Reviewed By: austin
Subscribers: rwbarton
Differential Revision: https://phabricator.haskell.org/D1377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is difficult for GHC developers to know if they have broken the API
Annotations.
This patch provides a utility that can be used as a test to show up
errors in the API Annotations.
It is based on the current tests for ghc-api/annotations which can parse
a file using the just-built GHC API, and check that no annotations are
disconnected from the ParsedSource in the output.
In addition, it should be able to dump the annotations to a file, so a
new feature developer can check that all changes to the parser do
provide annotations.
Trac ticket: #10917
Test Plan: ./validate
Reviewers: hvr, thomie, austin, bgamari
Reviewed By: bgamari
Differential Revision: https://phabricator.haskell.org/D1368
GHC Trac Issues: #10917
|
|
|
|
|
|
|
|
| |
It should be possible to run the testsuite with older versions of GHC.
Reviewed by: austin
Differential Revision: https://phabricator.haskell.org/D1308
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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
|
|
|
|
|
|
|
|
|
| |
They can only occur with `-O`, but we want tests to produce the same
output for all test ways.
This brings us closer to passing the complete testsuite.
Differential Revision: https://phabricator.haskell.org/D1203
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This prevents the following test errors on Windows:
perf/haddock haddock.Cabal [[Errno 2] No such file or directory: ...
perf/haddock haddock.base [[Errno 2] No such file or directory: ...
perf/haddock haddock.compiler [[Errno 2] No such file or directory: ...
The tests will now be reported as having missing libraries.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do what this comment was suggesting:
"Ideally we'd like to have 'make -r' turned on by default, because
that disables all the implicit rules, but there doesn't seem to be a
good way to do that."
This change doesn't seem to have much effect on the time it takes to run
make. Apparently clearing .SUFFIXES was enough for that. But it does
make the output of `make -d` quite a bit shorter, which is nice.
Note: ghc.mk is always called indirectly, so no need to set .SUFFIXES or
MAKEFLAGS there again.
Differential Revision: https://phabricator.haskell.org/D915
|
|
|
|
|
|
|
| |
To check if we're cleaning, always check the $CLEANING variable, instead
of sometimes $CLEANING, sometimes $MAKECMDGOALS.
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should fix the testsuite driver on Windows using the MinGW tools
with a native build of Python.
MinGW automagically converts MinGW-style paths (e.g.
'/c/programs/ghc/bin/ghc') into ordinary Windows paths (e.g.
'C:/programs/ghc/bin/ghc') when a native Windows program is invoked. But
it doesn't do so when those paths are wrapped with a pair of escaped
double quotes.
The fix is to not call `eval` on the paths in Python, which let's us use
one less pair of quotes, and makes MinGW happy.
Reviewers: Rufflewind, austin
Differential Revision: https://phabricator.haskell.org/D911
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Tools such as `ghc-pkg` and `runghc` are no longer required to be in the same directory as `ghc` when running tests, provided that `TEST_HC` is not explicitly set and an in-tree compiler is not used. Fixes #10126.
Reviewers: thomie, austin
Reviewed By: thomie, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D705
GHC Trac Issues: #10126
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently, running `make test` in:
/ runs fast testsuite
/testsuite doesn't work
/testsuite/tests runs slow testsuite
This commit:
* changes `make test` in the ghc root directory to run the slow testsuite,
just like it already does in `testsuite/tests`
* adds some simple targets to `/testsuite`, that all delegate to
`/testsuite/tests`
* adds a new target `fasttest` to the toplevel Makefile, with a shorthand
name `fast` (for consistency with /testsuite and /testsuite/tests)
* declares some more targets PHONY for safety
Wiki pages that need updating:
* Building/StandardTargets
* Buliding/RunningTests
Reviewers: austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D685
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This revision enables -fwarn-tabs by default and add a suppression
flag, so that GHC compilation won't fail when some files contain tab
characters.
Test Plan: Additional test case, T9230, was added to cover that change.
Reviewers: austin
Reviewed By: austin
Subscribers: simonmar, ezyang, carter, thomie, mlen
Differential Revision: https://phabricator.haskell.org/D255
GHC Trac Issues: #9230
Conflicts:
testsuite/driver/testlib.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UNREG
Haskell's 'foreign import' declaraion does not have a way
to extress exact C prototypes (it ignores 'const' modifiers, exact pointer
types, etc.) which leads to warnings when C backend generates calls to such
functions:
/tmp/ghc32698_0/ghc32698_10.hc:52:5:
warning: conflicting types for built-in function ‘strlen’ [enabled by default]
EF_(strlen);
^
Patch disables builtin functions for UNREG build
to workaround test failures due to stderr mismatch.
Fixes the following test failures:
TEST="safePkg01 T5423 T7574 T3736"
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
| |
When the tree is not built, GHC_PKG refers to ghc-pkg in the patth,
which may not yet support --simple-output to suppress the field name. So
we strip the fieldname when parsing the output, to avoid annoying
warnings.
|
|
|
|
|
|
| |
More often than not the output of the performance tests is in the way,
rather than helping. This allows the use of `make SKIP_PERF_TESTS=YES`
to skip these tests. Fixes #8413
|
|
|
|
|
|
|
|
|
| |
Select verbosity with "make VERBOSE=n". Options so far:
n=0: No per-test output
n=1: Only failing test results
n=2: As above, plus progress information (names of all tests)
n=3: As aobve, plus commands called.
Default currently is n=3, although n=2 might be a nicer default.
|
|
|
|
|
|
|
| |
Added a new test Makefile variable $(dllext), which is
instantiated to .dll or .so or .dylib depending on your platform.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
|
| |
|