Skip to content

Commit e1f95b1

Browse files
authored
Merge pull request #2 from lexming/sync-pr-4248
Sync PR#4248 with 5.0.x
2 parents 4363f9f + 0637f1f commit e1f95b1

File tree

9 files changed

+28
-17
lines changed

9 files changed

+28
-17
lines changed

.github/workflows/container_tests_apptainer.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,18 @@ jobs:
2929
- name: install OS & Python packages
3030
run: |
3131
# for building CentOS 7 container images
32-
sudo apt-get install rpm
33-
sudo apt-get install dnf
32+
APT_PKGS="rpm dnf"
3433
# for modules tool
35-
sudo apt-get install lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev
34+
APT_PKGS+=" lua5.2 liblua5.2-dev lua-filesystem lua-posix tcl tcl-dev"
35+
36+
# Avoid apt-get update, as we don't really need it,
37+
# and it does more harm than good (it's fairly expensive, and it results in flaky test runs)
38+
if ! sudo apt-get install $APT_PKGS; then
39+
# Try to update cache, then try again to resolve 404s of old packages
40+
sudo apt-get update -yqq || true
41+
sudo apt-get install $APT_PKGS
42+
fi
43+
3644
# fix for lua-posix packaging issue, see https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
3745
# needed for Ubuntu 18.04, but not for Ubuntu 20.04, so skipping symlinking if posix.so already exists
3846
if [ ! -e /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so ] ; then

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ jobs:
166166
echo "Not testing with '${module_syntax}' as module syntax with '${EASYBUILD_MODULES_TOOL}' as modules tool"
167167
continue
168168
fi
169-
printf '\n\n=====================> Using $module_syntax module syntax <=====================\n\n'
169+
printf "\n\n=====================> Using $module_syntax module syntax <=====================\n\n"
170170
export EASYBUILD_MODULE_SYNTAX="${module_syntax}"
171171
export TEST_EASYBUILD_MODULE_SYNTAX="${EASYBUILD_MODULE_SYNTAX}"
172172

easybuild/tools/filetools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
# tar.Z: using compress (LZW), but can be handled with gzip so use 'z'
163163
'.tar.z': "tar xzf %(filepath)s",
164164
# shell scripts don't need to be unpacked, just copy there
165-
'.sh': "cp -a %(filepath)s .",
165+
'.sh': "cp -dR %(filepath)s .",
166166
}
167167

168168
ZIPPED_PATCH_EXTS = ('.bz2', '.gz', '.xz')

easybuild/tools/github.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,8 +1371,7 @@ def close_pr(pr, motivation_msg=None):
13711371
if not reopen:
13721372
msg += "\nPlease don't hesitate to reopen this PR or add a comment if you feel this contribution is still "
13731373
msg += "relevant.\nFor more information on our policy w.r.t. closing PRs, see "
1374-
msg += "https://easybuild.readthedocs.io/en/latest/Contributing.html"
1375-
msg += "#why-a-pull-request-may-be-closed-by-a-maintainer"
1374+
msg += "https://docs.easybuild.io/contributing/#contributing_review_process_why_pr_closed_by_maintainer"
13761375
post_comment_in_issue(pr, msg, account=pr_target_account, repo=pr_target_repo, github_user=github_user)
13771376

13781377
if dry_run:

easybuild/tools/options.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ def override_options(self):
353353
None, 'store_true', False),
354354
'allow-use-as-root-and-accept-consequences': ("Allow using of EasyBuild as root (NOT RECOMMENDED!)",
355355
None, 'store_true', False),
356-
'backup-modules': ("Back up an existing module file, if any. Only works when using --module-only",
356+
'backup-modules': ("Back up an existing module file, if any. "
357+
"Auto-enabled when using --module-only or --skip",
357358
None, 'store_true', None), # default None to allow auto-enabling if not disabled
358359
'backup-patched-files': ("Create a backup (*.orig) file when applying a patch",
359360
None, 'store_true', False),

test/framework/filetools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_extract_cmd(self):
106106
('test.txz', "unset TAPE; unxz test.txz --stdout | tar x"),
107107
('test.iso', "7z x test.iso"),
108108
('test.tar.Z', "tar xzf test.tar.Z"),
109-
('test.foo.bar.sh', "cp -a test.foo.bar.sh ."),
109+
('test.foo.bar.sh', "cp -dR test.foo.bar.sh ."),
110110
# check whether extension is stripped correct to determine name of target file
111111
# cfr. https://github.com/easybuilders/easybuild-framework/pull/3705
112112
('testbz2.bz2', "bunzip2 -c testbz2.bz2 > testbz2"),

test/framework/options.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4905,26 +4905,29 @@ def test_github_merge_pr(self):
49054905
self.assertEqual(stderr.strip(), expected_stderr)
49064906
self.assertTrue(stdout.strip().endswith(expected_stdout), "'%s' ends with '%s'" % (stdout, expected_stdout))
49074907

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

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

49144917
expected_stdout = '\n'.join([
4915-
"Checking eligibility of easybuilders/easybuild-easyconfigs PR #17065 for merging...",
4918+
"Checking eligibility of easybuilders/easybuild-easyconfigs PR #19105 for merging...",
49164919
"* targets develop branch: OK",
49174920
"* test suite passes: OK",
49184921
"* last test report is successful: OK",
49194922
"* no pending change requests: OK",
49204923
"* approved review: OK (by SebastianAchilles)",
4921-
"* milestone is set: OK (4.7.1)",
4924+
"* milestone is set: OK (4.9.0)",
49224925
"* mergeable state is clean: PR is already merged",
49234926
'',
49244927
"Review OK, merging pull request!",
49254928
'',
4926-
"[DRY RUN] Adding comment to easybuild-easyconfigs issue #17065: 'Going in, thanks @boegel!'",
4927-
"[DRY RUN] Merged easybuilders/easybuild-easyconfigs pull request #17065",
4929+
"[DRY RUN] Adding comment to easybuild-easyconfigs issue #19105: 'Going in, thanks @boegel!'",
4930+
"[DRY RUN] Merged easybuilders/easybuild-easyconfigs pull request #19105",
49284931
])
49294932
expected_stderr = ''
49304933
self.assertEqual(stderr.strip(), expected_stderr)

test/framework/sandbox/easybuild/easyblocks/generic/toy_extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def run_async(self, thread_pool):
9393
cmd = f"echo 'no sources for {self.name}'"
9494

9595
return thread_pool.submit(run_shell_cmd, cmd, asynchronous=True, env=os.environ.copy(),
96-
fail_on_error=False, task_id=task_id)
96+
fail_on_error=False, task_id=task_id, work_dir=os.getcwd())
9797

9898
def postrun(self):
9999
"""

test/framework/sandbox/easybuild/easyblocks/t/toy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def run_async(self, thread_pool):
170170
cmd = compose_toy_build_cmd(self.cfg, self.name, self.cfg['prebuildopts'], self.cfg['buildopts'])
171171
task_id = f'ext_{self.name}_{self.version}'
172172
return thread_pool.submit(run_shell_cmd, cmd, asynchronous=True, env=os.environ.copy(),
173-
fail_on_error=False, task_id=task_id)
173+
fail_on_error=False, task_id=task_id, work_dir=os.getcwd())
174174

175175
def postrun(self):
176176
"""

0 commit comments

Comments
 (0)