Commit Graph

96 Commits

Author SHA1 Message Date
Gerwin Klein 2a1fc75e6f regression: tool for comparing session times
This adds a small script that parses two run_tests logs for session
times and compares them.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-13 13:35:24 +10:00
Gerwin Klein 28bc26c925 isabelle-2021: HOL-Word now in HOL-Library
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-09-30 16:53:17 +10:00
Gerwin Klein 115b12f1e2 run_tests: flush output
On GitHub, the output of external processes such as isabelle overtake
the stdout/stderr output of the test driver. Flushing stdout/stderr
in the right spots avoids that.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-15 13:53:14 +10:00
Gerwin Klein 0ac43566d7 run_tests.py: use colour on github
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-15 13:53:14 +10:00
Gerwin Klein 92cdf47946 runtests.py: nicer logs on GitHub
Add a folding group for verbose log output if running in a GitHub
context. GITHUB_REPOSITORY will be set for all GitHub contexts we're
interested in.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-13 21:28:21 +10:00
Matthew Brecknell 9cf8de9b95 regression: use `python3` for tests-xml-correct
PEP 394 expects that Python 3 installations provide a `python3` command,
but does not require a `python` command. Some distributions (including
Debian) are no longer providing a `python` command, but do provide
`python3`.

In this change, the `python3` interpreter is invoked via the existing
`#!` line in the `testspec.py` script.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2020-10-21 11:57:30 +11:00
Gerwin Klein b7525f8d43 misc: make memusage.py not crash on MacOS for newer psutil versions
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-05-12 16:58:46 +08:00
Amirreza Zarrabi 3bb212bb75 run_tests.py: fix for python3
The decode method is only valid for bytes in python3

Signed-off-by: Amirreza Zarrabi <amrzar@gmail.com>
2020-04-21 15:53:44 +10:00
Matthew Brecknell cf48906b26 regression: force use of python3
Python 2 has passed its sunset date, and many distributions are
withdrawing support for Python 2.

PEP 394 recommends distributions always install versioned interpreter
commands (e.g. `python3`), but does not make a recommendation about
whether or not an unversioned command (`python`) should exist, or what
version it should run.

It therefore seems advisable to explicitly run scripts using the
`python3` command, for scripts that are compatible with Python 3.

Here, we do this for Python scripts used by `run_tests`. For this to
work, some scripts have been updated in ways that will break Python 2
compatibility. But for some other scripts which were already compatible
with both Python 2 and 3, we have not yet removed Python 2
compatibility. There are also miscellaneous scripts that are not used by
`run_tests`, and these have not yet been updated to Python 3.

Signed-off-by: Matthew Brecknell <Matthew.Brecknell@data61.csiro.au>
2020-04-01 14:31:36 +11:00
Gerwin Klein 75acf19dcd style: pep8 style for python files 2020-03-25 22:42:27 +11:00
Gerwin Klein a424d55e3e licenses: convert license tags to SPDX 2020-03-13 14:38:24 +08:00
Japheth Lim 9fa4dece6b run_tests: add --dot option to print test dependency graph 2018-09-27 15:03:17 +10:00
Japheth Lim a837d38012 regression: better messages for nonexistent tests 2018-06-15 11:23:57 +10:00
Japheth Lim a70475ac99 regression: support using --remove with test selection; refactoring 2018-06-14 20:42:30 +10:00
Japheth Lim 06027b6841 regression: clarify behaviour of --exclude vs. --remove 2018-06-13 17:28:35 +10:00
Japheth Lim 3ae4d6577d regression: add --scale-timeouts and --no-timeouts options
These are being added to support builds that turn on extra debugging
or measurement options in Isabelle, which slow the builds down.
Might also be useful for running tests on very slow machines.
2018-06-01 15:19:37 +10:00
Thomas Sewell 5fb1fcdf80 run_tests: dry run mode.
The run_tests script already has a -l/--list option to list all tests.
This adds a -L/--dry-run option to list the requested tests, which makes it
easier to figure out what tests -r/-x etc would select.

Also clarify in --help that -v adds more info to -l.
2018-03-15 14:31:45 +11:00
Rafal Kolanski 623f216d94 regression: meta-regression improvements for timeout_output
- timeout_output looks for isabelle relative to its file path
- run_tests looks for timeout_output relative to its file path
- output from timeout_output is utf8-decoded before attempting to
  concatenate with other strings

Meta-regression should now pass.
2018-01-23 13:27:48 +11:00
Thomas Sewell 77837d16ac Fix for python3 in run_tests.py.
We require run_tests.py to work with both python2 and python3, which requires
particular syntax for exception handling.
2018-01-23 11:48:11 +11:00
Thomas Sewell 18cf880573 run_tests: Create and fetch timing/timeout info. 2018-01-22 12:04:08 +11:00
Matthew Brecknell ae91c097d4 regression: ignore undefined tests in `run_tests.py -r ...`
The run_tests wrapper explicitly excludes any tests which are known to
fail on certain L4V_ARCH settings. The list of excluded tests includes
some tests which are only defined in private/internal repositories.

Recent changes to run_tests.py and testspec.py assumed that tests
excluded using `run_tests.py -r ...` would be defined in tests.xml
files. This caused regression to fail when performed with only
publicly-available repositories.

This change allows use of the `run_tests.py -r ...` option with test
names that are not defined in any tests.xml files.

