Exemplo n.º 1
0
    if ($errorcode) {
        phpunit_bootstrap_error($errorcode, $message);
    }
    exit(0);
} else {
    if ($buildconfig) {
        if (phpunit_util::build_config_file()) {
            exit(0);
        } else {
            phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGWARNING, 'Can not create main /phpunit.xml configuration file, verify dirroot permissions');
        }
    } else {
        if ($buildcomponentconfigs) {
            phpunit_util::build_component_config_files();
            exit(0);
        } else {
            if ($drop) {
                // make sure tests do not run in parallel
                phpunit_util::acquire_test_lock();
                phpunit_util::drop_site(true);
                // note: we must stop here because $CFG is messed up and we can not reinstall, sorry
                exit(0);
            } else {
                if ($install) {
                    phpunit_util::install_site();
                    exit(0);
                }
            }
        }
    }
}