summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_tests.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-03 08:58:05 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-03 08:58:05 -0400
commit43966a76ba4e27d9a446174e5933f23eb410b88d (patch)
tree1f7390a391798502724a4cf14f72318311e05ed3 /pts-core/functions/pts-functions_tests.php
parent908ee74877149f30580d5498d790350f2eb1425e (diff)
downloadphoronix-test-suite-upstream-43966a76ba4e27d9a446174e5933f23eb410b88d.tar.gz
phoronix-test-suite-upstream-43966a76ba4e27d9a446174e5933f23eb410b88d.tar.xz
phoronix-test-suite-upstream-43966a76ba4e27d9a446174e5933f23eb410b88d.zip
pts-core: Add PlatformSpecific tag to download file XML for OS-specific
files
Diffstat (limited to 'pts-core/functions/pts-functions_tests.php')
-rw-r--r--pts-core/functions/pts-functions_tests.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index a734c86..f274ab7 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -172,12 +172,27 @@ 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);
- foreach($package_filesize_bytes as $this_package_size)
+ for($i = 0; $i < count($package_filesize_bytes); $i++)
{
- if(is_numeric($this_package_size))
+
+ $file_exempt = false;
+
+ if(!empty($package_platform[$i]))
+ {
+ $platforms = explode(",", $package_platform[$i]);
+
+ foreach($platforms as $key => $value)
+ $platforms[$key] = trim($value);
+
+ if(!in_array(OPERATING_SYSTEM, $platforms))
+ $file_exempt = true;
+ }
+
+ if(is_numeric($package_filesize_bytes[$i]) && !$file_exempt)
{
- $estimated_size += pts_trim_double($this_package_size / 1048576);
+ $estimated_size += pts_trim_double($package_filesize_bytes[$i] / 1048576);
}
}
}