コード例 #1
0
    def test_engine_run_actions_unknown_package(self):
        config = {
            'action': 'unknown-package',
        }

        with self.assertRaises(RelengToolMissingPackageScript):
            run_testenv(config=config, template='minimal')
コード例 #2
0
    def test_engine_run_actions_valid_package_subaction(self):
        config = {
            'action': 'minimal-fetch',
        }

        rv = run_testenv(config=config, template='minimal')
        self.assertTrue(rv)
コード例 #3
0
    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)
コード例 #4
0
    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')
コード例 #5
0
    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)
コード例 #6
0
 def test_engine_run_scripts_invalid_post(self):
     rv = run_testenv(template='scripts-invalid-post')
     self.assertFalse(rv)
コード例 #7
0
 def test_engine_run_scripts_invalid_install(self):
     rv = run_testenv(template='scripts-invalid-install')
     self.assertFalse(rv)
コード例 #8
0
 def test_engine_run_scripts_invalid_configure(self):
     rv = run_testenv(template='scripts-invalid-configure')
     self.assertFalse(rv)
コード例 #9
0
 def test_engine_run_scripts_invalid_build(self):
     rv = run_testenv(template='scripts-invalid-build')
     self.assertFalse(rv)
コード例 #10
0
 def test_engine_run_scripts_invalid_bootstrap(self):
     rv = run_testenv(template='scripts-invalid-bootstrap')
     self.assertFalse(rv)
コード例 #11
0
 def test_engine_run_defaults_nopackages(self):
     with self.assertRaises(RelengToolMissingPackagesError):
         run_testenv(template='no-packages')
コード例 #12
0
 def test_engine_run_defaults_noconfig(self):
     with self.assertRaises(RelengToolMissingConfigurationError):
         run_testenv()