Skip to content

Commit

Permalink
allow triggering deprecated behaviour for entire test_build_easyconfi…
Browse files Browse the repository at this point in the history
…gs_in_parallel_gc3pie + catch deprecation warnings via mocked_stdout_stderr
  • Loading branch information
boegel committed Oct 2, 2024
1 parent f52adc6 commit 0b5d69b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/framework/parallelbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ def test_build_easyconfigs_in_parallel_gc3pie(self):
print("GC3Pie not available, skipping test")
return

self.allow_deprecated_behaviour()

# put GC3Pie config in place to use local host and fork/exec
resourcedir = os.path.join(self.test_prefix, 'gc3pie')
gc3pie_cfgfile = os.path.join(self.test_prefix, 'gc3pie_local.ini')
Expand Down Expand Up @@ -263,9 +265,8 @@ def test_build_easyconfigs_in_parallel_gc3pie(self):
test_easyblocks_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sandbox')
cmd = "PYTHONPATH=%s:%s:$PYTHONPATH eb %%(spec)s -df" % (topdir, test_easyblocks_path)

self.allow_deprecated_behaviour()
build_easyconfigs_in_parallel(cmd, ordered_ecs, prepare_first=False)
self.disallow_deprecated_behaviour()
with self.mocked_stdout_stderr():
build_easyconfigs_in_parallel(cmd, ordered_ecs, prepare_first=False)

toy_modfile = os.path.join(self.test_installpath, 'modules', 'all', 'toy', '0.0')
if get_module_syntax() == 'Lua':
Expand All @@ -282,10 +283,9 @@ def test_build_easyconfigs_in_parallel_gc3pie(self):
write_file(test_ecfile, ectxt)
ecs = resolve_dependencies(process_easyconfig(test_ecfile), self.modtool)

self.allow_deprecated_behaviour()
error = "1 jobs failed: toy-1.2.3"
self.assertErrorRegex(EasyBuildError, error, build_easyconfigs_in_parallel, cmd, ecs, prepare_first=False)
self.disallow_deprecated_behaviour()
with self.mocked_stdout_stderr():
self.assertErrorRegex(EasyBuildError, error, build_easyconfigs_in_parallel, cmd, ecs, prepare_first=False)

def test_submit_jobs(self):
"""Test submit_jobs"""
Expand Down

0 comments on commit 0b5d69b

Please sign in to comment.