def test_extensions_sanity_check(self): """Test sanity check aspect of extensions.""" test_ecs_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'easyconfigs', 'test_ecs') toy_ec = EasyConfig(os.path.join(test_ecs_dir, 't', 'toy', 'toy-0.0-gompi-1.3.12-test.eb')) # purposely put sanity check command in place that breaks the build, # to check whether sanity check is only run once; # sanity check commands are checked after checking sanity check paths, so this should work toy_ec.update('sanity_check_commands', [("%(installdir)s/bin/toy && rm %(installdir)s/bin/toy", '')]) # this import only works here, since EB_toy is a test easyblock from easybuild.easyblocks.toy import EB_toy eb = EB_toy(toy_ec) eb.silent = True eb.run_all_steps(True)