projects / phoronix-test-suite.git / commitdiff
Build Results
 
Summary

Description: Unnamed repository; edit this file to name it for gitweb.
Last Change: Wed 2/3/10 13:04

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Wed 2/3/10 13:04
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 12:38
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 12:27
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 9:26
Michael Larabel  
pts: Drop MD5 hashes in... 
Tue 2/2/10 23:43
Michael Larabel  
phoromatic: Add... 
Tue 2/2/10 23:35
Michael Larabel  
pts-core: Phoromatic... 
 
> --git a/pts-core/functions/pts-functions-install.php b/pts-core/functions/pts-functions-install.php
index fea9e57
..d7bbd8b 100644
--- a/pts-core/functions/pts-functions-install.php
+++ b/pts-core/functions/pts-functions-install.php
@@ -1,12 +1,15 @@
 <?
php

-function pts_recurse_install_benchmark($TO_INSTALL)
+function 
pts_recurse_install_benchmark($TO_INSTALL, &$INSTALL_OBJ)
 {
     
$type pts_benchmark_type($TO_INSTALL);

     if(
$type == "BENCHMARK")
     {
-        
pts_install_benchmark($TO_INSTALL);
+        if(
is_array($INSTALL_OBJ))
+            
pts_install_external_dependencies($TO_INSTALL$INSTALL_OBJ);
+        else
+            
pts_install_benchmark($TO_INSTALL);
     }
     else if(
$type == "TEST_SUITE")
     {
@@ -
16,+19,@@ function pts_recurse_install_benchmark($TO_INSTALL)
         
$suite_benchmarks $xml_parser->getXMLArrayValues("PTSuite/PTSBenchmark/Benchmark");

         foreach(
$suite_benchmarks as $benchmark)
-            
pts_recurse_install_benchmark($benchmark);
+            
pts_recurse_install_benchmark($benchmark$INSTALL_OBJ);
     }
     else if(
is_file(pts_input_correct_results_path($TO_INSTALL)))
     {
@@ -
25,+28,@@ function pts_recurse_install_benchmark($TO_INSTALL)

         foreach(
$suite_benchmarks as $benchmark)
         {
-            
pts_recurse_install_benchmark($benchmark);
+            
pts_recurse_install_benchmark($benchmark$INSTALL_OBJ);
         }
     }
     else if(
trim(file_get_contents("http://www.phoronix-test-suite.com/global/profile-check.php?id=$TO_INSTALL")) == "REMOTE_FILE")
@@ -
35,+38,@@ function pts_recurse_install_benchmark($TO_INSTALL)

         foreach(
$suite_benchmarks as $benchmark)
         {
-            
pts_recurse_install_benchmark($benchmark);
+            
pts_recurse_install_benchmark($benchmark$INSTALL_OBJ);
         }
     }
     else
@@ -
79,+82,40 @@ function pts_install_benchmark($Benchmark)
     }
 }

+function 
pts_install_external_dependencies($Benchmark, &$INSTALL_OBJ)
+{
+    if(
pts_benchmark_type($Benchmark) != "BENCHMARK")
+        return;
+
+    
$xml_parser = new tandem_XmlReader(file_get_contents(XML_PROFILE_LOCATION $Benchmark ".xml"));
+    
$title $xml_parser->getXMLValue("PTSBenchmark/Information/Title");
+    
$dependencies $xml_parser->getXMLValue("PTSBenchmark/Information/ExternalDependencies");
+
+    if(empty(
$dependencies))
+        return;
+
+    
$dependencies explode(", "$dependencies);
+
+    
$dep_match_count 0;
+    if(
is_file(XML_DEPENDENCY_LOCATION os_vendor() . "-packages.xml"))
+    {
+        
$xml_parser = new tandem_XmlReader(file_get_contents(XML_DEPENDENCY_LOCATION os_vendor() . "-packages.xml"));
+        
$generic_package $xml_parser->getXMLArrayValues("Distribution/Package/GenericName");
+        
$distro_package $xml_parser->getXMLArrayValues("Distribution/Package/PackageName");
+
+        for(
$i 0$i count($generic_package); $i++)
+            if(
in_array($generic_package[$i], $dependencies))
+                if(!
in_array($distro_package[$i], $INSTALL_OBJ))
+                {
+                    
array_push($INSTALL_OBJ$distro_package[$i]);
+                    
$dep_match_count++;
+                }
+    }
+
+    if(
$dep_match_count == 0)
+    {
+        echo 
"No packages found for your distribution";
+    }
+}
+
 
?>
diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index 1a92b7e..50a3d0d 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -30,6 +30,7 @@ define("THIS_RUN_TIME", time());

 define("XML_PROFILE_LOCATION", "pts/benchmark-profiles/");
 define("XML_SUITE_LOCATION", "pts/benchmark-suites/");
+define("XML_DEPENDENCY_LOCATION", "pts/distribution-dependencies/");
 define("BENCHMARK_RESOURCE_LOCATION", "pts/benchmark-resources/");
 define("PTS_USER_DIR", pts_find_home("~/.phoronix-test-suite/"));

diff --git a/pts-core/pts-install-benchmark.php b/pts-core/pts-install-benchmark.php
index 5b7bf6f..3ab748f 100644
--- a/pts-core/pts-install-benchmark.php
+++ b/pts-core/pts-install-benchmark.php
@@ -29,6 +29,7 @@ if(empty($TO_INSTALL))
     exit;
 }

-pts_recurse_install_benchmark($TO_INSTALL);
+$install_objects = "";
+pts_recurse_install_benchmark($TO_INSTALL, $install_ob
 
Phoronix.com
Linux Driver Forums
Copyright © 2010 by Phoronix Media