diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-30 21:57:39 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-30 21:57:39 -0400 |
commit | 1ed98b508916e139fe44eb8a1d07f9637c72d3ab (patch) | |
tree | 6e87a44326c998f4b2a53598458098e3d1df5454 /pts-core/functions/pts-functions_config.php | |
parent | c2b1a9e82c7b658b2a7af9676fe95858a921023d (diff) | |
download | phoronix-test-suite-upstream-1ed98b508916e139fe44eb8a1d07f9637c72d3ab.tar.gz phoronix-test-suite-upstream-1ed98b508916e139fe44eb8a1d07f9637c72d3ab.tar.xz phoronix-test-suite-upstream-1ed98b508916e139fe44eb8a1d07f9637c72d3ab.zip |
pts-core: Write the PTS version to the last run version upon exiting in
the Phoronix Test Suite user-config.xml file
Diffstat (limited to 'pts-core/functions/pts-functions_config.php')
-rw-r--r-- | pts-core/functions/pts-functions_config.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_config.php b/pts-core/functions/pts-functions_config.php index 20c66a5..5863ac1 100644 --- a/pts-core/functions/pts-functions_config.php +++ b/pts-core/functions/pts-functions_config.php @@ -86,6 +86,10 @@ function pts_user_config_init($UserName = NULL, $UploadKey = NULL, $BatchOptions $BatchOptions[6] = "TRUE"; } + // Determine last version run of the Phoronix Test Suite + $last_version = pts_read_user_config(P_OPTION_TESTCORE_LASTVERSION, PTS_VERSION, $read_config); + if(defined("PTS_END_TIME") && !defined("PTS_EXIT") && $last_version != PTS_VERSION) + $last_version = PTS_VERSION; $config = new tandem_XmlWriter(); $config->addXmlObject(P_OPTION_GLOBAL_USERNAME, 0, $UserName); @@ -113,6 +117,8 @@ function pts_user_config_init($UserName = NULL, $UploadKey = NULL, $BatchOptions $config->addXmlObject(P_OPTION_USER_AGREEMENT, 6, $UserAgreement_MD5); $config->addXmlObject(P_OPTION_LOAD_MODULES, 6, pts_read_user_config(P_OPTION_LOAD_MODULES, "", $read_config)); + $config->addXmlObject(P_OPTION_TESTCORE_LASTVERSION, 7, $last_version); + file_put_contents(PTS_USER_DIR . "user-config.xml", $config->getXML()); } function pts_config_bool_to_string($bool) |