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

Description: Phoronix Test Suite open-source benchmarking development
Last Change: Fri 5/17/13 22:52

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Fri 5/17/13 22:52
Michael Larabel  
phodevi: Report CPU... 
Wed 5/15/13 21:50
Michael Larabel  
Phoronix Test Suite... 
Wed 5/15/13 21:39
Michael Larabel  
pts-core: DragonFlyBSD... 
Wed 5/15/13 15:47
Michael Larabel  
pts-core: Updates from... 
Wed 5/15/13 15:43
Michael Larabel  
 
Sat 5/11/13 13:55
Michael Larabel  
pts-core: Fix for... 
 
> --git a/pts-core/definitions/test-profile.xml b/pts-core/definitions/test-profile.xml
index 4e597f2
..0b8e17b 100644
--- a/pts-core/definitions/test-profile.xml
+++ b/pts-core/definitions/test-profile.xml
@@ -182,+182,@@ PATH environment variable will contain each of the test directories below this t
         
<Define>
             <
Name>P_TEST_ESTIMATEDTIME</Name>
             <
Value>PhoronixTestSuite/TestProfile/EstimatedLength</Value>
-            <
Description>The estimated length (in minutesthat it takes this benchmark to run in total.</Description>
+            <
Description>The estimated length (in secondsthat it takes this benchmark to run in total.</Description>
             <
Required>NO</Required>
         </
Define>
         <
Define>
diff --git a/pts-core/library/pts-functions_types.php b/pts-core/library/pts-functions_types.php
index 9cb905f
..36a19ff 100644
--- a/pts-core/library/pts-functions_types.php
+++ b/pts-core/library/pts-functions_types.php
@@ -435,28 +435,@@ function pts_test_needs_updated_install($identifier)
     
$test_profile = new pts_test_profile($identifier);

     
// Checks if test needs updating
-    return !pts_test_installed($identifier) || !pts_strings::version_strings_comparable($test_profile->get_test_profile_version(), $installed_test->get_installed_version()) || pts_test_checksum_installer($identifier) != $installed_test->get_installed_checksum() || $installed_test->get_installed_system_identifier() != phodevi::system_id_string() || pts_is_assignment("PTS_FORCE_INSTALL");
-}
-function 
pts_test_checksum_installer($identifier)
-{
-    
// Calculate installed checksum
-    $test_resources_location pts_tests::test_resources_location($identifier);
-    
$os_postfix '_' strtolower(OPERATING_SYSTEM);
-
-    if(
is_file($test_resources_location "install" $os_postfix ".sh"))
-    {
-        
$md5_checksum md5_file($test_resources_location "install" $os_postfix ".sh");
-    }
-    else if(
is_file($test_resources_location "install.sh"))
-    {
-        
$md5_checksum md5_file($test_resources_location "install.sh");
-    }
-    else
-    {
-        
$md5_checksum null;
-    }
-
-    return 
$md5_checksum;
+    return !
pts_test_installed($identifier) || !pts_strings::version_strings_comparable($test_profile->get_test_profile_version(), $installed_test->get_installed_version()) || $test_profile->get_installer_checksum() != $installed_test->get_installed_checksum() || $installed_test->get_installed_system_identifier() != phodevi::system_id_string() || pts_is_assignment("PTS_FORCE_INSTALL");
 }
 function 
pts_test_read_xml($identifier$xml_option)
 {
@@ -
556,+535,@@ function pts_estimated_environment_size($identifier)
 }
 function 
pts_estimated_run_time($identifier$return_total_time true$return_on_missing true)
 {
+    
// TODO: to replace with pts_test_run_manager->get_estimated_run_time() or pts_test_profile->get_estimated_run_time()
     // Estimate the time it takes (in seconds) to complete the given test
     
$estimated_lengths = array();
     
$estimated_total 0;
diff --git a/pts-core/library/pts-includes-gui.php b/pts-core/library/pts-includes-gui.php
index dc01039
..84a7e7d 100644
--- a/pts-core/library/pts-includes-gui.php
+++ b/pts-core/library/pts-includes-gui.php
@@ -160,+160,@@ function pts_test_download_files_locally_available($identifier)
     foreach(
pts_contained_tests($identifiertruetruefalse) as $name)
     {
         
$test_object_downloads pts_test_install_request::read_download_object_list($name);
+        
$test_profile = new pts_test_profile($name);

         foreach(
$test_object_downloads as &$download_package)
         {
@@ -
169,+170,@@ function pts_test_download_files_locally_available($identifier)
             }
         }

-        if(
count($test_object_downloads) == && !pts_is_base_test($name) && pts_test_checksum_installer($name) == null)
+        if(
count($test_object_downloads) == && !pts_is_base_test($name) && $test_profile->get_installer_checksum() == null)
         {
             
$xml_parser = new pts_test_tandem_XmlReader($name);
             
$execute_binary $xml_parser->getXMLValue(P_TEST_EXECUTABLE);
diff --git a/pts-core/library/pts-includes-run.php b/pts-core/library/pts-includes-run.php
index 11ef7c3
..2663bdd 100644
--- a/pts-core/library/pts-includes-run.php
+++ b/pts-core/library/pts-includes-run.php
@@ -185,23 +185,20 @@ function pts_call_test_runs(&$test_run_manager, &$tandem_xml null)
         
$loop_end_time time() + $total_loop_time_seconds;

         
pts_client::$display->generic_heading("Estimated Run-Time: " pts_date_time::format_time_string($total_loop_time_seconds"SECONDS"true60));
-        
pts_set_assignment("EST_TIME_REMAINING"$total_loop_time_seconds);

         do
         {
             for(
$i 0$i $tests_to_run_count && $test_flag && time() < $loop_end_time$i++)
             {
                 
$test_flag pts_process_test_run_request($test_run_manager$tandem_xml$i);
-                
pts_set_assignment("EST_TIME_REMAINING", ($loop_end_time time()));
             }
         }
         while(
time() < $loop_end_time && $test_flag);
     }
     else if((
$total_loop_count pts_client::read_env("TOTAL_LOOP_COUNT")) && is_numeric($total_loop_count))
     {
-        if((
$estimated_length pts_estimated_run_time($test_run_manager)) > 1)
+        if((
$estimated_length $test_run_manager->get_estimated_run_time()) > 1)
         {
-            
pts_set_assignment("EST_TIME_REMAINING", ($estimated_length $total_loop_count));
             
pts_client::$display->generic_heading("Estimated Run-Time: " pts_date_time::format_time_string(($estimated_length $total_loop_count), "SECONDS"true60));
         }

@@ -
210,22 +207,19 @@ function pts_call_test_runs(&$test_run_manager, &$tandem_xml null)
             for(
$i 0$i $tests_to_run_count && $test_flag$i++)
             {
                 
$test_flag pts_process_test_run_request($test_run_manager$tandem_xml$i, ($loop $tests_to_run_count $i 1), ($total_loop_count $tests_to_run_count));
-                
pts_set_assignment("EST_TIME_REMAINING", ($test_run_manager->get_estimated_run_time_remaining($i 1) + ($estimated_length * ($total_loop_count $loop 1))));
             }
         }
     }
     else
     {
-        if((
$estimated_length pts_estimated_run_time($test_run_manager)) > 1)
+        if((
$estimated_length $test_run_manager->get_estimated_run_time()) > 1)
         {
-            
pts_set_assignment("EST_TIME_REMAINING"$estimated_length);
             
pts_client::$display->generic_heading("Estimated Run-Time: " pts_date_time::format_time_string($estimated_length"SECONDS"true60));
         }

         for(
$i 0$i $tests_to_run_count && $test_flag$i++)
         {
             
$test_flag pts_process_test_run_request($test_run_manager$tandem_xml$i, ($i 1), $tests_to_run_count);
-            
pts_set_assignment("EST_TIME_REMAINING"$test_run_manager->get_estimated_run_time_remaining($i 1));
         }
     }

diff --git a/pts-core/modules/gui_gtk_events.php b/pts-core/modules/gui_gtk_events.php
index c05159d
..16411c2 100644
--- a/pts-core/modules/gui_gtk_events.php
+++ b/pts-core/modules/gui_gtk_events.php
@@ -148,+148,@@ class gui_gtk_events extends pts_module_interface
         
if(self::$test_run_count == $test_run_count)
         {
             
$remaining_length pts_estimated_run_time(self::$tests_remaining_to_run);
-            
$estimated_length pts_estimated_run_time($test_result->get_test_profile()->get_identifier());
+            
$estimated_length $test_result->get_test_profile()->get_estimated_run_time();

             if(
$estimated_length 1)
             {
diff --git a/pts-core/modules/phoromatic.php b/pts-core/modules/phoromatic.php
index 91dbc4c
..26b7e9f 100644
--- a/pts-core/modules/phoromatic.php
+++ b/pts-core/modules/phoromatic.php
@@ -485,+485,@@ class phoromatic extends pts_module_interface
             
return false;
         }

+        
// TODO: need a way to get the estimated time remaining from the test_run_manager so we can pass that back to the update_system_status parameter so server can read it
+
         
phoromatic::update_system_status("Running " $pts_test_result->get_test_profile()->get_identifier() . " For " pts_read_assignment("PHOROMATIC_TITLE"));
     }
     public static function 
__event_user_error($user_error)
@@ -
559,+561,@@ class phoromatic extends pts_module_interface

         
return self::read_xml_value($server_responseM_PHOROMATIC_GEN_RESPONSE) == M_PHOROMATIC_RESPONSE_TRUE;
     }
