summaryrefslogtreecommitdiffstats
path: root/pts-core/functions
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-11-30 20:00:21 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-30 20:00:21 -0500
commit260ff17a89a15ad897d4e0a4c060510686d55030 (patch)
tree0ed8e30086e407b0dc9cb5a18bf78aea53031a23 /pts-core/functions
parent068c038200c3fedc39b3a1fa28724eff115a79ec (diff)
downloadphoronix-test-suite-upstream-260ff17a89a15ad897d4e0a4c060510686d55030.tar.gz
phoronix-test-suite-upstream-260ff17a89a15ad897d4e0a4c060510686d55030.tar.xz
phoronix-test-suite-upstream-260ff17a89a15ad897d4e0a4c060510686d55030.zip
pts-core: Major Self-Contained Test Profile (SCTP) update. Also adds in
convert-test-to-sctp option.
Diffstat (limited to 'pts-core/functions')
-rw-r--r--pts-core/functions/pts-functions-run.php1
-rw-r--r--pts-core/functions/pts-functions-sctp.php11
-rw-r--r--pts-core/functions/pts-functions_config.php1
-rw-r--r--pts-core/functions/pts-init.php3
-rw-r--r--pts-core/functions/pts-interfaces.php6
5 files changed, 14 insertions, 8 deletions
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php
index 2ae7359..a108bee 100644
--- a/pts-core/functions/pts-functions-run.php
+++ b/pts-core/functions/pts-functions-run.php
@@ -847,6 +847,7 @@ function pts_run_test($test_identifier, $extra_arguments = "", $arguments_descri
}
if($times_to_run > 1 && $i < ($times_to_run - 1))
{
+ echo pts_call_test_script($test_identifier, "interim", null, $test_directory, $extra_runtime_variables);
pts_module_process("__interim_test_run", $pts_test_result);
sleep(1); // Rest for a moment between tests
}
diff --git a/pts-core/functions/pts-functions-sctp.php b/pts-core/functions/pts-functions-sctp.php
index 5ece9d5..ce0a377 100644
--- a/pts-core/functions/pts-functions-sctp.php
+++ b/pts-core/functions/pts-functions-sctp.php
@@ -23,7 +23,7 @@
function pts_sctp_test_directory()
{
- return PTS_TEMP_DIR . "sctp/" . basename(SCTP_FILE) . "/";
+ return SCTP_DIR . basename(SCTP_FILE, ".sctp") . "/";
}
function pts_remove_sctp_test_files()
{
@@ -39,16 +39,15 @@ function pts_generate_sctp_layer()
pts_exit("\n" . SCTP_FILE . " is not a valid self-contained test profile!\n");
}
- if(!is_dir(PTS_TEMP_DIR . "sctp/"))
- {
- mkdir(PTS_TEMP_DIR . "sctp/");
- }
if(!is_dir($test_directory))
{
mkdir($test_directory);
}
- $sctp_stages = array("install" => P_TEST_SCTP_INSTALLSCRIPT, "downloads" => P_TEST_SCTP_DOWNLOADS, "parse-results" => P_TEST_SCTP_RESULTSPARSER, "pre" => P_TEST_SCTP_PRERUN, "post" => P_TEST_SCTP_POSTRUN);
+ $sctp_stages = array("install" => P_TEST_SCTP_INSTALLSCRIPT, "downloads" => P_TEST_SCTP_DOWNLOADS, "parse-results" => P_TEST_SCTP_RESULTSPARSER,
+ "pre" => P_TEST_SCTP_PRERUN, "interim" => P_TEST_SCTP_INTERIMRUN, "post" => P_TEST_SCTP_POSTRUN, "validate-result" => P_TEST_SCTP_VALIDATE_RESULT,
+ "validate-install" => P_TEST_SCTP_VALIDATE_INSTALL);
+
foreach($sctp_stages as $stage_file => $stage_point)
{
$object = $xml_parser->getXMLValue($stage_point);
diff --git a/pts-core/functions/pts-functions_config.php b/pts-core/functions/pts-functions_config.php
index 063b8a8..e56967e 100644
--- a/pts-core/functions/pts-functions_config.php
+++ b/pts-core/functions/pts-functions_config.php
@@ -124,6 +124,7 @@ function pts_user_config_init($UserName = null, $UploadKey = null, $BatchOptions
$config->addXmlObject(P_OPTION_PROMPT_DOWNLOADLOC, 3, pts_read_user_config(P_OPTION_PROMPT_DOWNLOADLOC, "FALSE", $read_config));
$config->addXmlObject(P_OPTION_TEST_ENVIRONMENT, 3, pts_read_user_config(P_OPTION_TEST_ENVIRONMENT, "~/.phoronix-test-suite/installed-tests/", $read_config));
$config->addXmlObject(P_OPTION_CACHE_DIRECTORY, 3, pts_read_user_config(P_OPTION_CACHE_DIRECTORY, "~/.phoronix-test-suite/download-cache/", $read_config));
+ $config->addXmlObject(P_OPTION_SCTP_DIRECTORY, 3, pts_read_user_config(P_OPTION_SCTP_DIRECTORY, "~/.phoronix-test-suite/sctp/", $read_config));
$config->addXmlObject(P_OPTION_TEST_SLEEPTIME, 4, pts_read_user_config(P_OPTION_TEST_SLEEPTIME, "8", $read_config));
$config->addXmlObject(P_OPTION_LOG_VSYSDETAILS, 4, pts_read_user_config(P_OPTION_LOG_VSYSDETAILS, "FALSE", $read_config));
diff --git a/pts-core/functions/pts-init.php b/pts-core/functions/pts-init.php
index 348d8c1..30bca33 100644
--- a/pts-core/functions/pts-init.php
+++ b/pts-core/functions/pts-init.php
@@ -33,6 +33,7 @@ function pts_init()
pts_config_init();
define("TEST_ENV_DIR", pts_find_home(pts_read_user_config(P_OPTION_TEST_ENVIRONMENT, "~/.phoronix-test-suite/installed-tests/")));
define("SAVE_RESULTS_DIR", pts_find_home(pts_read_user_config(P_OPTION_RESULTS_DIRECTORY, "~/.phoronix-test-suite/test-results/")));
+ define("SCTP_DIR", pts_find_home(pts_read_user_config(P_OPTION_SCTP_DIRECTORY, "~/.phoronix-test-suite/sctp/")));
define("PTS_DOWNLOAD_CACHE_DIR", pts_find_home(pts_download_cache()));
pts_extended_init();
}
@@ -150,7 +151,7 @@ function pts_extended_init()
@file_put_contents(PTS_DOWNLOAD_CACHE_DIR . "make-cache-howto", "A download cache is used for conserving time and bandwidth by eliminating the need for the Phoronix Test Suite to download files that have already been downloaded once. A download cache can also be transferred between PCs running the Phoronix Test Suite. For more information on this feature, view the included documentation. To generate a download cache, run:\n\nphoronix-test-suite make-download-cache\n");
}
- $directory_check = array(TEST_ENV_DIR, SAVE_RESULTS_DIR, XML_SUITE_LOCAL_DIR, TEST_RESOURCE_LOCAL_DIR, XML_PROFILE_LOCAL_DIR);
+ $directory_check = array(TEST_ENV_DIR, SAVE_RESULTS_DIR, XML_SUITE_LOCAL_DIR, TEST_RESOURCE_LOCAL_DIR, XML_PROFILE_LOCAL_DIR, SCTP_DIR);
foreach($directory_check as $dir)
{
if(!is_dir($dir))
diff --git a/pts-core/functions/pts-interfaces.php b/pts-core/functions/pts-interfaces.php
index 21df029..c08639c 100644
--- a/pts-core/functions/pts-interfaces.php
+++ b/pts-core/functions/pts-interfaces.php
@@ -74,10 +74,13 @@ define("P_TEST_OPTIONS_MENU_GROUP_VALUE", P_TEST_OPTIONS_MENU_GROUP . "/" . S_TE
// SELF-CONTAINED TEST PROFILE SPECIFICATION
//
-define("P_TEST_SCTP_INSTALLSCRIPT", "PhoronixTestSuite/SelfContained/Installation"); // Installation routine
+define("P_TEST_SCTP_INSTALLSCRIPT", "PhoronixTestSuite/SelfContained/Install"); // Installation routine
+define("P_TEST_SCTP_VALIDATE_INSTALL", "PhoronixTestSuite/SelfContained/ValidateInstall"); // Validate installation routine
define("P_TEST_SCTP_DOWNLOADS", "PhoronixTestSuite/SelfContained/Downloads"); // Downloads XML file
define("P_TEST_SCTP_RESULTSPARSER", "PhoronixTestSuite/SelfContained/ResultsParser"); // Results Parser
+define("P_TEST_SCTP_VALIDATE_RESULT", "PhoronixTestSuite/SelfContained/ValidateResult"); // Validate results routine
define("P_TEST_SCTP_PRERUN", "PhoronixTestSuite/SelfContained/PreRun"); // Pre-run script
+define("P_TEST_SCTP_INTERIMRUN", "PhoronixTestSuite/SelfContained/InterimRun"); // Interim-run script
define("P_TEST_SCTP_POSTRUN", "PhoronixTestSuite/SelfContained/PostRun"); // Pre-run script
//
@@ -183,6 +186,7 @@ define("P_OPTION_TEST_ENVIRONMENT", "PhoronixTestSuite/Options/Installation/Envi
define("P_OPTION_CACHE_DIRECTORY", "PhoronixTestSuite/Options/Installation/CacheDirectory"); // Directory for reading/writing to download cache
define("P_OPTION_CACHE_SEARCHMEDIA", "PhoronixTestSuite/Options/Installation/SearchMediaForCache"); // Search /media/ devices for a remote download cache
define("P_OPTION_PROMPT_DOWNLOADLOC", "PhoronixTestSuite/Options/Installation/PromptForDownloadMirror"); // Results save directory
+define("P_OPTION_SCTP_DIRECTORY", "PhoronixTestSuite/Options/Installation/SelfContainedTestProfileDirectory"); // Directory for reading/writing to download cache
define("P_OPTION_BATCH_CONFIGURED", "PhoronixTestSuite/Options/BatchMode/Configured"); // Batch mode has been configured
define("P_OPTION_BATCH_SAVERESULTS", "PhoronixTestSuite/Options/BatchMode/SaveResults"); // Batch mode save results