def test_engine_run_actions_unknown_package(self): config = { 'action': 'unknown-package', } with self.assertRaises(RelengToolMissingPackageScript): run_testenv(config=config, template='minimal')
def test_engine_run_actions_valid_package_subaction(self): config = { 'action': 'minimal-fetch', } rv = run_testenv(config=config, template='minimal') self.assertTrue(rv)
def test_engine_run_actions_invalid_init(self): config = { 'action': 'init', } # init should fail if we already have a project rv = run_testenv(config=config, template='minimal') self.assertFalse(rv)
def test_engine_run_environ_check_target_pkg(self): config = { 'action': 'minimal-fetch', } rv = run_testenv(config=config, template='minimal') self.assertTrue(rv) self.assertTrue('RELENG_TARGET_PKG' in os.environ) target_pkg = os.environ['RELENG_TARGET_PKG'] self.assertEqual(target_pkg, 'minimal')
def test_engine_run_environ_check_defaults(self): rv = run_testenv(template='env-defaults') self.assertTrue(rv) optional_env_vars = [ 'RELENG_CLEAN', 'RELENG_DEBUG', 'RELENG_DEVMODE', 'RELENG_DISTCLEAN', 'RELENG_FORCE', 'RELENG_LOCALSRCS', 'RELENG_MRPROPER', 'RELENG_REBUILD', 'RELENG_RECONFIGURE', 'RELENG_REINSTALL', 'RELENG_TARGET_PKG', 'RELENG_VERBOSE', ] for var in optional_env_vars: self.assertFalse(var in os.environ, var)
def test_engine_run_scripts_invalid_post(self): rv = run_testenv(template='scripts-invalid-post') self.assertFalse(rv)
def test_engine_run_scripts_invalid_install(self): rv = run_testenv(template='scripts-invalid-install') self.assertFalse(rv)
def test_engine_run_scripts_invalid_configure(self): rv = run_testenv(template='scripts-invalid-configure') self.assertFalse(rv)
def test_engine_run_scripts_invalid_build(self): rv = run_testenv(template='scripts-invalid-build') self.assertFalse(rv)
def test_engine_run_scripts_invalid_bootstrap(self): rv = run_testenv(template='scripts-invalid-bootstrap') self.assertFalse(rv)
def test_engine_run_defaults_nopackages(self): with self.assertRaises(RelengToolMissingPackagesError): run_testenv(template='no-packages')
def test_engine_run_defaults_noconfig(self): with self.assertRaises(RelengToolMissingConfigurationError): run_testenv()