Commit Graph

12 Commits

Author SHA1 Message Date
metagn
660a9cecf0 add retries to testament, use it for GC tests (#24279)
Testament now retries a test by a specified amount if it fails in any
way other than an invalid spec. This is to deal with the flaky GC tests
on Windows CI that fail in many different ways, from the linker randomly
erroring, segfaults, etc.

Unfortunately I couldn't do this cleanly in testament's current code.
The proc `addResult`, which is the "final" proc called in a test run's
lifetime, is now wrapped in a proc `finishTest` that returns a bool
`true` if the test failed and has to be retried. This result is
propagated up from `cmpMsgs` and `compilerOutputTests` until it reaches
`testSpecHelper`, which handles these results by recursing if the test
has to be retried. Since calling `testSpecHelper` means "run this test
with one given configuration", this means every single matrix
option/target etc. receive an equal amount of retries each.

The result of `finishTest` is ignored in cases where it's known that it
won't be retried due to passing, being skipped, having an invalid spec
etc. It's also ignored in `testNimblePackages` because it's not
necessary for those specific tests yet and similar retry behavior is
already implemented for part of it.

This was a last resort for the flaky GC tests but they've been a problem
for years at this point, they give us more work to do and turn off
contributors. Ideally GC tests failing should mark as "needs review" in
the CI rather than "failed" but I don't know if Github supports
something like this.

(cherry picked from commit 720d0aee5c)
2025-01-14 07:35:50 +01:00
Timothee Cour
4e0f38fbb1 testament :show duration also for failed tests; improve tshould_not_work; mitigate #17946 tchannels timeouts (#17947)
* refs #17946; refactor testament test summary, show test duration for failures; increase timeout tchannels

* revert workarounds from https://github.com/nim-lang/Nim/pull/16698 and add allowPrefixMatch optional param to greedyOrderedSubsetLines

* add test

* workaround for yet another testament bug
2021-05-08 17:13:47 +02:00
Timothee Cour
d4850b524f fix tsortoutput (it was failing for the wrong reasons, irrespective of sortoutput (#17969) 2021-05-07 20:07:54 -07:00
Timothee Cour
a236002e54 testament: add nimoutFull: bool spec (#17867)
* testament: add `nimoutFull: bool` spec
* PRTEMP
* works
* cleanup
* add test for #12741
* PRTEMP failing test
* remove unrelated changes
* changelog
2021-04-27 11:11:28 +02:00
flywind
70a30317f7 fix #16693: testament spec nimout too lax (#16698)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-04 13:47:28 -07:00
flywind
da28df6113 remove deprecated specs (#16684) 2021-01-11 18:02:53 +01:00
Timothee Cour
31a8cf16bb testament spec: remove errmsg alias of errormsg (#16188) 2020-11-29 17:32:34 -08:00
n5m
066f3ebc2a add tests for Testament "reject" action (#15709)
* add test for reject action

* highlight that a compilation failure is expected

* add the converse test for action=reject

* add trailing newline

* fix wording
2020-10-27 08:48:14 +01:00
n5m
8da0e01769 expect valgrind test failure on memory leak (#15669)
* expect valgrind test failure on memory leak

* alloc 1 instead of 0
2020-10-22 11:25:11 +02:00
Araq
c9f3a8b269 added a testcase for #12195; testament now supports a 'timeout' spec field 2019-09-17 15:15:12 +02:00
Arne Döring
fb1f5c62b5 tshouldfail is stricter 2018-12-11 21:23:21 +01:00
Arne Döring
cc0364e72f Tester tests (#9787)
* remove --lib:lib
* added some tests for testatment
* tests are addad WIP: add colors switch to tester
* meta tester is integrated
2018-11-27 10:00:32 +01:00