public static function run($r) { $missing_titles = pts_external_dependencies::missing_dependency_titles(); pts_client::$display->generic_heading(count($missing_titles) . ' of ' . count(pts_external_dependencies::all_dependency_names()) . ' External Dependencies Missing'); echo pts_user_io::display_text_list($missing_titles); echo PHP_EOL; }
public static function run($r) { $all_dependencies = pts_external_dependencies::all_dependency_titles(); pts_client::$display->generic_heading(count($all_dependencies) . ' External Dependencies Available'); echo pts_user_io::display_text_list($all_dependencies); echo PHP_EOL; }
public static function run($r) { $exdep_parser = new pts_exdep_generic_parser(); foreach ($exdep_parser->get_available_packages() as $pkg) { $pkg_data = $exdep_parser->get_package_data($pkg); $files = explode(' ', str_replace(array(' OR ', ', '), ' ', $pkg_data['file_check'])); foreach ($files as $file) { echo (is_array($file) ? implode(' ', $file) : $file) . ': '; $deps = pts_external_dependencies::packages_that_provide($file); echo (is_array($deps) ? implode(' ', $deps) : null) . PHP_EOL; } } }
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 static function run($r) { $test_profiles = pts_types::identifiers_to_test_profile_objects($r, true, true); //pts_client::set_test_flags(pts_c::auto_mode); pts_external_dependencies::install_dependencies($test_profiles); }
public static function run($r) { $test_profiles = pts_types::identifiers_to_test_profile_objects($r, true, true); pts_external_dependencies::install_dependencies($test_profiles); }
public static function render_page_process($PATH) { $local_only = false; switch (isset($PATH[0]) ? $PATH[0] : null) { case 'locally_available_tests': $local_only = true; $selected = 'Locally Available Tests'; $tests = pts_openbenchmarking::available_tests(); break; case 'available_tests': $selected = 'Available Tests'; $tests = pts_openbenchmarking::available_tests(); break; case 'installed_tests': default: $tests = pts_tests::installed_tests(); $selected = 'Installed Tests'; break; } echo '<h2>'; $sub_links = array('Available Tests' => 'tests/available_tests', 'Locally Available Tests' => 'tests/locally_available_tests', 'Installed Tests' => 'tests/installed_tests'); foreach ($sub_links as $txt => $loc) { echo '<a href="/?' . $loc . '">' . ($selected == $txt ? '<span class="alt">' : null) . $txt . ($selected == $txt ? '<span class="alt">' : null) . '</a> '; } echo '</h2>'; $installed_dependencies = pts_external_dependencies::installed_dependency_names(); $tests_to_show = array(); foreach ($tests as $identifier) { $test_profile = new pts_test_profile($identifier); if (!$test_profile->is_supported(false) || $test_profile->get_title() == null) { // Don't show unsupported tests continue; } if ($local_only && count($test_dependencies = $test_profile->get_dependencies()) > 0) { $dependencies_met = true; foreach ($test_dependencies as $d) { if (!in_array($d, $installed_dependencies)) { $dependencies_met = false; break; } } if ($dependencies_met == false) { continue; } } if ($local_only && pts_test_install_request::test_files_available_locally($test_profile) == false) { continue; } array_push($tests_to_show, $test_profile); } echo '<div style="overflow: hidden;">'; $tests_to_show = array_unique($tests_to_show); usort($tests_to_show, array('pts_webui_tests', 'cmp_result_object_sort')); $category = null; foreach ($tests_to_show as &$test_profile) { if ($category != $test_profile->get_test_hardware_type()) { $category = $test_profile->get_test_hardware_type(); echo '</div><a name="' . $category . '"></a>' . PHP_EOL . '<h2>' . $category . '</h2>' . PHP_EOL . '<div style="overflow: hidden;">'; $popularity_index = pts_openbenchmarking_client::popular_tests(-1, pts_openbenchmarking_client::read_repository_test_profile_attribute($test_profile, 'test_type')); } $last_updated = pts_openbenchmarking_client::read_repository_test_profile_attribute($test_profile, 'last_updated'); $popularity = array_search($test_profile->get_identifier(false), $popularity_index); $secondary_message = null; if ($last_updated > time() - 60 * 60 * 24 * 21) { // Mark it as newly updated if uploaded in past 3 weeks $secondary_message = '<strong>Newly Updated.</strong>'; } else { if ($popularity === 0) { $secondary_message = '<strong>Most Popular.</strong>'; } else { if ($popularity < 4) { $secondary_message = '<strong>Very Popular.</strong>'; } } } echo '<a href="?test/' . $test_profile->get_identifier() . '"><div class="pts_blue_bar"><strong>' . trim($test_profile->get_title() . ' ' . $test_profile->get_app_version()) . '</strong><br /><span style="">~' . max(1, round($test_profile->get_estimated_run_time() / 60)) . ' mins To Run. ' . $secondary_message . '</span></div></a>'; } echo '</div>'; }
public static function run($r) { $installed_titles = pts_external_dependencies::installed_dependency_titles(); pts_client::$display->generic_heading(count($installed_titles) . ' of ' . count(pts_external_dependencies::all_dependency_names()) . ' External Dependencies Installed'); echo pts_user_io::display_text_list($installed_titles); }