Skip to content

Commit

Permalink
Merge pull request #4469 from boegel/5.0.x
Browse files Browse the repository at this point in the history
sync with develop (20240227)
  • Loading branch information
branfosj authored Mar 2, 2024
2 parents 128505f + cb51e86 commit 849ffed
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ jobs:
echo "Not testing with '${module_syntax}' as module syntax with '${EASYBUILD_MODULES_TOOL}' as modules tool"
continue
fi
printf '\n\n=====================> Using $module_syntax module syntax <=====================\n\n'
printf "\n\n=====================> Using $module_syntax module syntax <=====================\n\n"
export EASYBUILD_MODULE_SYNTAX="${module_syntax}"
export TEST_EASYBUILD_MODULE_SYNTAX="${EASYBUILD_MODULE_SYNTAX}"
Expand Down
2 changes: 1 addition & 1 deletion easybuild/tools/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
# tar.Z: using compress (LZW), but can be handled with gzip so use 'z'
'.tar.z': "tar xzf %(filepath)s",
# shell scripts don't need to be unpacked, just copy there
'.sh': "cp -a %(filepath)s .",
'.sh': "cp -dR %(filepath)s .",
}

ZIPPED_PATCH_EXTS = ('.bz2', '.gz', '.xz')
Expand Down
3 changes: 1 addition & 2 deletions easybuild/tools/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,7 @@ def close_pr(pr, motivation_msg=None):
if not reopen:
msg += "\nPlease don't hesitate to reopen this PR or add a comment if you feel this contribution is still "
msg += "relevant.\nFor more information on our policy w.r.t. closing PRs, see "
msg += "https://easybuild.readthedocs.io/en/latest/Contributing.html"
msg += "#why-a-pull-request-may-be-closed-by-a-maintainer"
msg += "https://docs.easybuild.io/contributing/#contributing_review_process_why_pr_closed_by_maintainer"
post_comment_in_issue(pr, msg, account=pr_target_account, repo=pr_target_repo, github_user=github_user)

if dry_run:
Expand Down
3 changes: 2 additions & 1 deletion easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def override_options(self):
None, 'store_true', False),
'allow-use-as-root-and-accept-consequences': ("Allow using of EasyBuild as root (NOT RECOMMENDED!)",
None, 'store_true', False),
'backup-modules': ("Back up an existing module file, if any. Only works when using --module-only",
'backup-modules': ("Back up an existing module file, if any. "
"Auto-enabled when using --module-only or --skip",
None, 'store_true', None), # default None to allow auto-enabling if not disabled
'backup-patched-files': ("Create a backup (*.orig) file when applying a patch",
None, 'store_true', False),
Expand Down
2 changes: 1 addition & 1 deletion test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_extract_cmd(self):
('test.txz', "unset TAPE; unxz test.txz --stdout | tar x"),
('test.iso', "7z x test.iso"),
('test.tar.Z', "tar xzf test.tar.Z"),
('test.foo.bar.sh', "cp -a test.foo.bar.sh ."),
('test.foo.bar.sh', "cp -dR test.foo.bar.sh ."),
# check whether extension is stripped correct to determine name of target file
# cfr. https://github.com/easybuilders/easybuild-framework/pull/3705
('testbz2.bz2', "bunzip2 -c testbz2.bz2 > testbz2"),
Expand Down
15 changes: 9 additions & 6 deletions test/framework/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -4905,26 +4905,29 @@ def test_github_merge_pr(self):
self.assertEqual(stderr.strip(), expected_stderr)
self.assertTrue(stdout.strip().endswith(expected_stdout), "'%s' ends with '%s'" % (stdout, expected_stdout))

# full eligible merged PR, default target branch
# full eligible merged PR, default target branch;
# note: we frequently need to change to a more recent PR here,
# to avoid that this test starts failing because commit status is set to None for old commits
del args[-1]
args[1] = '17065'
# easyconfig PR for EasyBuild v4.8.2
args[1] = '19105'

stdout, stderr = self._run_mock_eb(args, do_build=True, raise_error=True, testing=False)

expected_stdout = '\n'.join([
"Checking eligibility of easybuilders/easybuild-easyconfigs PR #17065 for merging...",
"Checking eligibility of easybuilders/easybuild-easyconfigs PR #19105 for merging...",
"* targets develop branch: OK",
"* test suite passes: OK",
"* last test report is successful: OK",
"* no pending change requests: OK",
"* approved review: OK (by SebastianAchilles)",
"* milestone is set: OK (4.7.1)",
"* milestone is set: OK (4.9.0)",
"* mergeable state is clean: PR is already merged",
'',
"Review OK, merging pull request!",
'',
"[DRY RUN] Adding comment to easybuild-easyconfigs issue #17065: 'Going in, thanks @boegel!'",
"[DRY RUN] Merged easybuilders/easybuild-easyconfigs pull request #17065",
"[DRY RUN] Adding comment to easybuild-easyconfigs issue #19105: 'Going in, thanks @boegel!'",
"[DRY RUN] Merged easybuilders/easybuild-easyconfigs pull request #19105",
])
expected_stderr = ''
self.assertEqual(stderr.strip(), expected_stderr)
Expand Down

0 comments on commit 849ffed

Please sign in to comment.