summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorromes <rodrigo.m.mesquita@gmail.com>2023-03-16 11:35:17 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-05-04 14:58:14 -0400
commitdb4be3395cb74eb07355339184123d5ded331dc3 (patch)
tree69ccc565d5e4253d74adc44cfbabf39d41061424 /testsuite/driver/testlib.py
parent6689c9c6eba6f538bedfe7a08316d7c5dec8bfae (diff)
downloadhaskell-db4be3395cb74eb07355339184123d5ded331dc3.tar.gz
Add hashes to unit-ids created by hadrian
This commit adds support for computing an inputs hash for packages compiled by hadrian. The result is that ABI incompatible packages should be given different hashes and therefore be distinct in a cabal store. Hashing is enabled by the `--flag`, and is off by default as the hash contains a hash of the source files. We enable it when we produce release builds so that the artifacts we distribute have the right unit ids.
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 9cb3a924ab..09ab06d469 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -969,8 +969,9 @@ def normalise_win32_io_errors(name, opts):
def normalise_version_( *pkgs ):
def normalise_version__( str ):
- return re.sub('(' + '|'.join(map(re.escape,pkgs)) + ')-[0-9.]+(-[0-9a-f]+)?',
- '\\1-<VERSION>', str)
+ # (name)(-version)(-hash)(-components)
+ return re.sub('(' + '|'.join(map(re.escape,pkgs)) + ')-[0-9.]+(-[0-9a-zA-Z]+)?(-[0-9a-zA-Z]+)?',
+ '\\1-<VERSION>-<HASH>', str)
return normalise_version__
def normalise_version( *pkgs ):