diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-26 17:25:54 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-26 17:25:54 -0400 |
commit | 31db7925977d4cf928c31f5717ee4ebfdd1f527f (patch) | |
tree | c7c96ee99c196fc90829bb9ce667f5154b82932a | |
parent | 0108fd49f1dccdbc13d5e3ffeedfc3b0e204e6f5 (diff) | |
download | phoronix-test-suite-upstream-31db7925977d4cf928c31f5717ee4ebfdd1f527f.tar.gz phoronix-test-suite-upstream-31db7925977d4cf928c31f5717ee4ebfdd1f527f.tar.xz phoronix-test-suite-upstream-31db7925977d4cf928c31f5717ee4ebfdd1f527f.zip |
When a test runs, its BenchmarkType will set a definition to
TEST_<capitalized string of BenchmarkType>
-rw-r--r-- | pts-core/functions/pts-functions-run.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php index 74c9239..573c172 100644 --- a/pts-core/functions/pts-functions-run.php +++ b/pts-core/functions/pts-functions-run.php @@ -124,6 +124,7 @@ function pts_run_benchmark($benchmark_identifier, $extra_arguments = "", $argume $arg_identifier = $xml_parser->getXMLArrayValues("PTSBenchmark/Settings/Option/Identifier"); $execute_path = $xml_parser->getXMLValue("PTSBenchmark/Settings/Default/PossiblePaths"); $default_arguments = $xml_parser->getXMLValue("PTSBenchmark/Settings/Default/Arguments"); + $test_type = $xml_parser->getXMLValue("PTSBenchmark/PhoronixTestSuite/BenchmarkType"); if(empty($times_to_run) || !is_int($times_to_run)) $times_to_run = 1; @@ -131,6 +132,14 @@ function pts_run_benchmark($benchmark_identifier, $extra_arguments = "", $argume if(empty($execute_binary)) $execute_binary = $benchmark_identifier; + if(!empty($test_type)) + { + $test_name = "TEST_" . strtoupper($test_type); + + if(!defined($test_name)) + define($test_name, 1); + } + if(is_file(BENCHMARK_ENV_DIR . $benchmark_identifier . '/' . $execute_binary) || is_link(BENCHMARK_ENV_DIR . $benchmark_identifier . '/' . $execute_binary)) { $to_execute = BENCHMARK_ENV_DIR . $benchmark_identifier . '/'; |