-
Notifications
You must be signed in to change notification settings - Fork 202
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
add support for only (re)generating module file #1018
Changes from 1 commit
5205707
94535f6
0d8379e
803eacf
54e7297
fee2b98
4141c21
30eaa09
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 |
---|---|---|
|
@@ -1687,9 +1687,20 @@ def run_step(self, step, methods, skippable=False): | |
""" | ||
Run step, returns false when execution should be stopped | ||
""" | ||
if skippable and (self.skip or step in self.cfg['skipsteps']): | ||
skip = False | ||
# skip step if specified, either as individual (skippable) step, or when only generating module file | ||
# still run sanity check when only generating module | ||
skip_individual_step = skippable and (self.skip or step in self.cfg['skipsteps']) | ||
only_module_skip = build_option('only_module') and not step in ['sanitycheck', 'module'] | ||
if skip_individual_step or only_module_skip: | ||
self.log.info("Skipping %s step" % step) | ||
else: | ||
skip = True | ||
# allow skipping sanity check too when only generating module via --force | ||
elif build_option('only_module') and step == 'sanitycheck' and build_option('force'): | ||
self.log.info("Skipping %s step, due to combo of --only-module and --force" in ['sanitycheck']) | ||
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. what's with the info message? it just does |
||
skip = True | ||
|
||
if not skip: | ||
self.log.info("Starting %s step" % step) | ||
# update the config templates | ||
self.update_config_template_run_step() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,6 +169,7 @@ def override_options(self): | |
str, 'extend', None), | ||
'oldstyleconfig': ("Look for and use the oldstyle configuration file.", | ||
None, 'store_true', True), | ||
'only-module': ("Only (re)generate module file", None, 'store_true', False), | ||
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. does it make sense to generalise this to a step |
||
'pretend': (("Does the build/installation in a test directory located in $HOME/easybuildinstall"), | ||
None, 'store_true', False, 'p'), | ||
'set-gid-bit': ("Set group ID bit on newly created directories", None, 'store_true', False), | ||
|
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.
unused?
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.
i would prefer you added a (private)? method
to_skip_or_not_to_skip
, have it return a boolean (and log message?) and use that.this rather crucial method is now cluttered with very odd logic, will also make unittesting easier i guess