-
Notifications
You must be signed in to change notification settings - Fork 218
take into account maxparallel for individual extensions #3811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 2 commits
7738d1b
45371a9
bb6a606
50030cd
57b053e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1025,10 +1025,15 @@ def test_init_extensions(self): | |
|
|
||
| test_ec = os.path.join(self.test_prefix, 'test.eb') | ||
| test_ec_txt = toy_ec_txt.replace("('barbar', '0.0', {", "('barbar', '0.0', {'easyblock': 'DummyExtension',") | ||
| test_ec_txt = test_ec_txt.replace("('barbar', '0.0', {", "('barbar', '0.0', {'maxparallel': 3,") | ||
| test_ec_txt += "\nparallel = 5" | ||
| write_file(test_ec, test_ec_txt) | ||
| ec = process_easyconfig(test_ec)[0] | ||
| eb = get_easyblock_instance(ec) | ||
|
|
||
| # require to trigger setting of 'parallel' value | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "required"
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you move that setting of orig-parallel to the ctor this is not really required anymore, unless you add a top-level E.g. instead of the EC |
||
| eb.check_readiness_step() | ||
|
|
||
| eb.prepare_for_extensions() | ||
| eb.init_ext_instances() | ||
| ext_inst_class_names = [x.__class__.__name__ for x in eb.ext_instances] | ||
|
|
@@ -1040,6 +1045,17 @@ def test_init_extensions(self): | |
| ] | ||
| self.assertEqual(ext_inst_class_names, expected) | ||
|
|
||
| # default parallel is inherited from parent | ||
| self.assertEqual(eb.cfg['parallel'], 5) | ||
| self.assertEqual(eb.ext_instances[0].cfg['parallel'], 5) | ||
| self.assertEqual(eb.ext_instances[1].cfg['parallel'], 5) | ||
| self.assertEqual(eb.ext_instances[3].cfg['parallel'], 5) | ||
|
|
||
| barbar_ext = eb.ext_instances[2] | ||
| self.assertEqual(barbar_ext.name, 'barbar') | ||
| # parallel should be set to 3 for barbar, due to maxparallel | ||
| self.assertEqual(barbar_ext.cfg['parallel'], 3) | ||
|
|
||
| # check what happen if we specify an easyblock that doesn't derive from Extension, | ||
| # and hence can't be used to install extensions... | ||
| test_ec = os.path.join(self.test_prefix, 'test_broken.eb') | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this changing the same as the line above? Maybe combine both into one? This looks like a C&P mistake