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

Description: Phoronix Test Suite open-source benchmarking development
Last Change: Tue 5/21/13 15:49

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Tue 5/21/13 15:49
Michael Larabel  
Phoronix Test Suite... 
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  
 
 
> --git a/pts-core/objects/client/display_modes/pts_basic_display_mode.php b/pts-core/objects/client/display_modes/pts_basic_display_mode.php
index bc17861
..40ccfd8 100644
--- a/pts-core/objects/client/display_modes/pts_basic_display_mode.php
+++ b/pts-core/objects/client/display_modes/pts_basic_display_mode.php
@@ -3,+3,@@
 
/*
     Phoronix Test Suite
     URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
-    Copyright (C) 2009 - 2011, Phoronix Media
-    Copyright (C) 2009 - 2011, Michael Larabel
+    Copyright (C) 2009 - 2012, Phoronix Media
+    Copyright (C) 2009 - 2012, Michael Larabel
     pts_basic_display_mode.php: The basic display mode

     This program is free software; you can redistribute it and/or modify
@@ -206,6 +206,15 @@ class pts_basic_display_mode implements pts_display_mode_interface

         return PHP_EOL . str_repeat($char, $header_size) . PHP_EOL . $heading . PHP_EOL . str_repeat($char, $header_size) . PHP_EOL . PHP_EOL;
     }
+    public function test_run_configure(&$test_profile)
+    {
+        echo PHP_EOL . PHP_EOL . $test_profile->get_title() . ($test_profile->get_app_version() != null ? ' ' . $test_profile->get_app_version() : null) . ':' . PHP_EOL . $test_profile->get_identifier() . PHP_EOL;
+        echo $test_profile->get_test_hardware_type() . ' Test Configuration';
+    }
+    public function get_tab()
+    {
+        return null;
+    }
 }

 ?>
diff --git a/pts-core/objects/client/display_modes/pts_concise_display_mode.php b/pts-core/objects/client/display_modes/pts_concise_display_mode.php
index d948369..9cb7eb2 100644
--- a/pts-core/objects/client/display_modes/pts_concise_display_mode.php
+++ b/pts-core/objects/client/display_modes/pts_concise_display_mode.php
@@ -254,6 +254,13 @@ class pts_concise_display_mode implements pts_display_mode_interface
     {
         return;
     }
+    public function test_run_configure(&$test_profile)
+    {
+        echo PHP_EOL . PHP_EOL . $test_profile->get_title() . ($test_profile->get_app_version() != null ? ' ' . $test_profile->get_app_version() : null) . ':' . PHP_EOL . $this->tab . $test_profile->get_identifier() . PHP_EOL;
+        echo $this->tab . $test_profile->get_test_hardware_type() . ' Test Configuration';
+        //echo PHP_EOL;
+        //echo $this->tab . 'Test ' . $test_run_manager->get_test_run_position() . ' of ' . $test_run_manager->get_test_run_count_reported() . PHP_EOL;
+    }
     public function test_run_start(&$test_run_manager, &$test_result)
     {
         echo PHP_EOL . PHP_EOL . $test_result->test_profile->get_title() . ($test_result->test_profile->get_app_version() != null ? ' ' . $test_result->test_profile->get_app_version() : null) . ':' . PHP_EOL . $this->tab . $test_result->test_profile->get_identifier();
@@ -436,6 +443,10 @@ class pts_concise_display_mode implements pts_display_mode_interface
         }
         echo PHP_EOL;
     }
+    public function get_tab()
+    {
+        return $this->tab;
+    }
 }

 ?>
diff --git a/pts-core/objects/client/display_modes/pts_display_mode_interface.php b/pts-core/objects/client/display_modes/pts_display_mode_interface.php
index 6ab2ee9..a5ada72 100644
--- a/pts-core/objects/client/display_modes/pts_display_mode_interface.php
+++ b/pts-core/objects/client/display_modes/pts_display_mode_interface.php
@@ -3,8 +3,8 @@
 /*
     Phoronix Test Suite
     URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
-    Copyright (C) 2009 - 2010, Phoronix Media
-    Copyright (C) 2009 - 2010, Michael Larabel
+    Copyright (C) 2009 - 2012, Phoronix Media
+    Copyright (C) 2009 - 2012, Michael Larabel
     pts_display_mode_interface.php: The interface used by display mode objects

     This program is free software; you can redistribute it and/or modify
@@ -36,6 +36,7 @@ interface pts_display_mode_interface
     public function test_install_output(&$to_output);
     public function test_install_error($error_string);
     public function test_install_prompt($prompt_string);
+    public function test_run_configure(&$test_profile);
     public function test_run_start(&$test_run_manager, &$test_result);
     public function test_run_message($message_string);
     public function test_run_instance_header(&$test_result);
@@ -49,6 +50,7 @@ interface pts_display_mode_interface
     public function generic_sub_heading($string);
     public function generic_error($string);
     public function generic_warning($string);
+    public function get_tab();
 }

 ?>
diff --git a/pts-core/objects/pts_test_run_options.php b/pts-core/objects/pts_test_run_options.php
index 70b1d6d..40cb5ad 100644
--- a/pts-core/objects/pts_test_run_options.php
+++ b/pts-core/objects/pts_test_run_options.php
@@ -37,13 +37,13 @@ class pts_test_run_options

         $identifier = $test_profile->get_identifier_base_name();

-        foreach($test_profile->get_test_option_objects() as $i => $o)
+        if(count($test_profile->get_test_option_objects()) > 0)
         {
-            if($i == 0)
-            {
-                pts_client::$display->generic_heading($test_profile->get_title() . ' Test Configuration');
-            }
+            pts_client::$display->test_run_configure($test_profile);
+        }

+        foreach($test_profile->get_test_option_objects() as $i => $o)
+        {
             $option_identifier = $o->get_identifier();

             if($o->option_count() == 0)
@@ -75,11 +75,11 @@ class pts_test_run_options

                     if(count($option_names) > 1)
                     {
-                        echo PHP_EOL . $o->get_name() . ':' . PHP_EOL;
+                        //echo PHP_EOL . $o->get_name() . ':' . PHP_EOL;
                         array_push($option_names, 'Test All Options');
                     }

-                    $bench_choice = pts_user_io::prompt_text_menu('Enter Your Choice', $option_names, true, true);
+                    $bench_choice = pts_user_io::prompt_text_menu($o->get_name(), $option_names, true, true, pts_client::$display->get_tab() . pts_client::$display->get_tab());
                 }

                 $bench_choice = $o->parse_selection_choice_input($bench_choice);
diff --git a/pts-core/objects/pts_user_io.php b/pts-core/objects/pts_user_io.php
index 1374f70..928860e 100644
--- a/pts-core/objects/pts_user_io.php
+++ b/pts-core/objects/pts_user_io.php
@@ -3,8 +3,8 @@
 /*
     Phoronix Test Suite
     URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
-    Copyright (C) 2008 - 2011, Phoronix Media
-    Copyright (C) 2008 - 2011, Michael Larabel
+    Copyright (C) 2008 - 2012, Phoronix Media
+    Copyright (C) 2008 - 2012, Michael Larabel

     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -138,7 +138,7 @@ class pts_user_io

         return $answer;
     }
-    public static function prompt_text_menu($user_string, $options_r, $allow_multi_select = false, $return_index = false)
+    public static function prompt_text_menu($user_string, $options_r, $allow_multi_select = false, $return_index = false, $line_prefix = null)
     {
         $option_count = count($options_r);

@@ -156,9 +156,9 @@ class pts_user_io
             foreach(array_keys($options_r) as $i => $key)
             {
                 $key_index[($i + 1)] = $key;
-                echo ($i + 1) . ': ' . str_repeat(' ', strlen($option_count) - strlen(($i + 1))) . $options_r[$key] . PHP_EOL;
+                echo $line_prefix . ($i + 1) . ': ' . str_repeat(' ', strlen($option_count) - strlen(($i + 1))) . $options_r[$key] . PHP_EOL;
             }
-            echo PHP_EOL . $user_string . ': ';
+            echo $line_prefix . $user_string . ': ';
             $select_choice = pts_user_io::read_user_input();

             foreach(($allow_multi_select ? pts_strings::comma_explode($select_choice) : array($select_choice))&n
 
Phoronix.com
Linux Driver Forums
Copyright © 2013 by Phoronix Media