diff options
-rw-r--r-- | CHANGE-LOG | 1 | ||||
-rw-r--r-- | pts-core/options/install_test.php | 49 |
2 files changed, 27 insertions, 23 deletions
@@ -13,6 +13,7 @@ Phoronix Test Suite (Git) - pts-core: Add support for abstracting the package vendor identifier (should fix OpenSuSE External Dependencies support on 11.1) - pts-core: When using pts_display_web_browser, point to the index.html redirect instead of directly to composite.xml - pts-core: Add pts-functions_vars.php +- pts-core: Check all supplied arguments for a PCQS test when determining if PCQS needs to be installed - pts: Add more tests to netbook suite Phoronix Test Suite 1.6.0 Alpha 3 diff --git a/pts-core/options/install_test.php b/pts-core/options/install_test.php index 726563a..0a23c72 100644 --- a/pts-core/options/install_test.php +++ b/pts-core/options/install_test.php @@ -44,31 +44,34 @@ class install_test implements pts_option_interface pts_set_assignment("PTS_FORCE_INSTALL", 1); } - // TODO: Search $items_to_install and look for pcqs match instead of only first argument - if(strpos($items_to_install[0], "pcqs") !== false && !is_file(XML_SUITE_LOCAL_DIR . "pcqs-license.txt")) + foreach($items_to_install as $this_install) { - // Install the Phoronix Certification & Qualification Suite - $agreement = wordwrap(file_get_contents("http://www.phoronix-test-suite.com/pcqs/pcqs-license.txt"), 65); - - if(strpos($agreement, "PCQS") == false) - { - echo pts_string_header("An error occurred while connecting to the Phoronix Test Suite server. Try again later."); - return false; - } - - echo "\n\n" . $agreement; - $agree = pts_bool_question("Do you agree to these terms in full and wish to proceed (y/n)?", false); - - if($agree) - { - pts_download("http://www.phoronix-test-suite.com/pcqs/download-pcqs.php", XML_SUITE_LOCAL_DIR . "pcqs-suite.tar"); - pts_extract_file(XML_SUITE_LOCAL_DIR . "pcqs-suite.tar", true); - echo pts_string_header("The Phoronix Certification & Qualification Suite is now installed."); - } - else + if(strpos($this_install, "pcqs-") !== false && !is_file(XML_SUITE_LOCAL_DIR . "pcqs-license.txt")) { - pts_string_header("In order to run PCQS you must agree to the listed terms."); - return false; + // Install the Phoronix Certification & Qualification Suite + $agreement = wordwrap(file_get_contents("http://www.phoronix-test-suite.com/pcqs/pcqs-license.txt"), 65); + + if(strpos($agreement, "PCQS") == false) + { + echo pts_string_header("An error occurred while connecting to the Phoronix Test Suite server. Try again later."); + return false; + } + + echo "\n\n" . $agreement; + $agree = pts_bool_question("Do you agree to these terms in full and wish to proceed (y/n)?", false); + + if($agree) + { + pts_download("http://www.phoronix-test-suite.com/pcqs/download-pcqs.php", XML_SUITE_LOCAL_DIR . "pcqs-suite.tar"); + pts_extract_file(XML_SUITE_LOCAL_DIR . "pcqs-suite.tar", true); + echo pts_string_header("The Phoronix Certification & Qualification Suite is now installed."); + break; + } + else + { + pts_string_header("In order to run PCQS you must agree to the listed terms."); + return false; + } } } |