diff options
author | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2020-06-26 17:22:15 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-02 23:45:06 -0500 |
commit | 4ce2f7d6e6a516173750b1d740f345e90992ffce (patch) | |
tree | a85194834b11e035e2cbb14da3f1cbfe474b4d68 /testsuite/driver/runtests.py | |
parent | e63db32c7eb089985a1a7279a0a886a32d70ac0e (diff) | |
download | haskell-4ce2f7d6e6a516173750b1d740f345e90992ffce.tar.gz |
testsuite: Add --top flag to driver
This allows us to make `config.top` a proper Path. Previously it was a
str, which caused the Ghostscript detection logic to break.
Diffstat (limited to 'testsuite/driver/runtests.py')
-rw-r--r-- | testsuite/driver/runtests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index 591f9f5be9..6151e5e9ca 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -14,6 +14,7 @@ import tempfile import time import re import traceback +from pathlib import Path # We don't actually need subprocess in runtests.py, but: # * We do need it in testlibs.py @@ -56,6 +57,7 @@ parser = argparse.ArgumentParser(description="GHC's testsuite driver") perf_group = parser.add_mutually_exclusive_group() parser.add_argument("-e", action='append', help="A string to execute from the command line.") +parser.add_argument("--top", type=Path, help="path to top of testsuite/ tree") parser.add_argument("--config-file", action="append", help="config file") parser.add_argument("--config", action='append', help="config field") parser.add_argument("--rootdir", action='append', help="root of tree containing tests (default: .)") @@ -104,6 +106,9 @@ config.summary_file = args.summary_file config.no_print_summary = args.no_print_summary config.baseline_commit = args.perf_baseline +if args.top: + config.top = args.top + if args.only: config.only = args.only config.run_only_some_tests = True @@ -277,7 +282,7 @@ testopts_local.x = TestOptions() # if timeout == -1 then we try to calculate a sensible value if config.timeout == -1: - config.timeout = int(read_no_crs(config.top + '/timeout/calibrate.out')) + config.timeout = int(read_no_crs(config.top / 'timeout' / 'calibrate.out')) print('Timeout is ' + str(config.timeout)) print('Known ways: ' + ', '.join(config.other_ways)) |