-    protected static function 
update_system_status($current_task)
+    protected static function 
update_system_status($current_task$estimated_time_remaining 0)
     {
-        
$server_response phoromatic::upload_to_remote_server(array("r" => "update_system_status""a" => $current_task"time" => round(pts_read_assignment("EST_TIME_REMAINING") / 60)));
+        
$server_response phoromatic::upload_to_remote_server(array("r" => "update_system_status""a" => $current_task"time" => $estimated_time_remaining));

         return 
self::read_xml_value($server_responseM_PHOROMATIC_GEN_RESPONSE) == M_PHOROMATIC_RESPONSE_TRUE;
     }
diff --git a/pts-core/objects/display_modes/pts_concise_display_mode.php b/pts-core/objects/display_modes/pts_concise_display_mode.php
index 6a8b20e
..62cafa3 100644
--- a/pts-core/objects/display_modes/pts_concise_display_mode.php
+++ b/pts-core/objects/display_modes/pts_concise_display_mode.php
@@ -284,+284,@@ class pts_concise_display_mode implements pts_display_mode_interface
             array_shift
($this->run_process_tests_remaining_to_run);
         }

-        
$estimated_length pts_estimated_run_time($test_result->get_test_profile()->get_identifier());
+        
$estimated_length $test_result->get_test_profile()->get_estimated_run_time();
         if(
$estimated_length 1)
         {
             echo 
$this->tab "Estimated Test Run-Time: " pts_date_time::format_time_string($estimated_length"SECONDS"true60) . "\n";
diff --git a/pts-core/objects/pts_test_profile.php b/pts-core/objects/pts_test_profile.php
index aac4215
..4e5dd28 100644
--- a/pts-core/objects/pts_test_profile.php
+++ b/pts-core/objects/pts_test_profile.php
@@ -206,+206,24 @@ class pts_test_profile
     
{
         return 
$this->xml_parser->getXMLValue(P_TEST_MAX_LENGTH);
     }
+    public function 
get_estimated_run_time()
+    {
+        
// get estimated run-time (in seconds)
+
+        
$installed_test = new pts_installed_test($this->identifier);
+        
$this_length $installed_test->get_average_run_time();
+
+        if(
is_numeric($this_length) && $this_length 0)
+        {
+            
$estimated_time $this_length;
+        }
+        else
+        {
+            
$estimated_time $this->xml_parser->getXMLValue(P_TEST_ESTIMATEDTIME);
+        }
+
+        return 
$estimated_time;
+    }
     public function 
get_environment_testing_size()
     {
         return 
$this->xml_parser->getXMLValue(P_TEST_ENVIRONMENT_TESTING_SIZE, -1);
@@ -
277,+295,27 @@ class pts_test_profile

         
return $supported;
     }
+    public function 
get_installer_checksum()
+    {
+        
// Calculate installed checksum
+        $test_resources_location pts_tests::test_resources_location($this->identifier);
+        
$os_postfix '_' strtolower(OPERATING_SYSTEM);
+
+        if(
is_file($test_resources_location "install" $os_postfix ".sh"))
+        {
+            
$md5_checksum md5_file($test_resources_location "install" $os_postfix ".sh");
+        }
+        else if(
is_file($test_resources_location "install.sh"))
+        {
+            
$md5_checksum md5_file($test_resources_location "install.sh");
+        }
+        else
+        {
+            
$md5_checksum null;
+        }
+
+        return 
$md5_checksum;
+    }
     public function 
suites_containing_test()
     {
         
$associated_suites = array();
diff --git a/pts-core/objects/pts_test_run_manager.php b/pts-core/objects/pts_test_run_manager.php
index f7c01db
..2e8a3f3 100644
--- a/pts-core/objects/pts_test_run_manager.php
+++ b/pts-core/objects/pts_test_run_manager.php
@@ -189,22 +189,26 @@ class pts_test_run_manager

         
return $identifiers;
     }
+    public function 
get_estimated_run_time()
+    {
+        return 
$this->get_estimated_run_time_remaining(0);
+    }
     public function 
get_estimated_run_time_remaining($index 0)
     {
-        
$est_time 0;
+        
$estimated_time 0;

         if(isset(
$this->tests_to_run[$index]))
         {
             for(
$i $index$i count($this->tests_to_run); $i++)
             {
-                
$test_identifier $this->tests_to_run[$i]->get_identifier(); // is a test_run_request
-                $test_time pts_estimated_run_time($test_identifiertruefalse);
+                
$identifier $this->tests_to_run[$i]->get_identifier(); // is a test_run_request

-                $est_time += $test_time;
+                
$test_profile = new pts_test_profile($identifier);
+                
$estimated_time += $test_profile->get_estimated_run_time();
             }
         }

-        return 
$est_time;
+        return 
$estimated_time;
     }
     public function 
get_test_to_run($index)
     {
diff --git a/pts-core/objects/pts_tests.php b/pts-core/objects/pts_tests.php
index c5d9c2c
..b332982 100644
--- a/pts-core/objects/pts_tests.php
+++ b/pts-core/objects/pts_tests.php
@@ -275,+275,@@ class pts_tests
         $test_profile 
= new pts_test_profile($identifier);

         
$test_version $is_install $test_profile->get_test_profile_version() : $xml_parser->getXMLValue(P_INSTALL_TEST_VERSION);
-        
$test_checksum $is_install pts_test_checksum_installer($identifier) : $xml_parser->getXMLValue(P_INSTALL_TEST_CHECKSUM);
+        
$test_checksum $is_install $test_profile->get_installer_checksum() : $xml_parser->getXMLValue(P_INSTALL_TEST_CHECKSUM);
         
$sys_identifier $is_install phodevi::system_id_string() : $xml_parser->getXMLValue(P_INSTALL_TEST_SYSIDENTIFY);
         
$install_time $is_install date("Y-m-d H:i:s") : $xml_parser->getXMLValue(P_INSTALL_TEST_INSTALLTIME);
         
$install_time_length $is_install $this_duration $xml_parser->getXMLValue(P_INSTALL_TEST_INSTALLTIME_LENGTH);
<
 
Phoronix.com
Linux Driver Forums
Copyright © 2013 by Phoronix Media