diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-03 09:05:13 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-03 09:05:13 -0400 |
commit | f5ced594a09ad529e55cf578becced3155302371 (patch) | |
tree | 4fc37122ee98c7149d53d092622d7352df4870c2 /pts-core/functions/pts-functions_tests.php | |
parent | 43966a76ba4e27d9a446174e5933f23eb410b88d (diff) | |
download | phoronix-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.php | 16 |
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) { |