summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
Commit message (Collapse)AuthorAgeFilesLines
...
* testsuite: Factor out terminal coloringBen Gamari2019-12-051-11/+10
|
* Fix typos, using Wikipedia list of common typosBrian Wignall2019-11-281-1/+1
|
* testsuite: don't collect compiler stats in collect_runtime_residencyAlp Mestanogullari2019-11-121-1/+1
| | | | | | | | | | | | | | | | | | | We instead want to collect the runtime stats (with collect_stats, instead of collect_compiler_stats). This should fix a number of perf tests failures we have been seeing, where we suddenly started measuring metrics we didn't intend to measure, which tend to fall outside of the acceptance window. Metric Decrease: lazy-bs-alloc T3586 Metric Increase: space_leak_001 T4801 T5835 T12791
* testsuite: Don't check_stats at runtime if not requestedwip/T17387Ben Gamari2019-11-101-4/+9
| | | | | | Previously we would call check_stats to check the runtime metrics even if the test definition hadn't requested it. This would result in an error since the .stats file doesn't exist.
* testsuite: Use small allocation area when measuring residencyBen Gamari2019-11-101-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | As suggested in #17387; this helps reduce the variance in our residency sampling. Metric Increase: T10370 T3586 lazy-bs-alloc Metric Decrease 'compile_time/peak_megabytes_allocated': T1969 Metric Decrease 'runtime/bytes allocated': space_leak_001 Metric Increase 'compile_time/bytes allocated': T1969 Metric Increase 'runtime/peak_megabytes_allocated': space_leak_001 Metric Decrease: T3064 T9675
* testsuite: Fix Windows cleanup pathBen Gamari2019-11-091-2/+2
| | | | This was a regression introduced with the Path refactoring.
* Testsuite: Introduce req_rts_linkerStefan Schulze Frielinghaus2019-11-081-0/+4
| | | | | Some tests depend on the RTS linker. Introduce a modifier to skip such tests, in case the RTS linker is not available.
* CI: Always dump performance metrics.David Eichmann2019-10-221-3/+3
|
* testsuite: Assert that testsuite ways are knownBen Gamari2019-10-171-28/+49
| | | | | This ensures that all testsuite way names given to `omit_ways`, `only_ways`, etc. are known ways.
* testsuite: Ensure that makefile tests get runBen Gamari2019-10-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously `makefile_test` and `run_command` tests could easily end up in a situation where they wouldn't be run if the user used the `only_ways` modifier. The reason is to build the set of a ways to run the test in we first start with a candidate set determined by the test type (e.g. `makefile_test`, `compile_run`, etc.) and then filter that set with the constraints given by the test's modifiers. `makefile_test` and `run_command` tests' candidate sets were simply `{normal}`, and consequently most uses of `only_ways` would result in the test being never run. To avoid this we rather use all ways as the candidate sets for these test types. This may result in a few more testcases than we would like (given that some `run_command` tests are insensitive to way) but this can be fixed by adding modifiers and we would much rather run too many tests than too few. This fixes #16042 and a number of other tests afflicted by the same issue. However, there were a few cases that required special attention: * `T14028` is currently failing and is therefore marked as broken due to #17300 * `T-signals-child` is fragile in the `threaded1` and `threaded2` ways (tracked in #17307)
* Use os.devnull instead of '/dev/null' in the testsuite driver.Andreas Klebinger2019-08-141-4/+26
| | | | | | | | | | | | The later caused issues on windows by being translated into "\\dev\\null" and python then trying to open this non-existant file. So we now use os.devnull inside python and convert it to "/dev/null" when calling out to the shell, which is bound to run in a unix like environment. This fixes an issue a test producing unexpected stderr output failed with a framework failure instead of showing a diff of the output.
* testsuite: Rework tracking of fragile testsBen Gamari2019-08-041-5/+14
| | | | | Breaks fragile tests into two groups, allowing us to easily preserve stdout/stderr of failing fragile tests.
* testsuite: Fix some ints used as boolsBen Gamari2019-07-181-10/+10
|
* testsuite: Print output from hp2psBen Gamari2019-07-181-1/+1
|
* testsuite: Fix req_thBen Gamari2019-07-181-1/+2
|
* testsuite: More type checking fixesBen Gamari2019-07-181-59/+112
|
* Testsuite tweaks and refactoringÖmer Sinan Ağacan2019-07-091-8/+10
| | | | | | | | | | | | | | | | - Rename requires_th to req_th for consistency with other req functions (e.g. req_interp, req_profiling etc.) - req_th (previously requires_th) now checks for interpreter (via req_interp). With this running TH tests are skipped when running the test suite with stage=1. - Test tweaks: - T9360a, T9360b: Use req_interp - recomp009, T13938, RAE_T32a: Use req_th - Fix check-makefiles linter: it now looks for Makefiles instead of .T files (which are actually Python files)
* testsuite: Fix #16818Ben Gamari2019-07-091-3/+10
| | | | | Renames performance metrics to include whether they are compile-time or runtime metrics.
* testsuite: Run and report on fragile testsBen Gamari2019-06-261-8/+17
| | | | | | This allows us to run (but ignore the result of) fragile testcases. Hopefully this should allow us to more easily spot when a fragile test becomes un-fragile.
* testsuite: A major revamp of the driverBen Gamari2019-06-251-283/+324
| | | | | | | | | This tries to put the testsuite driver into a slightly more maintainable condition: * Add type annotations where easily done * Use pathlib.Path instead of str paths * Make it pass the mypy typechecker
* testsuite: Add assertions that way lists are in fact listsBen Gamari2019-06-151-0/+6
| | | | | | Previously there were a few cases where operations like `omit_ways` were incorrectly passed a single way (e.g. `omit_ways('threaded2')`). This won't work as the author expected.
* testsuite: Don't run tests requiring TH in profasm way when GhcDynamicBen Gamari2019-06-121-0/+8
| | | | | | | | | | Since we can't load profiled objects when GhcDynamic==YES. Affects: * T16737 * T16384 * T16718 * T16619 * T16190
* testsuite: Fix omit_ways usageBen Gamari2019-06-121-0/+1
| | | | omit_ways expects a list but this was broken in several cases.
* testsuite: Fix fragile_for test modifierBen Gamari2019-06-121-3/+3
|
* TestRunner: Added --chart to display a chart of performance testsDavid Eichmann2019-06-041-4/+1
| | | | | | | | | | | | | This uses the Chart.js javascript library. Everything is put into a standalone .html file and opened with the default browser. I also simplified the text output to use the same data as the chart. You can now use a commit range with git's ".." syntax. The --ci option will use results from CI (you'll need to fetch them first): $ git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/ci/perf $ python3 testsuite/driver/perf_notes.py --ci --chart --test-env x86_64-darwin --test-name T9630 master~500..master
* testsuite: introduce 'static_stats' testsAlp Mestanogullari2019-05-291-5/+11
| | | | | | | | | | | | | | | | They are a particular type of perf tests. This patch introduces a 'stats_files_dir' configuration field in the testsuite driver where all haddock timing files (and possibly others in the future) are assumed to live. We also change both the Make and Hadrian build systems to pass respectively $(TOP)/testsuite/tests/perf/haddock/ and <build root>/stage1/haddock-timing-files/ as the value of that new configuration field, and to generate the timing files in those directories in the first place while generating documentation with haddock. This new test type can be seen as one dedicated to examining stats files that are generated while building a GHC distribution. This also lets us get rid of the 'extra_files' directives in the all.T entries for haddock.base, haddock.Cabal and haddock.compiler.
* Update terminal title while running test-suiteOleg Grenrus2019-05-141-3/+9
| | | | | Useful progress indicator even when `make test VERBOSE=1`, and when you do something else, but have terminal title visible.
* codegen: fix memset unroll for small bytearrays, add 64-bit setsArtem Pyanykh2019-04-091-2/+57
| | | | | | | | | | | | | | | | | | | | | | Fixes #16052 When the offset in `setByteArray#` is statically known, we can provide better alignment guarantees then just 1 byte. Also, memset can now do 64-bit wide sets. The current memset intrinsic is not optimal however and can be improved for the case when we know that we deal with (baseAddress at known alignment) + offset For instance, on 64-bit `setByteArray# s 1# 23# 0#` given that bytearray is 8 bytes aligned could be unrolled into `movb, movw, movl, movq, movq`; but currently it is `movb x23` since alignment of 1 is all we can embed into MO_Memset op.
* testsuite: Show exit code of GHCi tests on failureÖmer Sinan Ağacan2019-04-081-1/+1
|
* Print test suite results ("unexpected failures" etc.) in sorted orderÖmer Sinan Ağacan2019-03-201-1/+1
| | | | Fixes #16425
* testsuite: Display observed exit code on failure due to bad exit codeBen Gamari2019-03-201-1/+1
|
* Update Trac ticket URLs to point to GitLabRyan Scott2019-03-151-2/+2
| | | | | This moves all URL references to Trac tickets to their corresponding GitLab counterparts.
* testsuite: Introduce fragile modifierBen Gamari2019-03-061-0/+24
| | | | | | | | | | Now since we have been a bit more stringent in testsuite cleanliness we have been marking a lot of tests as fragile using the `skip` modifier. However, this unfortunately means that we lose the association with the ticket number documenting the fragility. Here we introduce `fragile` and `fragile_for` to retain this information.
* testsuite: Fix whitespace in hp2ps error messageBen Gamari2019-02-231-1/+1
|
* Exit with exit code 1 when tests unexpectedly passMatthew Pickering2019-02-231-0/+1
| | | | | | This was causing gitlab to not report from builds as failing. It also highlighted a problem with the LLVM tests where some of the external interpreter tests are failing.
* Fix test runner crash when not in a git repoDavid Eichmann2019-02-211-2/+3
| | | | Respect `inside_git_repo()` when checking performance stats.
* Testsuite: implement use_specs.Tamar Christina2019-02-171-0/+26
|
* Fix and Reapply "Performance tests: recover a baseline from ancestor commits ↵David Eichmann2019-02-161-43/+27
| | | | and CI results."
* testsuite: Report stdout and stderr in JUnit outputBen Gamari2019-02-101-21/+37
| | | | | | | | | | This patch makes the JUnit output more useful as now we also report the stdout/stderr in the message which can be used to quickly identify why a test is failing without downloading the log. This also introduces TestResult, previously we were simply passing around tuples, making things the implementation rather difficult to follow and harder to extend.
* testsuite: Mark print037 as broken when GHC is built with LLVMBen Gamari2019-02-041-0/+9
| | | | As noted in #16205 this configuration reliably segfaults.
* Revert "Performance tests: recover a baseline from ancestor commits and CI ↵Ben Gamari2019-01-311-26/+43
| | | | | | | | | results." Unfortunately this has broken all future commits due to spurious(?) performance changes which I have been unable to work around. This reverts commit cc2261d42f6a954d88e355aaad41f001f65c95da.
* Performance tests: recover a baseline from ancestor commits and CI results.David Eichmann2019-01-301-43/+26
| | | | gitlab-ci: push performance metrics as git notes to the "GHC Performance Notes" repository.
* testsuite: Use makefile_testBen Gamari2019-01-301-1/+1
| | | | | This eliminates most uses of run_command in the testsuite in favor of the more structured makefile_test.
* testsuite: Introduce makefile_testBen Gamari2019-01-301-0/+7
|
* Revert "Batch merge"Ben Gamari2019-01-301-34/+44
| | | | This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.
* Batch mergeBen Gamari2019-01-301-44/+34
|
* testsuite: Remove directories that already exist when seeding extra_filesBen Gamari2019-01-271-0/+2
| | | | | Otherwise the testsuite driver crashes when run multiple times with CLEANUP=NO on a test containing such extra_files.
* testsuite: Add predicate for CPU feature availabilityBen Gamari2019-01-271-0/+1
| | | | | | | Previously testing code-generation for ISA extensions was nearly impossible since we had no ability to determine whether the host supports the needed extension. Here we fix this by introducing a simple /proc/cpuinfo-based testsuite predicate. We really ought to
* Fix tests for `integer-simple`Alec Theriault2019-01-161-3/+0
| | | | | | | | | | | | A bunch of tests for `integer-simple` were now broken for a foolish reason: unlike the `integer-gmp` case, there is no CorePrep optimization for turning small integers directly into applications of `S#`. Rather than port this optimization to `integer-simple` (which would involve moving a bunch of `integer-simple` names into `PrelNames`), I switched as many tests as possible to use `Int`. The printing of `Integer` is already tested in `print037`.
* Introduce NCG config flag and add helperGabor Greif2018-12-301-1/+4
| | | | | | | ... for testing presence of NCG This commit adds a criterion for checking whether we can expect sensible output from --ddump-asm.