Skip to content

Commit 56cd018

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into fix-ci-python
2 parents a354da3 + f47da9d commit 56cd018

File tree

3 files changed

+17
-40
lines changed

3 files changed

+17
-40
lines changed

.coveragerc

Lines changed: 0 additions & 26 deletions
This file was deleted.

test/framework/github.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,17 +406,16 @@ def test_github_fetch_easyblocks_from_pr(self):
406406
'pr_target_account': gh.GITHUB_EB_MAIN,
407407
})
408408

409-
# TODO: no 5.x PRs for new easyblocks
410409
# PR with new easyblock plus non-easyblock file
411-
# all_ebs_pr1964 = ['lammps.py']
410+
all_ebs_pr1964 = ['lammps.py']
412411

413412
# PR with changed easyblock
414-
all_ebs_pr3631 = ['root.py']
413+
all_ebs_pr3674 = ['llvm.py']
415414

416415
# PR with more than one easyblock
417416
all_ebs_pr3596 = ['wps.py', 'wrf.py']
418417

419-
for pr, all_ebs in [(3631, all_ebs_pr3631), (3596, all_ebs_pr3596)]:
418+
for pr, all_ebs in [(1964, all_ebs_pr1964), (3674, all_ebs_pr3674), (3596, all_ebs_pr3596)]:
420419
try:
421420
tmpdir = os.path.join(self.test_prefix, 'pr%s' % pr)
422421
with self.mocked_stdout_stderr():

test/framework/options.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4288,7 +4288,7 @@ def test_github_preview_pr(self):
42884288
self.eb_main(args, raise_error=True)
42894289
txt = self.get_stdout()
42904290
self.mock_stdout(False)
4291-
regex = re.compile(r"^Comparing bzip2-1.0.6\S* with bzip2-1.0.6")
4291+
regex = re.compile(r"^Comparing bzip2-1.0.6\S* with bzip2-1.0.8")
42924292
self.assertTrue(regex.search(txt), "Pattern '%s' not found in: %s" % (regex.pattern, txt))
42934293

42944294
def test_github_review_pr(self):
@@ -4781,12 +4781,13 @@ def test_github_new_update_pr(self):
47814781
unstaged_file = os.path.join('easybuild-easyconfigs', 'easybuild', 'easyconfigs', 'test.eb')
47824782
write_file(os.path.join(git_working_dir, unstaged_file), 'test123')
47834783

4784+
ec_name = 'bzip2-1.0.8.eb'
47844785
# a custom commit message is required when doing more than just adding new easyconfigs (e.g., deleting a file)
47854786
args.extend([
47864787
'--git-working-dirs-path=%s' % git_working_dir,
4787-
':bzip2-1.0.6.eb',
4788+
f':{ec_name}',
47884789
])
4789-
error_msg = "A meaningful commit message must be specified via --pr-commit-msg.*\nDeleted: bzip2-1.0.6.eb"
4790+
error_msg = f"A meaningful commit message must be specified via --pr-commit-msg.*\nDeleted: {ec_name}"
47904791

47914792
self.mock_stdout(True)
47924793
self.assertErrorRegex(EasyBuildError, error_msg, self.eb_main, args, raise_error=True, testing=False)
@@ -4808,7 +4809,7 @@ def test_github_new_update_pr(self):
48084809
regexs[-1] = r"^\s*2 files changed"
48094810
regexs.remove(r"^\* title: \"\{tools\}\[gompi/2018a\] toy v0.0 w/ test\"")
48104811
regexs.append(r"^\* title: \"just a test\"")
4811-
regexs.append(r".*/bzip2-1.0.6.eb\s*\|")
4812+
regexs.append(rf".*/{ec_name}\s*\|")
48124813
regexs.append(r".*[0-9]+ deletions\(-\)")
48134814
self._assert_regexs(regexs, txt)
48144815

@@ -4835,7 +4836,7 @@ def test_github_new_update_pr(self):
48354836
r"^\* title: \"test-1-2-3\"",
48364837
r"^\* overview of changes:",
48374838
r".*/toy-0.0-gompi-2018a-test.eb\s*\|",
4838-
r".*/bzip2-1.0.6.eb\s*\|",
4839+
rf".*/{ec_name}\s*\|",
48394840
r"^\s*2 files changed",
48404841
r".*[0-9]+ deletions\(-\)",
48414842
]
@@ -5088,20 +5089,21 @@ def test_github_new_pr_delete(self):
50885089
print("Skipping test_new_pr_delete, no GitHub token available?")
50895090
return
50905091

5092+
ec_name = 'bzip2-1.0.8.eb'
50915093
args = [
50925094
'--new-pr',
50935095
'--github-user=%s' % GITHUB_TEST_ACCOUNT,
5094-
':bzip2-1.0.6.eb',
5096+
f':{ec_name}',
50955097
'-D',
50965098
'--disable-cleanup-tmpdir',
5097-
'--pr-title=delete bzip2-1.6.0',
5098-
'--pr-commit-msg="delete bzip2-1.6.0.eb"'
5099+
f'--pr-title=delete {ec_name}',
5100+
f'--pr-commit-msg="delete {ec_name}"'
50995101
]
51005102
txt, _ = self._run_mock_eb(args, do_build=True, raise_error=True, testing=False)
51015103

51025104
regexs = [
51035105
r"^== fetching branch 'develop' from https://github.com/easybuilders/easybuild-easyconfigs.git...",
5104-
r'title: "delete bzip2-1.6.0"',
5106+
r'title: "delete {ec_name}"',
51055107
r"1 file(s?) changed,( 0 insertions\(\+\),)? [0-9]+ deletions\(-\)",
51065108
]
51075109
self._assert_regexs(regexs, txt)
@@ -5302,10 +5304,12 @@ def test_github_empty_pr(self):
53025304

53035305
# get file from develop branch
53045306
full_url = URL_SEPARATOR.join([GITHUB_RAW, GITHUB_EB_MAIN, GITHUB_EASYCONFIGS_REPO,
5305-
'develop/easybuild/easyconfigs/z/zlib/zlib-1.2.11-GCCcore-6.4.0.eb'])
5307+
'develop/easybuild/easyconfigs/z/zlib/zlib-1.3.1-GCCcore-14.2.0.eb'])
53065308
ec_fn = os.path.basename(full_url)
53075309
with self.mocked_stdout_stderr():
53085310
ec = download_file(ec_fn, full_url, path=os.path.join(self.test_prefix, ec_fn))
5311+
if not ec:
5312+
self.fail(f"Failed to download {full_url}")
53095313

53105314
# try to open new pr with unchanged file
53115315
args = [

0 commit comments

Comments
 (0)