summaryrefslogtreecommitdiffstats
path: root/pts-core
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-11 19:41:48 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-11 19:41:48 -0500
commitacd4b7b20862a226729b6711628bf578d8e53cf4 (patch)
treed1f98e7816c02642565d3ac28175860855117ad9 /pts-core
parentf4d3b24bfac3f4e015fec41a19e4297a34050d07 (diff)
downloadphoronix-test-suite-upstream-acd4b7b20862a226729b6711628bf578d8e53cf4.tar.gz
phoronix-test-suite-upstream-acd4b7b20862a226729b6711628bf578d8e53cf4.tar.xz
phoronix-test-suite-upstream-acd4b7b20862a226729b6711628bf578d8e53cf4.zip
pts-core: Add Mode tag to suite XML specification for allowing
individual tests within a suite to be run in the batch or defaults mode
Diffstat (limited to 'pts-core')
-rw-r--r--pts-core/functions/pts-interfaces.php1
-rw-r--r--pts-core/options/run_test.php50
-rw-r--r--pts-core/results-viewer/pts-viewer.css1
3 files changed, 48 insertions, 4 deletions
diff --git a/pts-core/functions/pts-interfaces.php b/pts-core/functions/pts-interfaces.php
index 4141a1d..2b640bc 100644
--- a/pts-core/functions/pts-interfaces.php
+++ b/pts-core/functions/pts-interfaces.php
@@ -98,6 +98,7 @@ define("P_SUITE_POSTRUNMSG", "PhoronixTestSuite/SuiteInformation/PostRunMessage"
define("P_SUITE_RUNMODE", "PhoronixTestSuite/SuiteInformation/RunMode"); // Run-mode (currently, set to PCQS if it's a PCQS suite)
define("P_SUITE_TEST_NAME", "PhoronixTestSuite/RunTest/Test"); // Names of tests in suite
+define("P_SUITE_TEST_MODE", "PhoronixTestSuite/RunTest/Mode"); // Modes (if available) for the test runs in suite
define("P_SUITE_TEST_ARGUMENTS", "PhoronixTestSuite/RunTest/Arguments"); // Arguments of tests in suite
define("P_SUITE_TEST_DESCRIPTION", "PhoronixTestSuite/RunTest/Description"); // Description of tests in suite
diff --git a/pts-core/options/run_test.php b/pts-core/options/run_test.php
index 87b584a..6c3561d 100644
--- a/pts-core/options/run_test.php
+++ b/pts-core/options/run_test.php
@@ -211,10 +211,6 @@ class run_test implements pts_option_interface
$test_type = $xml_parser->getXMLValue(P_SUITE_TYPE);
}
- $TEST_RUN = $xml_parser->getXMLArrayValues(P_SUITE_TEST_NAME);
- $TEST_ARGS = $xml_parser->getXMLArrayValues(P_SUITE_TEST_ARGUMENTS);
- $TEST_ARGS_DESCRIPTION = $xml_parser->getXMLArrayValues(P_SUITE_TEST_DESCRIPTION);
-
$PRE_RUN_MESSAGE = $xml_parser->getXMLValue(P_SUITE_PRERUNMSG);
$POST_RUN_MESSAGE = $xml_parser->getXMLValue(P_SUITE_POSTRUNMSG);
$SUITE_RUN_MODE = $xml_parser->getXMLValue(P_SUITE_RUNMODE);
@@ -224,6 +220,52 @@ class run_test implements pts_option_interface
pts_set_assignment_once("IS_PCQS_MODE", true);
}
+ $TEST_RUN = array();
+ $TEST_ARGS = array();
+ $TEST_ARGS_DESCRIPTION = array();
+
+ $suite_run = $xml_parser->getXMLArrayValues(P_SUITE_TEST_NAME);
+ $suite_mode = $xml_parser->getXMLArrayValues(P_SUITE_TEST_MODE);
+ $suite_args = $xml_parser->getXMLArrayValues(P_SUITE_TEST_ARGUMENTS);
+ $suite_args_description = $xml_parser->getXMLArrayValues(P_SUITE_TEST_DESCRIPTION);
+
+ for($i = 0; $i < count($suite_run); $i++)
+ {
+ $this_test = $suite_run[$i];
+
+ switch($suite_mode[$i])
+ {
+ case "BATCH":
+ $option_output = pts_generate_batch_run_options($this_test);
+ $temp_args = $option_output[0];
+ $temp_args_description = $option_output[1];
+
+ for($x = 0; $x < count($temp_args); $x++)
+ {
+ array_push($TEST_RUN, $this_test);
+ array_push($TEST_ARGS, $temp_args[$x]);
+ array_push($TEST_ARGS_DESCRIPTION, $temp_args_description[$x]);
+ }
+ break;
+ case "DEFAULTS":
+ $option_output = pts_defaults_test_options($this_test);
+ $temp_args = $option_output[0];
+ $temp_args_description = $option_output[1];
+
+ for($x = 0; $x < count($temp_args); $x++)
+ {
+ array_push($TEST_RUN, $this_test);
+ array_push($TEST_ARGS, $temp_args[$x]);
+ array_push($TEST_ARGS_DESCRIPTION, $temp_args_description[$x]);
+ }
+ break;
+ default:
+ array_push($TEST_RUN, $this_test);
+ array_push($TEST_ARGS, $suite_args[$i]);
+ array_push($TEST_ARGS_DESCRIPTION, $suite_args_description[$i]);
+ break;
+ }
+ }
unset($xml_parser);
}
else if($to_run_type == "GLOBAL_COMPARISON" || $to_run_type == "LOCAL_COMPARISON")
diff --git a/pts-core/results-viewer/pts-viewer.css b/pts-core/results-viewer/pts-viewer.css
index b1d28d9..4985aa0 100644
--- a/pts-core/results-viewer/pts-viewer.css
+++ b/pts-core/results-viewer/pts-viewer.css
@@ -154,6 +154,7 @@ div.pts_table_col div.pts_table_cell_header
color: #FFF;
padding: 0 4px;
font-weight: bold;
+ overflow: visible;
}
div.pts_table_box
{