summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_tests.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-03 09:05:13 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-03 09:05:13 -0400
commitf5ced594a09ad529e55cf578becced3155302371 (patch)
tree4fc37122ee98c7149d53d092622d7352df4870c2 /pts-core/functions/pts-functions_tests.php
parent43966a76ba4e27d9a446174e5933f23eb410b88d (diff)
downloadphoronix-test-suite-upstream-f5ced594a09ad529e55cf578becced3155302371.tar.gz
phoronix-test-suite-upstream-f5ced594a09ad529e55cf578becced3155302371.tar.xz
phoronix-test-suite-upstream-f5ced594a09ad529e55cf578becced3155302371.zip
pts-core: Add ArchitectureSpecific tag to download file XML for hardware
architecture-specific files\
Diffstat (limited to 'pts-core/functions/pts-functions_tests.php')
-rw-r--r--pts-core/functions/pts-functions_tests.php16
1 files changed, 16 insertions, 0 deletions
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)
{