private static function extended_init_process()
 {
     // Extended Initalization Process
     $directory_check = array(PTS_TEST_INSTALL_DEFAULT_PATH, PTS_SAVE_RESULTS_PATH, PTS_MODULE_LOCAL_PATH, PTS_MODULE_DATA_PATH, PTS_DOWNLOAD_CACHE_PATH, PTS_OPENBENCHMARKING_SCRATCH_PATH, PTS_TEST_PROFILE_PATH, PTS_TEST_SUITE_PATH, PTS_TEST_PROFILE_PATH . 'local/', PTS_TEST_SUITE_PATH . 'local/');
     foreach ($directory_check as $dir) {
         pts_file_io::mkdir($dir);
     }
     // Setup ~/.phoronix-test-suite/xsl/
     pts_file_io::mkdir(PTS_USER_PATH . 'xsl/');
     copy(PTS_CORE_STATIC_PATH . 'xsl/pts-test-installation-viewer.xsl', PTS_USER_PATH . 'xsl/' . 'pts-test-installation-viewer.xsl');
     copy(PTS_CORE_STATIC_PATH . 'xsl/pts-user-config-viewer.xsl', PTS_USER_PATH . 'xsl/' . 'pts-user-config-viewer.xsl');
     copy(PTS_CORE_STATIC_PATH . 'images/pts-308x160.png', PTS_USER_PATH . 'xsl/' . 'pts-logo.png');
     // pts_compatibility ops here
     pts_client::init_display_mode();
 }
 public static function standard_install($items_to_install, $force_install = false, $no_prompts = false, $skip_tests_with_missing_dependencies = false)
 {
     // Refresh the pts_client::$display in case we need to run in debug mode
     if (pts_client::$display == false || !pts_client::$display instanceof pts_websocket_display_mode) {
         pts_client::init_display_mode();
     }
     // Create a lock
     $lock_path = pts_client::temporary_directory() . '/phoronix-test-suite.active';
     pts_client::create_lock($lock_path);
     // Get the test profiles
     $unknown_tests = array();
     $test_profiles = pts_types::identifiers_to_test_profile_objects($items_to_install, true, true, $unknown_tests);
     // Any external dependencies?
     pts_external_dependencies::install_dependencies($test_profiles, $no_prompts, $skip_tests_with_missing_dependencies);
     // Install tests
     if (!is_writable(pts_client::test_install_root_path())) {
         trigger_error('The test installation directory is not writable.' . PHP_EOL . 'Location: ' . pts_client::test_install_root_path(), E_USER_ERROR);
         return false;
     }
     pts_test_installer::start_install($test_profiles, $unknown_tests, $force_install, $no_prompts);
     pts_client::release_lock($lock_path);
     return $test_profiles;
 }
 public function initial_checks(&$to_run, $override_display_mode = false)
 {
     // Refresh the pts_client::$display in case we need to run in debug mode
     if (pts_client::$display == false || !pts_client::$display instanceof pts_websocket_display_mode) {
         pts_client::init_display_mode($override_display_mode);
     }
     $to_run = pts_types::identifiers_to_objects($to_run);
     if ($this->batch_mode && $this->batch_mode['Configured'] == false && !$this->auto_mode) {
         trigger_error('The batch mode must first be configured.' . PHP_EOL . 'To configure, run phoronix-test-suite batch-setup', E_USER_ERROR);
         return false;
     }
     if (!is_writable(pts_client::test_install_root_path())) {
         trigger_error('The test installation directory is not writable.' . PHP_EOL . 'Location: ' . pts_client::test_install_root_path(), E_USER_ERROR);
         return false;
     }
     // Cleanup tests to run
     if (pts_test_run_manager::cleanup_tests_to_run($to_run) == false) {
         return false;
     } else {
         if (count($to_run) == 0) {
             trigger_error('You must enter at least one test, suite, or result identifier to run.', E_USER_ERROR);
             return false;
         }
     }
     return true;
 }