public static function run($r)
 {
     $test_profile = new pts_test_profile($r[0]);
     if ($test_profile->is_test_installed() == false) {
         echo PHP_EOL . 'This test is not installed.' . PHP_EOL;
         return false;
     }
     if (pts_user_io::prompt_bool_input('Are you sure you wish to remove the test ' . $test_profile, false)) {
         pts_client::remove_installed_test($test_profile);
         echo PHP_EOL . $test_profile . ' has been removed.' . PHP_EOL;
     } else {
         echo PHP_EOL;
     }
 }
 public function get_contained_test_profiles()
 {
     $contained = array();
     // read the repo
     $repo_index = pts_openbenchmarking::read_repository_index($this->repo);
     if (isset($repo_index['tests']) && is_array($repo_index['tests'])) {
         foreach ($repo_index['tests'] as $test_identifier => &$test) {
             if (!in_array(phodevi::operating_system(), $test['supported_platforms']) || empty($test['title'])) {
                 // Initial check to not do unsupported tests
                 continue;
             }
             if ($this->is_virtual_os_selector && !in_array($this->virtual, array_map('strtolower', $test['supported_platforms']))) {
                 // Doing a virtual suite of all tests specific to an OS, but this test profile is not supported there
                 continue;
             } else {
                 if ($this->is_virtual_subsystem_selector && $this->virtual != strtolower($test['test_type'])) {
                     // Doing a virtual suite of all tests specific to a test_type, but this test profile is not supported there
                     continue;
                 } else {
                     if ($this->is_virtual_software_type && $this->virtual != strtolower($test['software_type'])) {
                         // Doing a virtual suite of all tests specific to a software_type, but this test profile is not supported there
                         continue;
                     } else {
                         if ($this->is_virtual_internal_tag && !in_array($this->virtual, array_map('strtolower', $test['internal_tags']))) {
                             // Doing a virtual suite of all tests matching an internal tag
                             continue;
                         }
                     }
                 }
             }
             $test_version = array_shift($test['versions']);
             $test_profile = new pts_test_profile($this->repo . '/' . $test_identifier . '-' . $test_version);
             if ($test_profile->get_display_format() != 'BAR_GRAPH' || !in_array($test_profile->get_license(), array('Free', 'Non-Free'))) {
                 // Also ignore these tests
                 continue;
             }
             if ($this->is_virtual_installed && $test_profile->is_test_installed() == false) {
                 // Test is not installed
                 continue;
             }
             if ($test_profile->is_supported(false)) {
                 // All checks passed, add to virtual suite
                 array_push($contained, $test_profile);
                 continue;
             }
         }
     }
     return $contained;
 }