summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
Commit message (Collapse)AuthorAgeFilesLines
...
* testsuite: Fix a variety of issues when building with integer-simpleBen Gamari2018-12-241-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | * Mark arith011 as broken with integer-simple As noted in #16091, arith011 fails when run against integer-simple with a "divide by zero" exception. This suggests that integer-gmp and integer-simple are handling division by zero differently. * This also fixes broken_without_gmp; the lack of types made the previous failure silent, sadly. Improves situation of #16043. * Mark several tests implicitly depending upon integer-gmp as broken with integer-simple. These expect to see Core coming from integer-gmp, which breaks with integer-simple. * Increase runtime timeout multiplier of T11627a with integer-simple I previously saw that T11627a timed out in all profiling ways when run against integer-simple. I suspect this is due to integer-simple's rather verbose heap representation. Let's see whether increasing the runtime timeout helps. Fixes test for #11627. This is all in service of fixing #16043.
* Revert "testsuite: Fix broken_without_gmp"Ben Gamari2018-12-231-4/+5
| | | | | | | This reverts commit e59439af3222d151918ad1ad2a03942ce9e6a1ff. This is causing unexpected failures in some test ways. Further proof that no change is too trivial for CI.
* testsuite: Fix broken_without_gmpBen Gamari2018-12-231-5/+4
| | | | | The lack of types made the previous failure silent, sadly. Improves situation of #16043.
* testsuite: Fix typo: integer-gimp /= integer-gmpBen Gamari2018-12-131-1/+1
|
* testsuite: Normalise away spurious differences in out-of-scope instancesBen Gamari2018-12-121-1/+7
| | | | | | | | | | | | | | | | | | | | This fixes a variety of testsuite failures with integer-simple of the form ``` --- typecheck/should_fail/tcfail072.run/tcfail072.stderr.normalised +++ typecheck/should_fail/tcfail072.run/tcfail072.comp.stderr.normalised @@ -12,7 +12,7 @@ -- Defined in ‘integer-<IMPL>-<VERSION>:GHC.Integer.Type’ instance Ord () -- Defined in ‘GHC.Classes’ ...plus 21 others - ...plus three instances involving out-of-scope types + ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) In the expression: g A In an equation for ‘g’: g (B _ _) = g A ``` In service of fixing #16043.
* testsuite: Fix a number of GHCi-related failures due to integer-simpleBen Gamari2018-12-121-0/+5
| | | | Towards fixing #16043.
* testuite: update more windows tests outputsTamar Christina2018-11-221-2/+3
| | | | | | | | | | Test Plan: ./validate Reviewers: bgamari, simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5362
* Fix GhostScript detection (Trac #15856)Krzysztof Gogolewski2018-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | The option `confdir` (used in GhostScript test) was set correctly via `--config` in `test.mk` and incorrectly via `config/ghc`. AFAICT, some time ago this was working because the incorrect assignment was done first, and later it broke. Hardian doesn't pass `confdir`. I removed `confdir` and use `config.top` to determine the directory of the `good.ps` and `bad.ps` files. This is simpler. I also removed some redundant assignments in `config/ghc`. Test Plan: manually set config.have_profiling and make test Reviewers: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15856 Differential Revision: https://phabricator.haskell.org/D5298
* testsuite: Save performance metrics in git notes.David Eichmann2018-11-071-85/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the following improvement: - Automatically records test metrics (per test environment) so that the programmer need not supply nor update expected values in *.T files. - On expected metric changes, the programmer need only indicate the direction of change in the git commit message. - Provides a simple python tool "perf_notes.py" to compare metrics over time. Issues: - Using just the previous commit allows performance to drift with each commit. - Currently we allow drift as we have a preference for minimizing false positives. - Some possible alternatives include: - Use metrics from a fixed commit per test: the last commit that allowed a change in performance (else the oldest metric) - Or use some sort of aggregate since the last commit that allowed a change in performance (else all available metrics) - These alternatives may result in a performance issue (with the test driver) having to heavily search git commits/notes. - Run locally, performance tests will trivially pass unless the tests were run locally on the previous commit. This is often not the case e.g. after pulling recent changes. Previously, *.T files contain statements such as: ``` stats_num_field('peak_megabytes_allocated', (2, 1)) compiler_stats_num_field('bytes allocated', [(wordsize(64), 165890392, 10)]) ``` This required the programmer to give the expected values and a tolerance deviation (percentage). With this patch, the above statements are replaced with: ``` collect_stats('peak_megabytes_allocated', 5) collect_compiler_stats('bytes allocated', 10) ``` So that programmer must only enter which metrics to test and a tolerance deviation. No expected value is required. CircleCI will then run the tests per test environment and record the metrics to a git note for that commit and push them to the git.haskell.org ghc repo. Metrics will be compared to the previous commit. If they are different by the tolerance deviation from the *.T file, then the corresponding test will fail. By adding to the git commit message e.g. ``` # Metric (In|De)crease <metric(s)> <options>: <tests> Metric Increase ['bytes allocated', 'peak_megabytes_allocated'] \ (test_env='linux_x86', way='default'): Test012, Test345 Metric Decrease 'bytes allocated': Test678 Metric Increase: Test711 ``` This will allow the noted changes (letting the test pass). Note that by omitting metrics or options, the change will apply to all possible metrics/options (i.e. in the above, an increase for all metrics in all test environments is allowed for Test711) phabricator will use the message in the description Reviewers: bgamari, hvr Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #12758 Differential Revision: https://phabricator.haskell.org/D5059
* testsuite: Use bools for booleans, not intsBen Gamari2018-09-051-15/+15
| | | | | | | | | | | | | | Summary: Just as it says on the tin. Test Plan: Validate Reviewers: bgamari, osa1 Reviewed By: osa1 Subscribers: osa1, monoidal, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D5010
* Simplify testsuite driver, part 2Krzysztof Gogolewski2018-08-121-10/+9
| | | | | | | | | | | | | | | | | | Summary: - Avoid import *; this helps tools such as pyflakes. The last occurrence in runtests.py is not easy to remove as it's used by .T files. - Use False/True instead of 0/1. Test Plan: validate Reviewers: bgamari, thomie, simonmar Reviewed By: thomie Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5062
* Simplify testsuite driverKrzysztof Gogolewski2018-08-111-15/+8
| | | | | | | | | | | | | | | | | | | Summary: - remove clean_cmd - framework_failures was undefined - times_file was not used - if_verbose_dump was called only when verbose >= 1; remove the check - simplify normalise_whitespace Test Plan: validate Reviewers: bgamari, thomie Reviewed By: thomie Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5061
* Strip ../ from testdir (fixes #15469)Thomas Miedema2018-08-061-1/+3
| | | | | | | | | | | | | | Test Plan: Harbormaster Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15469 Differential Revision: https://phabricator.haskell.org/D5039
* Remove dead code in testsuite driverKrzysztof Gogolewski2018-07-271-17/+4
| | | | | | | | | | | | Test Plan: validate Reviewers: bgamari, O7 GHC - Testsuite Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4972
* Disable -fghci-leak-check in DEBUG modeRichard Eisenberg2018-07-141-1/+2
| | | | | The DEBUG compiler's GHCi still leaks. This commit suppresses testsuite failures due to this leak. See #15372.
* testuite: remove strace call.Tamar Christina2018-06-131-3/+0
|
* Fix `print-explicit-runtime-reps` (#11786).HE, Tao2018-06-081-2/+2
| | | | | | | | | | | | | | By fixing splitting of IfaceTypes in splitIfaceSigmaTy. Test Plan: make test TEST="T11549 T11376 T11786" Reviewers: goldfire, bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #11786, #11376 Differential Revision: https://phabricator.haskell.org/D4733
* testsuite: Fix incorrectly capitalized True in testlib.pyBen Gamari2018-05-291-1/+1
|
* Clean up Windows testsuite failuresTamar Christina2018-05-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Another round and attempt at getting these down to 0. We really should re-enable the CI and not wait for those cloud based ones. I've disabled the backpack tests on windows as they are too broad, they test as much the shell as they do the compiler. The perf tests have been too long to track down. but the numbers are horrible but I don't see them getting fixed so just have to accept them. T9293 has new windows specific output because a Dyn way only flag was added. This will of course not work on non-Dyn way builds. Test Plan: ./validate Reviewers: bgamari, hvr, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15107 Differential Revision: https://phabricator.haskell.org/D4668
* Correctly add unwinding info in manifestSp and makeFixupBlocksBartosz Nitka2018-05-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | In `manifestSp` the unwind info was before the relevant instruction, not after. I added some notes to establish semantics. Also removes redundant annotation in stg_catch_frame. For `makeFixupBlocks` it looks like we were off by `wORD_SIZE dflags`. I'm not sure why, but it lines up with `manifestSp`. In fact it lines up so well so that I can consolidate the Sp unwind logic in `maybeAddUnwind`. I detected the problems with `makeFixupBlocks` by running T14779b after patching D4559. Test Plan: added a new test Reviewers: bgamari, scpmw, simonmar, erikd Reviewed By: bgamari Subscribers: thomie, carter GHC Trac Issues: #14999 Differential Revision: https://phabricator.haskell.org/D4606
* testsuite: allow accepting of fine grained results [skip ci]Tamar Christina2018-03-311-2/+12
| | | | | | | | | | | | | | | | | | | | | | Summary: Sometimes we need to be able to mass accept changes that are platform specific and that can't be normalized away using our string formatters. e.g. differences in I/O manager errors or behaviors. This allows one to do so easier than before and less error prone. I have updated the docs and made it clear this should only be used when a normalizer won't work: https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Updating Test Plan: Manually tested while working on new I/O manager Reviewers: bgamari Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4549
* Windows: fix all failing tests.Tamar Christina2018-01-021-4/+7
| | | | | | | | | | | | | | | | | | | | | | This makes the testsuite pass clean on Windows again. It also fixes the `libstdc++-6.dll` error harbormaster was showing. I'm marking some tests as isolated tests to reduce their flakiness (mostly concurrency tests) when the test system is under heavy load. Updates process submodule. Test Plan: ./validate Reviewers: hvr, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4277
* Add testcase for #14186Joachim Breitner2017-09-121-0/+13
| | | | | | and move the generally useful helpers check_errmsg and grep_errmsg to testlib.py. Some documentation can be found on https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Adding
* testsuite: Produce JUnit outputBen Gamari2017-07-281-0/+1
| | | | | | | | | | | | Test Plan: Validate, try ingesting into Jenkins. Reviewers: austin Subscribers: rwbarton, thomie GHC Trac Issues: #13716 Differential Revision: https://phabricator.haskell.org/D3796
* testsuite: Pipe stdin directly to processBen Gamari2017-07-201-11/+5
| | | | | | | | | | | | | | Previously the driver would read the stdin content from the source file and then write it to the subprocess' stdin. We now simply open the stdin file and provide that handle to the subprocess as its stdin Test Plan: Validate Reviewers: austin Subscribers: rwbarton, thomie, goldfire Differential Revision: https://phabricator.haskell.org/D3735
* Sort list of failed tests for easier comparison between runsAndreas Klebinger2017-07-111-1/+1
| | | | | | | | | | | | | | Test Plan: Running the testsuite. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13922 Differential Revision: https://phabricator.haskell.org/D3705
* Render \t as 8 spaces in caret diagnosticsPhil Ruffwind2017-05-121-2/+12
| | | | | | | | | | | | | | Test Plan: validate Reviewers: austin, bgamari, rwbarton Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13664 Differential Revision: https://phabricator.haskell.org/D3549
* testsuite/driver: Fix deletion retry logic on WindowsBen Gamari2017-04-241-7/+15
| | | | | | | | | | | | | | | Previously rmtree's error callback would throw an exception, breaking out of the retry loop. Test Plan: Validate on Windows Reviewers: Phyx, austin Reviewed By: Phyx Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3492
* testsuite: Classify missing expected perf numbers as merely warningsBen Gamari2017-04-021-2/+15
| | | | | | Previously these were considered to be framework failures, meaning that validate would fail. For better or worse, Windows lacks a good number of metrics and I don't see this changing any time soon. Let's consider these to be non-fatal.
* array: Clear up inconsistency in T9220 outputBen Gamari2017-04-021-0/+7
| | | | | | | ghc-8.2 and master disagreed on the order of the instances. Normalise this difference away. Updates array submodule.
* testsuite: Move echoing commands in make invocations to VERBOSE=5Reid Barton2017-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | D2894 added a new verbosity level VERBOSE=4 to strip -s/--silent flags from make invocations in test commands. This will probably cause the test to fail of course, but is useful for seeing what a test that's already failing is doing. However there was already an undocumented meaning of VERBOSE=4, added in commit cfeededf, that causes the results of performance tests to be printed unconditionally (even when they are within the expected range). nomeata's ghc builder uses these figures to collect historical data on performance test figures. The new meaning of VERBOSE=4 added in D2894 means that any test that uses make now fails on the builder. This commit moves the new behavior of D2894 to the level VERBOSE=5 so that nomeata's ghc builder again produces useful results on failing tests. It also adds documentation for both settings. Test Plan: did some manual testing Reviewers: austin, bgamari, Phyx, nomeata Reviewed By: bgamari, Phyx Subscribers: nomeata, thomie, Phyx Differential Revision: https://phabricator.haskell.org/D3141
* tests: remove extra_files.py (#12223)Reid Barton2017-02-261-1/+1
| | | | | | | | | | | | The script I used is included as testsuite/driver/kill_extra_files.py, though at this point it is for mostly historical interest. Some of the tests in libraries/hpc relied on extra_files.py, so this commit includes an update to that submodule. One test in libraries/process also relies on extra_files.py, but we cannot update that submodule so easily, so for now we special-case it in the test driver.
* Add delete retry loop. [ci skip]Tamar Christina2017-01-281-14/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: On Windows we have to retry the delete a couple of times. The reason for this is that a `FileDelete` command just marks a file for deletion. The file is really only removed when the last handle to the file is closed. Unfortunately there are a lot of system services that can have a file temporarily opened using a shared readonly lock, such as the built in AV and search indexer. We can't really guarantee that these are all off, so what we can do is whenever after a `rmtree` the folder still exists to try again and wait a bit. Based on what I've seen from the tests on CI server, is that this is relatively rare. So overall we won't be retrying a lot. If after a reasonable amount of time the folder is still locked then abort the current test by throwing an exception, this so it won't fail with an even more cryptic error. The issue is that these services often open a file using `FILE_SHARE_DELETE` permissions. So they can seemingly be removed, and for most intended purposes they are, but recreating the file with the same name will fail as the FS will prevent data loss. The MSDN docs for `DeleteFile` says: ``` The DeleteFile function marks a file for deletion on close. Therefore, the file deletion does not occur until the last handle to the file is closed. Subsequent calls to CreateFile to open the file fail with ERROR_ACCESS_DENIED. ``` Retrying seems to be a common pattern, SQLite has it in their driver http://www.sqlite.org/src/info/89f1848d7f The only way to avoid this is to run each way of a test in it's own folder. This would also have the added bonus of increased parallelism. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2936 GHC Trac Issues: #12661, #13162
* testsuite driver: don't append to existing output filesReid Barton2017-01-101-2/+2
| | | | | | | | | | | | | | | | | | | If you happen to have a T1234.run.stdout file lying aroud (probably from before the move to running tests in temporary subdirectories) it gets symlinked into the T1234.run directory since its name starts with T1234; and then program output gets appended to the existing file (through the symlink). We should open the file for writing instead, to replace the symlink with a new file. Test Plan: tested locally, + harbormaster Reviewers: austin, Phyx, bgamari Reviewed By: Phyx, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2946
* Fix various issues with testsuite code on WindowsTamar Christina2016-12-281-36/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously we would make direct calls to `diff` using `os.system`. On Windows `os.system` is implemented using the standard idiom `CreateProcess .. WaitForSingleObject ..`. This again runs afoul with the `_exec` behaviour on Windows. So we ran into some trouble where sometimes `diff` would return before it's done. On tests which run multiple ways, such as `8086` what happens is that we think the diff is done and continue. The next way tries to set things up again by removing any previous directory. This would then fail with and error saying the directory can't be removed. Which is true, because the previous diff code/child is still running. We shouldn't make any external calls to anything using `os.system`. Instead just use `runCmd` which uses `timeout`. This also ensures that if we hit the cygwin bug where diff or any other utility hangs, we kill it and continue and not hang the entire test and leave hanging processes. Further more we also: Ignore error lines from `removeFile` from tools in the testsuite. This is a rather large hammer to work around the fact that `hsc2hs` often tries to remove it's own file too early. When this is patched the workaround can be removed. See Trac #9775 We mark `prog003` as skip. Since this test randomly fails and passes. For stability it's disabled but it is a genuine bug which we should find. It's something with interface files being overwritten. See Trac #11317 when `rmtree` hits a readonly file, the `onerror` handler is raised afterwards but not during the tree walk. It doesn't allow you to recover and continue as we thought. Instead you have to explicitly start again. This is why sometimes even though we call `cleanup` before `os.mkdirs`, it would sometimes fail with an error that the folder already exists. So we now do a second walk. A new verbosity level (4) will strip the silent flags from `MAKE` invocations so you can actually see what's going on. Test Plan: ./validate on build bots. Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: mpickering, thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2894 GHC Trac Issues: #12661, #11317, #9775
* Fix typos (not test relevant)Gabor Greif2016-12-211-1/+1
|
* testsuite: make tests respond to SIGINT properlyPhil Ruffwind2016-12-091-13/+9
| | | | | | | | | | | | | | | | | The `std*_buffer` need to be bytes to avoid breaking Python 3. Also, using a blanket `except` in Python without specifying the exception types will catch special exceptions such as `KeyboardInterrupt`, which can prevent the program from being interrupted properly. Test Plan: validate Reviewers: thomie, austin, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D2805
* testsuite: Remove Unicode literals from driverBen Gamari2016-12-011-12/+12
| | | | | | | | | | | | | | | They are not supported by Python 3.0, 3.1, and 3.2 (but are supported by >= 3.3; silliness!) Test Plan: Validate on python 3.2 Reviewers: austin Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2778 GHC Trac Issues: #12909, #9184
* Fix testsuite threading, timeout, encoding and performance issues on WindowsTamar Christina2016-11-291-79/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Typos in commentsGabor Greif2016-11-251-1/+1
|
* testsuite: Rip out hack for #12554Ben Gamari2016-11-171-24/+1
| | | | | | | | | | | | | | | | | @Phyx is working on correctly fixing (pun intended) the underlying issue that prompted this hack. It turns out that `timeout` it the culprit. Moreover, this hack breaks on msys python builds, which don't export `WindowsError`. Test Plan: Validate on Windows with `msys` python. Reviewers: Phyx, austin Subscribers: thomie, Phyx Differential Revision: https://phabricator.haskell.org/D2724 GHC Trac Issues: #12554
* testsuite/driver: More Unicode awarenessBen Gamari2016-10-171-9/+9
| | | | | | | | | | | | | Explicitly specify utf8 encoding in a few spots which were failing on Windows with Python 3. Test Plan: Validate Reviewers: austin, thomie Differential Revision: https://phabricator.haskell.org/D2602 GHC Trac Issues: #9184
* testsuite: Work around #12554Ben Gamari2016-10-171-2/+42
| | | | | | | | | | | | | | | | It seems that Python 2.7.11 and "recent" msys2 releases are broken, holding open file locks unexpected. This causes rmtree to intermittently fail. Even worse, it would fail silently (since we pass ignore_errors=True), causing makedirs to fail later. We now explicitly check for the existence of the test directory before attempting to delete it and disable ignore_errors. Moreover, on Windows we now try multiple times to rmtree the testdir, working around the apparently msys bug. This is all just terrible, but Phyx and I spent several hours trying to track down the issue to no available. The workaround is better than nothing.
* The Backpack patch.Edward Z. Yang2016-10-081-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements Backpack for GHC. It's a big patch but I've tried quite hard to keep things, by-in-large, self-contained. The user facing specification for Backpack can be found at: https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst A guide to the implementation can be found at: https://github.com/ezyang/ghc-proposals/blob/backpack-impl/proposals/0000-backpack-impl.rst Has a submodule update for Cabal, as well as a submodule update for filepath to handle more strict checking of cabal-version. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, simonmar, bgamari, goldfire Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D1482
* Testsuite: do not depend on sys.stdout.encodingThomas Miedema2016-06-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cause of #12213 is in dump_stdout and dump_stderr: print(read_no_crs(<filename>)) Commit 6f6f515401a29d26eaa5daae308b8e700abd4c04 changed read_no_crs to return a unicode string. Printing a unicode strings works fine as long as sys.stdout.encoding is 'UTF-8'. There are two reasons why sys.stdout.encoding might not be 'UTF-8'. * When output is going to a file, sys.stdout and sys.stdout do not respect the locale: $ LC_ALL=en_US.utf8 python -c 'import sys; print(sys.stderr.encoding)' UTF-8 $ LC_ALL=en_US.utf8 python -c 'import sys; print(sys.stderr.encoding)' 2>/dev/null None * When output is going to the terminal, explicitly reopening sys.stdout has the side-effect of changing sys.stdout.encoding from 'UTF-8' to 'None'. sys.stdout = os.fdopen(sys.__stdout__.fileno(), "w", 0) We currently do this to set a buffersize of 0 (the actual buffersize used is irrelevant for the sys.stdout.encoding problem). Solution: fix dump_stdout and dump_stderr to not use read_no_crs.
* Testsuite: use ignore_stderr/stdout instead of ignore_outputThomas Miedema2016-06-291-22/+27
| | | | | | | | | | | | | | | | | The problem with ignore_output is that it hides errors for WAY=ghci. GHCi always returns with exit code 0 (unless it is broken itself). For example: ghci015 must have been failing with compile errors for years, but we didn't notice because all output was ignored. Therefore, replace all uses of ignore_output with either ignore_stderr or ignore_stdout. In some cases I opted for adding the expected output. Update submodule hpc and stm. Reviewed by: simonmar Differential Revision: https://phabricator.haskell.org/D2367
* Testsuite: fixes for python2.6 supportThomas Miedema2016-06-291-3/+3
|
* Testsuite: framework failure improvements (#11165)Thomas Miedema2016-06-281-2/+5
| | | | | | * add framework failures to unexpected results list * report errors in .T files as framework failures (show in summary) * don't report missing tests when framework failures in .T files
* Testsuite: cleanup printing of summaryThomas Miedema2016-06-281-123/+41
| | | | | | Just use a simple list of tuples, instead of a nested map. -90 lines of code.
* Testsuite: open/close stdin/stdout/stderr explicitlyThomas Miedema2016-06-281-75/+62
| | | | | | | | | | | | | | | | | | This allows run_command's to contain `|`, and `no_stdin` isn't necessary anymore. Unfortunately it doesn't fix T7037 on Windows which I had hoped it would (testsuite driver tries to read a file that it just created itself, but the OS says it doesn't exist). The only drawback of this commit is that the command that the testsuite prints to the terminal (for debugging purposes) doesn't mention the files that stdout and stderr are redirected to anymore. This is probably ok. Update submodule unix. Differential Revision: https://phabricator.haskell.org/D1234