|
48 | 48 | import easybuild.tools.toolchain as toolchain |
49 | 49 | from easybuild.easyblocks.generic.cmakemake import setup_cmake_env |
50 | 50 | from easybuild.framework.easyblock import EasyBlock |
| 51 | +from easybuild.framework.easyconfig import CUSTOM |
51 | 52 | from easybuild.tools.build_log import EasyBuildError |
52 | 53 | from easybuild.tools.filetools import adjust_permissions, apply_regex_substitutions, mkdir, write_file |
53 | 54 | from easybuild.tools.modules import get_software_root, get_software_version |
|
58 | 59 | class EB_OpenFOAM(EasyBlock): |
59 | 60 | """Support for building and installing OpenFOAM.""" |
60 | 61 |
|
| 62 | + @staticmethod |
| 63 | + def extra_options(): |
| 64 | + """Custom easyconfig parameter specific to OpenFOAM.""" |
| 65 | + extra_vars = EasyBlock.extra_options() |
| 66 | + extra_vars.update({ |
| 67 | + 'sanity_check_motorbike': [True, "Should the motorbike sanity check run?", CUSTOM], |
| 68 | + }) |
| 69 | + return extra_vars |
| 70 | + |
61 | 71 | def __init__(self, *args, **kwargs): |
62 | 72 | """Specify that OpenFOAM should be built in install dir.""" |
63 | 73 |
|
@@ -540,7 +550,8 @@ def sanity_check_step(self): |
540 | 550 |
|
541 | 551 | # run motorBike tutorial case to ensure the installation is functional (if it's available); |
542 | 552 | # only for recent (>= v6.0) versions of openfoam.org variant |
543 | | - if self.is_dot_org and self.looseversion >= LooseVersion('6'): |
| 553 | + # could be turned off by set 'sanity_check_motorbike' to False (default True) |
| 554 | + if self.is_dot_org and self.looseversion >= LooseVersion('6') and self.cfg['sanity_check_motorbike']: |
544 | 555 | openfoamdir_path = os.path.join(self.installdir, self.openfoamdir) |
545 | 556 | if self.looseversion <= LooseVersion('10'): |
546 | 557 | motorbike_path = os.path.join( |
|
0 commit comments