[Git][ghc/ghc][master] testsuite: Remove unused have_library function
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sat Jan 20 02:55:42 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
3ef71669 by Matthew Pickering at 2024-01-19T21:55:16-05:00
testsuite: Remove unused have_library function
Also remove the hence unused testsuite option `--test-package-db`.
Fixes #24342
- - - - -
4 changed files:
- testsuite/driver/runtests.py
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/mk/test.mk
Changes:
=====================================
testsuite/driver/runtests.py
=====================================
@@ -82,7 +82,6 @@ parser.add_argument("--junit", type=argparse.FileType('wb'), help="output testsu
parser.add_argument("--broken-test", action="append", default=[], help="a test name to mark as broken for this run")
parser.add_argument("--test-env", default='local', help="Override default chosen test-env.")
parser.add_argument("--perf-baseline", type=GitRef, metavar='COMMIT', help="Baseline commit for performance comparsons.")
-parser.add_argument("--test-package-db", dest="test_package_db", action="append", help="Package db providing optional packages used by the testsuite.")
perf_group.add_argument("--skip-perf-tests", action="store_true", help="skip performance tests")
perf_group.add_argument("--only-perf-tests", action="store_true", help="Only do performance tests")
parser.add_argument("--ignore-perf-failures", choices=['increases','decreases','all'],
@@ -124,9 +123,6 @@ config.target_wrapper = args.target_wrapper
if args.top:
config.top = args.top
-if args.test_package_db:
- config.test_package_db = args.test_package_db
-
if args.unexpected_output_dir:
config.unexpected_output_dir = Path(args.unexpected_output_dir)
=====================================
testsuite/driver/testglobals.py
=====================================
@@ -193,9 +193,6 @@ class TestConfig:
# Baseline commit for performance metric comparisons.
self.baseline_commit = None # type: Optional[GitRef]
- # Additional package dbs to inspect for test dependencies.
- self.test_package_db = [] # type: List[PathToPackageDb]
-
# Should we skip performance tests
self.skip_perf_tests = False
=====================================
testsuite/driver/testlib.py
=====================================
@@ -202,32 +202,6 @@ def stage1(name, opts):
# testsuite/tests/stage1 directory. Validate runs the tests in that
# directory with `make stage=1`.
-# Cache the results of looking to see if we have a library or not.
-# This makes quite a difference, especially on Windows.
-have_lib_cache = {} # type: Dict[str, bool]
-
-def have_library(lib: str) -> bool:
- """ Test whether the given library is available """
- if lib in have_lib_cache:
- got_it = have_lib_cache[lib]
- else:
- cmd = strip_quotes(config.ghc_pkg)
- cmd_line = [cmd, '--no-user-package-db']
-
- for db in config.test_package_db:
- cmd_line.append("--package-db="+db)
-
- cmd_line.extend(['describe', lib])
-
- print(cmd_line)
-
- cp = subprocess.run(cmd_line, capture_output=True, env=ghc_env)
- r = cp.returncode
- got_it = r == 0
- have_lib_cache[lib] = got_it
-
- return got_it
-
def _req_hadrian_deps(name,opts,deps):
opts.hadrian_deps.update(deps)
=====================================
testsuite/mk/test.mk
=====================================
@@ -202,10 +202,6 @@ ifneq "$(THREADS)" ""
RUNTEST_OPTS += --threads=$(THREADS)
endif
-ifneq "$(PACKAGE_DB)" ""
-RUNTEST_OPTS += --test-package-db=$(PACKAGE_DB)
-endif
-
ifneq "$(VERBOSE)" ""
RUNTEST_OPTS += --verbose=$(VERBOSE)
endif
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3ef716699e8b221670a9b9751c53c692db31387b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3ef716699e8b221670a9b9751c53c692db31387b
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240119/bc7d0525/attachment-0001.html>
More information about the ghc-commits
mailing list