tags: [NO_PROOF]
2017-09-07 15:01:34 +10:00
Matthew Brecknell 43f95c8a09 regression: collect more dependency information 2017-08-21 17:49:45 +10:00
Matthew Brecknell e0e8a0a20b regression: refactor tests.xml parser 2017-08-21 17:49:45 +10:00
Matthew Brecknell c03548d9a8 regression: always parse tests.xml strictly 2017-08-21 17:15:34 +10:00
Matthew Brecknell 064c8b0718 regression: remove legacy run_tests options 2017-08-21 17:15:34 +10:00
Matthew Brecknell 2a2b3b9cbe regression: clean up testspec and run_tests.py 2017-08-21 17:15:34 +10:00
Alejandro Gomez-Londono 4671d2615a test: run_tests.py now prints a warning when excluding unknown tests (with [-x] [-r])
* This allows mentioning internal tests in exclusion lists without
    breaking external (github) builds

    tags: [NO_PROOF]
2017-06-26 15:21:06 +10:00
Alejandro Gomez-Londono 74500bd829 arm-hyp test: Adding exclusion test set for ARM_HYP + cleanup 2017-06-19 14:32:43 +10:00
Alejandro Gomez-Londono ee71ad77a0 arm-hyp test: Fix race condition between isabelle and isabelle_ARM 2017-06-19 14:32:24 +10:00
Alejandro Gomez-Londono 4a76aec383 arm-hyp test: Fix race condition between ARM tests 2017-06-19 14:32:24 +10:00
Thomas Sewell 68e22b2d14 Slightly reduce run_tests.py CPU usage.
The watch_kill_switch loop was pretty busy, adding a simple
timeout reduces CPU consumption.

The CPU consumption of run_tests.py is still higher than I'd expect
to just update a terminal, but I don't know where to investigate
further.
2016-11-02 11:19:10 +11:00
Matthew Brecknell 0212696e60 VER-643: make regression compatible with psutil 4.1.0+
At version 4.1.0, the Python psutil package changed the way it reports
CPU times for processes. This commit ensures that regression tests are
compatible with both old and new psutil APIs.
2016-10-07 09:23:20 +11:00
Alejandro Gomez-Londono 0c29567bb2 Regression: re-applying [094fb48623] to fix run_tests.py
The changes on [094fb48623] where (for some weird reason) removed from
run_tests.py in the last update, this commit merely re-apply those
changes.
2016-08-29 17:08:34 +10:00
Thomas Sewell 8b2818299a Read extra_tests as relative to dir it is in. 2016-08-26 16:59:27 +10:00
Thomas Sewell 37efb6326a Have run_tests see an extra_tests special file.
The run_tests.py script already searches the directory for all
test.xml files. It will now also note any files named extra_tests,
and also search any directories which appear as lines of those
files.

(Following symlinks would been more obvious but create other issues.)
2016-08-26 16:59:27 +10:00
Alejandro Gomez-Londono ef99749ee1 Regression: Added RUN_TESTS_DEFAULT for overwriting the default test set
It is sometimes desirable to overwrite the default set of tests that are
being run in a per execution basis (ex: to allow wrapper scripts to have
a custom default) RUN_TESTS_DEFAULT is an space separated list of tests
that will be run if no specific tests are given.

  tags: [NO_PROOF]
2016-08-24 13:23:33 +10:00
Gerwin Klein 445efb7c29 lib: closure for Word_Lib and own session 2016-05-16 21:11:40 +10:00
Alejandro Gomez-Londono 094fb48623 VER-525: run_tests handles dependencies incorrect (solved) 2016-05-10 14:15:32 +10:00
Japheth Lim 10d3a0d6fb regression: add Word to "isabelle" test so other tests don't try to build it in parallel. 2016-04-14 21:20:23 +10:00
Japheth Lim 4c89da8b0c regression: restore Python 3 compat. 2016-02-25 11:44:49 +11:00
Japheth Lim 66e94dcf76 regression: decode test output as UTF-8, not ASCII. 2016-02-19 12:00:03 +11:00
Japheth Lim b1ba5037c4 regression: compatibility fix for very old versions of bash (Mac OS). 2016-02-17 14:59:42 +11:00
Japheth Lim 63f1a0854a regression: add --grace-period option to allow tests to clean up. 2016-02-17 11:19:13 +11:00
Japheth Lim ec49042ec8 regression: fix bug in -x (from 5c776152b). 2016-02-05 12:16:21 +11:00
Japheth Lim 5c776152b3 regression: add -x option to exclude tests from running. 2016-02-04 15:22:39 +11:00
Japheth Lim 404b779e21 regression: add --fail-fast option; refactor stringly typed code. 2016-02-03 17:44:12 +11:00
Japheth Lim e409f357e9 trivial: regression: fix comment about floating-point discrepancy. 2016-02-03 14:22:01 +11:00
Japheth Lim 2f94189c7b regression: detect builds that get stuck without using CPU.
Such builds would have bypassed the cpu-timeout test settings
but can now be detected and killed.
2016-02-02 17:58:19 +11:00
Japheth Lim 253b04f6d9 regression: use CPU instead of real-time timeouts for all tests.
Also update and clarify test spec documentation.
2016-02-01 19:51:13 +11:00
Japheth Lim 0001e839bc regression: fix floating-point rounding that would fail the CPU monotonicity check. 2016-02-01 16:47:28 +11:00