summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-06-23 12:34:00 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-03 11:49:16 -0400
commit5ebd432762a1ad7865858ec8311725b222249634 (patch)
tree0545f6a23d8a53d8345aca62787418f3aef98649
parent975f2f16a3fa108e865e3a9564a1cef82dde96af (diff)
downloadphoronix-test-suite-upstream-5ebd432762a1ad7865858ec8311725b222249634.tar.gz
phoronix-test-suite-upstream-5ebd432762a1ad7865858ec8311725b222249634.tar.xz
phoronix-test-suite-upstream-5ebd432762a1ad7865858ec8311725b222249634.zip
Add list-modules option for listing all available/installed modules
-rw-r--r--PTS-12-CHANGE-LOG1
-rw-r--r--documentation/pts_options.html4
-rwxr-xr-xphoronix-test-suite6
-rw-r--r--pts-core/modules/system_monitor.php2
-rw-r--r--pts-core/pts-run-cmd.php16
5 files changed, 27 insertions, 2 deletions
diff --git a/PTS-12-CHANGE-LOG b/PTS-12-CHANGE-LOG
index fc35c2b..4f5b74a 100644
--- a/PTS-12-CHANGE-LOG
+++ b/PTS-12-CHANGE-LOG
@@ -1,2 +1,3 @@
- Implement PTS modules support
- Move sensor monitoring support from pts-core to a new module called system_monitor
+- Add list-modules option for listing all available/installed modules
diff --git a/documentation/pts_options.html b/documentation/pts_options.html
index 0b47c04..9493a4f 100644
--- a/documentation/pts_options.html
+++ b/documentation/pts_options.html
@@ -95,6 +95,10 @@ be supplied or the PTS Global ID or saved local file name.</p>
<p>This option allows you to log-in to your PTS Global account and will store
this information automatically. A new PTS Global account can be created (for free)
at http://global.phoronix-test-suite.com/.</p>
+<h2>Module Options</h2>
+<p><strong>list-modules</strong></p>
+<p>This option will list all modules that are installed / present in the <em>pts-core/modules/<em> directory.
+Modules are used for extending the functionality of the Phoronix Test Suite without over-inflating the pts-core.</p>
<h2>Miscellaneous Options</h2>
<p><strong>make-download-cache</strong></p>
<p>This option will backup all files that were automatically downloaded by the
diff --git a/phoronix-test-suite b/phoronix-test-suite
index 92030ba..c8f6b6a 100755
--- a/phoronix-test-suite
+++ b/phoronix-test-suite
@@ -111,6 +111,9 @@ case "$1" in
"list-suites")
$PHP_BIN pts-core/pts-run-cmd.php LIST_SUITES
;;
+"list-modules")
+ $PHP_BIN pts-core/pts-run-cmd.php LIST_MODULES
+ ;;
"list-possible-dependencies")
$PHP_BIN pts-core/pts-run-cmd.php LIST_POSSIBLE_EXTERNAL_DEPENDENCIES
;;
@@ -191,6 +194,9 @@ Result Viewing Options:
upload <saved name>: Upload a saved set of results to PTS Global
login: Enter your PTS Global log-in information for uploading results
+Module Options:
+ list-modules: List all installed/available PTS modules
+
Miscellaneous Options:
make-download-cache: Backup all downloaded test files to ~/.phoronix-test-suite/download-cache/
info <suite / test>: Show detailed information about a test or suite
diff --git a/pts-core/modules/system_monitor.php b/pts-core/modules/system_monitor.php
index 01882ca..8800f56 100644
--- a/pts-core/modules/system_monitor.php
+++ b/pts-core/modules/system_monitor.php
@@ -26,7 +26,7 @@ class system_monitor extends pts_module_interface
const module_name = "System Monitor";
const module_version = "1.0.0";
const module_description = "This module contains the sensor monitoring support for the Phoronix Test Suite.";
- const module_author = "Module Creator";
+ const module_author = "Michael Larabel";
//
// General Functions
diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php
index 25358d5..0db8eef 100644
--- a/pts-core/pts-run-cmd.php
+++ b/pts-core/pts-run-cmd.php
@@ -159,7 +159,6 @@ switch($COMMAND)
break;
case "LIST_SUITES":
echo pts_string_header("Phoronix Test Suite - Suites");
- $benchmark_suites = array();
foreach(glob(XML_SUITE_DIR . "*.xml") as $benchmark_file)
{
$xml_parser = new tandem_XmlReader(file_get_contents($benchmark_file));
@@ -179,6 +178,21 @@ switch($COMMAND)
}
echo "\n";
break;
+ case "LIST_MODULES":
+ echo pts_string_header("Phoronix Test Suite - Modules");
+ foreach(glob(MODULE_DIR . "*.php") as $module_file)
+ {
+ include($module_file);
+ $module = basename($module_file, ".php");
+
+ eval("\$module_name = " . $module . "::module_name;"); // TODO: This can be cleaned up once PHP 5.3.0+ is out there and adopted
+ eval("\$module_version = " . $module . "::module_version;");
+ eval("\$module_author = " . $module . "::module_author;");
+
+ printf("%-16ls - %-24ls [Developed By: %s]\n", $module, $module_name . " v" . $module_version, $module_author);
+ }
+ echo "\n";
+ break;
case "LIST_INSTALLED_TESTS":
echo pts_string_header("Phoronix Test Suite - Installed Tests");
foreach(glob(BENCHMARK_ENV_DIR . "*/pts-install") as $install_file)