Skip to content

Commit

Permalink
fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
branfosj committed May 5, 2024
1 parent 7e9e332 commit 7822835
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion test/framework/easyblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2565,6 +2565,8 @@ def test_checksum_step(self):
copy_file(toy_ec, self.test_prefix)
toy_ec = os.path.join(self.test_prefix, os.path.basename(toy_ec))
ectxt = read_file(toy_ec)
# replace SHA256 checksum for toy-0.0.tar.gz
ectxt = ectxt.replace('44332000aa33b99ad1e00cbd1a7da769220d74647060a10e807b916d73ea27bc', '76543210' * 8)
# replace SHA256 checksums for source of bar extension
ectxt = ectxt.replace('f3676716b610545a4e8035087f5be0a0248adee0abb3930d3edb76d498ae91e7', '01234567' * 8)
write_file(toy_ec, ectxt)
Expand Down Expand Up @@ -2654,7 +2656,9 @@ def test_checksum_step(self):
self.mock_stderr(False)
self.mock_stdout(False)
self.assertEqual(stdout, '')
self.assertEqual(stderr.strip(), "WARNING: Ignoring failing checksum verification for bar-0.0.tar.gz")
print(stderr.strip())
self.assertEqual(stderr.strip(), "WARNING: Ignoring failing checksum verification for bar-0.0.tar.gz\n\n\n"
"WARNING: Ignoring failing checksum verification for toy-0.0.tar.gz")

def test_check_checksums(self):
"""Test for check_checksums_for and check_checksums methods."""
Expand Down
4 changes: 2 additions & 2 deletions test/framework/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def test_exts_list(self):
# SHA256 checksum for source (gzip-1.4.eb)
"6a5abcab719cefa95dca4af0db0d2a9d205d68f775a33b452ec0f2b75b6a3a45",
# SHA256 checksum for 'patch' (toy-0.0.eb)
"2d964e0e8f05a7cce0dd83a3e68c9737da14b87b61b8b8b0291d58d4c8d1031c",
"177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad",
],
}),
# Can use templates in name and version
Expand All @@ -509,7 +509,7 @@ def test_exts_list(self):
self.assertEqual(exts_sources[1]['version'], '2.0')
self.assertEqual(exts_sources[1]['options'], {
'checksums': ['6a5abcab719cefa95dca4af0db0d2a9d205d68f775a33b452ec0f2b75b6a3a45',
'2d964e0e8f05a7cce0dd83a3e68c9737da14b87b61b8b8b0291d58d4c8d1031c'],
'177b34bcdfa1abde96f30354848a01894ebc9c24913bc5145306cd30f78fc8ad'],
'patches': [('toy-0.0.eb', '.')],
'source_tmpl': 'gzip-1.4.eb',
'source_urls': [('http://example.com', 'suffix')],
Expand Down
4 changes: 2 additions & 2 deletions test/framework/easyconfigs/test_ecs/t/toy/toy-0.0-multiple.eb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ toolchain = SYSTEM
sources = [SOURCE_TAR_GZ]
patches = ['toy-0.0_fix-silly-typo-in-printf-statement.patch']
checksums = [
('adler32', '0x998410035'),
'a99f2a72cee1689a2f7e3ace0356efb1',
'44332000aa33b99ad1e00cbd1a7da769220d74647060a10e807b916d73ea27bc',
'81a3accc894592152f81814fbf133d39afad52885ab52c25018722c7bda92487',
]

moduleclass = 'tools'
Expand Down

0 comments on commit 7822835

Please sign in to comment.