summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-08-28 22:24:52 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-28 22:24:52 -0400
commite4e4ef34d342c8c4450da3a7a24c2a6bd24d7c15 (patch)
tree3512e996423a1c5a78651a9d2fe515a869577296
parent2b26cbbe895a6fe0e8aef6c2516bd3e294cbb6f1 (diff)
downloadphoronix-test-suite-upstream-e4e4ef34d342c8c4450da3a7a24c2a6bd24d7c15.tar.gz
phoronix-test-suite-upstream-e4e4ef34d342c8c4450da3a7a24c2a6bd24d7c15.tar.xz
phoronix-test-suite-upstream-e4e4ef34d342c8c4450da3a7a24c2a6bd24d7c15.zip
pts-core: Create end-user variables for having software/hardware values
when saving the results and setting the test identifier When being prompted for the test identifier in saving test results, several user variables are supported. These include $VIDEO_RESOLUTION, $VIDEO_CARD, $OPERATING_SYSTEM, $PROCESSOR, $MOTHERBOARD, and $KERNEL_VERSION. If any of these variables are entered, the Phoronix Test Suite will replace them with their respective values before saving the results.
-rw-r--r--CHANGE-LOG2
-rw-r--r--documentation/tips_and_tricks.html3
-rw-r--r--pts-core/functions/pts-functions-run.php21
3 files changed, 26 insertions, 0 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 6017dd0..2dcbc17 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -18,10 +18,12 @@ Phoronix Test Suite
- pts-core: Suppress warnings/errors from set_nvidia_extension()
- pts-core: On some Intel setups, don't report DRI in graphics string
- pts-core: Improve Intel graphics memory detection and other drivers that report the capacity as VideoRam instead of VideoRAM
+- pts-core: Create end-user variables for having software/hardware values when saving the results and setting the test identifier
- pts: Update mandrivalinux-packages.xml from Stéphane Téletchéa
- pts: Add the unigine test suite for OpenGL tech demo tests from Unigine Corp
- pts: Fix tests in java-opengl test suite
- graphics_override: Don't apply anti-aliasing or anisotropic filtering settings unless there is something to apply
+- pts_MultiPassFailGraph: Ensure the background fill reaches the bottom edge of the box
- documentation: Update the test profile and suite XML specifications
Phoronix Test Suite 1.2.0 Beta 3
diff --git a/documentation/tips_and_tricks.html b/documentation/tips_and_tricks.html
index 91c8496..5c7b614 100644
--- a/documentation/tips_and_tricks.html
+++ b/documentation/tips_and_tricks.html
@@ -26,6 +26,9 @@ be added in the future.</p>
checks will be performed when merging results and it will allow you to form custom
suites very easily, etc. Though the preferred method to create a suite is by writing
a formal suite.</p>
+<p>- When being prompted for the test identifier in saving test results, several user variables are supported. These include
+<em>$VIDEO_RESOLUTION</em>, <em>$VIDEO_CARD</em>, <em>$OPERATING_SYSTEM</em>, <em>$PROCESSOR</em>, <em>$MOTHERBOARD</em>, and <em>$KERNEL_VERSION</em>.
+If any of these variables are entered, the Phoronix Test Suite will replace them with their respective values before saving the results.</p>
<p>- If <em>RemoveDownloadFiles</em> is set to <em>TRUE</em> within the <em>user-config.xml</em> file,
once a test has been installed the originally downloaded files for that test will be automatically removed. This conserves
disk space but will cause these files to be re-downloaded the next time the test needs to be re-installed. This will also
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php
index e165487..1eab88c 100644
--- a/pts-core/functions/pts-functions-run.php
+++ b/pts-core/functions/pts-functions-run.php
@@ -71,12 +71,33 @@ function pts_prompt_results_identifier($current_identifiers = null)
if(empty($RESULTS_IDENTIFIER))
$RESULTS_IDENTIFIER = date("Y-m-d H:i");
+ else
+ $RESULTS_IDENTIFIER = pts_swap_user_variables($RESULTS_IDENTIFIER);
if(!defined("TEST_RESULTS_IDENTIFIER"))
define("TEST_RESULTS_IDENTIFIER", $RESULTS_IDENTIFIER);
return $RESULTS_IDENTIFIER;
}
+function pts_swap_user_variables($user_str)
+{
+ if(strpos($user_str, "$") !== FALSE)
+ {
+ $supported_variables = array(
+ "VIDEO_RESOLUTION" => current_screen_resolution(),
+ "VIDEO_CARD" => graphics_processor_string(),
+ "OPERATING_SYSTEM" => pts_vendor_identifier(),
+ "PROCESSOR" => processor_string(),
+ "MOTHERBOARD" => main_system_hardware_string(),
+ "KERNEL_VERSION" => kernel_string()
+ );
+
+ foreach($supported_variables as $key => $value)
+ $user_str = str_replace("$" . $key, $value, $user_str);
+ }
+
+ return $user_str;
+}
function pts_prompt_save_file_name($check_env = true)
{
// Prompt to save a file when running a test