Summary
Description: Phoronix Test Suite open-source benchmarking development
Last Change: Fri 5/17/13 22:52
Recent Commits
>
--git a/EXPERIMENTAL-CHANGE-LOG b/EXPERIMENTAL-CHANGE-LOG
index 1d87ed3..85bad29 100644
--- a/EXPERIMENTAL-CHANGE-LOG
+++ b/EXPERIMENTAL-CHANGE-LOG
@@ -48,6 +48,7 @@ Phoronix Test Suite
- pts-core: Add Safari, Firefox browser launch support on Mac OS X
- pts-core: Add UnsupportedPlatforms tag to test profiles, which is evaluated the opposite of SupportedPlatforms
- pts-core: Add PlatformSpecific tag to download file XML for OS-specific files
+- pts-core: Add ArchitectureSpecific tag to download file XML for hardware architecture-specific files
- pts: Move pcqs tests out of tree
- pts: Switch all relevant test profiles using ArgumentName to using ArgumentPrefix
- pts: Move the byte test profile to using the new $LOG_FILE capability for an example and for testing
diff --git a/documentation/specifications_xml_download.html b/documentation/specifications_xml_download.html
index 746bcac..16c4c8e 100644
--- a/documentation/specifications_xml_download.html
+++ b/documentation/specifications_xml_download.html
@@ -52,6 +52,12 @@ Test Profiles.</p>
<strong>Required:</strong> No<br>
<strong>Description:</strong> If this package is just needed on select operating systems / platforms, list them inside this tag
and multiple platforms can be delimited by a comma.</p>
+<p><strong>Tag:</strong> ArchitectureSpecific<br>
+<strong>Location:</strong> PhoronixTestSuite/Downloads/Package/<br>
+<strong>Internal Reference:</strong> P_DOWNLOADS_PACKAGE_ARCHSPECIFIC<br>
+<strong>Required:</strong> No<br>
+<strong>Description:</strong> If this package is just needed on select system/processor architectures, list them inside this tag
+and multiple architectures can be delimited by a comma.</p>
<!-- END OF PTS AREA -->
</div></div><div class="pts_doc_fixed"><div class="pts_doc_bottom"><div style="float: left;"><a href="http://www.phoronix-test-suite.com/">Phoronix-Test-Suite.com</a></div><div style="float: right;">Copyright © 2008 by <a href="http://www.phoronixmedia.com/">Phoronix Media</a>.</div></div></div>
</body>
diff --git a/pts-core/functions/pts-functions-install.php b/pts-core/functions/pts-functions-install.php
index c53a649..91bb64e 100644
--- a/pts-core/functions/pts-functions-install.php
+++ b/pts-core/functions/pts-functions-install.php
@@ -64,6 +64,7 @@ function pts_download_test_files($identifier)
$package_md5 = $xml_parser->getXMLArrayValues(P_DOWNLOADS_PACKAGE_MD5);
$package_filename = $xml_parser->getXMLArrayValues(P_DOWNLOADS_PACKAGE_FILENAME);
$package_platform = $xml_parser->getXMLArrayValues(P_DOWNLOADS_PACKAGE_PLATFORMSPECIFIC);
+ $package_architecture = $xml_parser->getXMLArrayValues(P_DOWNLOADS_PACKAGE_ARCHSPECIFIC);
$header_displayed = false;
if(strpos(PTS_DOWNLOAD_CACHE_DIR, "://") > 0 && ($xml_dc_file = @file_get_contents(PTS_DOWNLOAD_CACHE_DIR . "pts-download-cache.xml")) != FALSE)
@@ -97,6 +98,21 @@ function pts_download_test_files($identifier)
if(!in_array(OPERATING_SYSTEM, $platforms))
$file_exempt = true;
}
+ if(!empty($package_architecture[$i]))
+ {
+ $architectures = explode(",", $package_architecture[$i]);
+
+ foreach($architectures as $key => $value)
+ $architectures[$key] = trim($value);
+
+ $this_arch = kernel_arch();
+
+ if(strlen($this_arch) > 3 && substr($this_arch, -2) == "86")
+ $this_arch = "x86";
+
+ if(!in_array($this_arch, $architectures))
+ $file_exempt = true;
+ }
if(!is_file($download_location . $package_filename[$i]) && !$file_exempt)
{
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index f274ab7..ac73890 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -173,6 +173,7 @@ function pts_estimated_download_size($identifier)
$xml_parser = new tandem_XmlReader(pts_location_test_resources($test) . "downloads.xml");
$package_filesize_bytes = $xml_parser->getXMLArrayValues(P_DOWNLOADS_PACKAGE_FILESIZE);
$package_platform = $xml_parser->getXMLArrayValues(P_DOWNLOADS_PACKAGE_PLATFORMSPECIFIC);
+ $package_architecture = $xml_parser->getXMLArrayValues(P_DOWNLOADS_PACKAGE_ARCHSPECIFIC);
for($i = 0; $i < count($package_filesize_bytes); $i++)
{
@@ -189,6 +190,21 @@ function pts_estimated_download_size($identifier)
if(!in_array(OPERATING_SYSTEM, $platforms))
$file_exempt = true;
}
+ if(!empty($package_architecture[$i]))
+ {
+ $architectures = explode(",", $package_architecture[$i]);
+
+ foreach($architectures as $key => $value)
+ $architectures[$key] = trim($value);
+
+ $this_arch = kernel_arch();
+
+ if(strlen($this_arch) > 3 && substr($this_arch, -2) == "86")
+ $this_arch = "x86";
+
+ if(!in_array($this_arch, $architectures))
+ $file_exempt = true;
+ }
if(is_numeric($package_filesize_bytes[$i]) && !$file_exempt)
{
diff --git a/pts-core/functions/pts-interfaces.php b/pts-core/functions/pts-interfaces.php
index ee66868..f8d471e 100644
--- a/pts-core/functions/pts-interfaces.php
+++ b/pts-core/functions/pts-interfaces.php
@@ -109,6 +109,7 @@ define("P_DOWNLOADS_PACKAGE_MD5", "PhoronixTestSuite/Downloads/Package/MD5"); //
define("P_DOWNLOADS_PACKAGE_FILENAME", "PhoronixTestSuite/Downloads/Package/FileName"); // Local file-name for PTS to save package as
define("P_DOWNLOADS_PACKAGE_FILESIZE", "PhoronixTestSuite/Downloads/Package/FileSize"); // The size of the file to be downloaded (in bytes)
define("P_DOWNLOADS_PACKAGE_PLATFORMSPECIFIC", "PhoronixTestSuite/Downloads/Package/PlatformSpecific"); // If this package is needed for a specific platform, list the platforms ere
+define("P_DOWNLOADS_PACKAGE_ARCHSPECIFIC", "PhoronixTestSuite/Downloads/Package/ArchitectureSpecific"); // If this package is needed for a specific platform, list the platforms ere
// DROPPED IN PTS 1.4, USE CTP INSTEAD: define("P_DOWNLOADS_PACKAGE_DESTINATION", "PhoronixTestSuite/Downloads/Package/DownloadTo"); // Location to save file to
//
<
Copyright © 2013 by Phoronix Media