Merge branch 'master' of http://www.phorogit.com/repo/phoronix-test-suite
[phoronix-test-suite/plouj.git] / phoronix-test-suite
blob3c79894e2aaf5d5f68954eeb7b7d1261ac552056
1 #!/bin/sh
4 # Phoronix Test Suite
5 # URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
6 # Copyright (C) 2008, Phoronix Media
7 # Copyright (C) 2008, Michael Larabel
8 # phoronix-test-suite: The Phoronix Test Suite is an extensible open-source testing platform for Linux.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 3 of the License, or
13 # (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 # Full path to root directory of the actual Phoronix Test Suite code
25 export PTS_DIR=`pwd`
27 if [ $PTS_DIR != `pwd` ]
28 then
29 cd $PTS_DIR
32 # Location to save results, download cache, results viewer, etc. Must have trailing slash.
33 export PTS_USER_DIR=$HOME'/.phoronix-test-suite/'
35 # Determine PHP binary location
36 if [ -x /usr/bin/php5 ] || [ -x /usr/local/bin/php5 ]
37 then
38 export PHP_BIN="php5"
39 elif [ -x /usr/bin/php ] || [ -x /usr/local/bin/php ]
40 then
41 export PHP_BIN="php"
42 elif [ -x /usr/php5/bin/php ]
43 then
44 export PHP_BIN="/usr/php5/bin/php"
45 else
46 export PHP_BIN=""
49 # Make sure PHP is installed
50 if [ "X$PHP_BIN" = "X" ]
51 then
52 cat <<'EOT'
54 PHP5 CLI Must Be Installed To Run The Phoronix Test Suite!
55 Only PHP For The Command Line Is Needed, Not A Complete PHP w/ Web Server Installation
56 The PHP CLI package is usually called php-cli or php5-cli. Also required is the PHP GD library (php-gd)
57 For support visit: http://www.phoronix.com/forums/forumdisplay.php?f=49
59 EOT
60 exit
64 case "$1" in
65 "install")
66 $PHP_BIN pts-core/pts-run-cmd.php INSTALL_TEST $2
68 "force-install")
69 $PHP_BIN pts-core/pts-run-cmd.php FORCE_INSTALL_TEST $2
71 "install-dependencies")
72 $PHP_BIN pts-core/pts-run-cmd.php INSTALL_EXTERNAL_DEPENDENCIES $2
74 "install-all")
75 $PHP_BIN pts-core/pts-run-cmd.php INSTALL_ALL
77 "force-install-all")
78 $PHP_BIN pts-core/pts-run-cmd.php FORCE_INSTALL_ALL
80 "run")
81 $PHP_BIN pts-core/pts-run-test.php $2
83 "batch-run")
84 export PTS_BATCH_MODE=1
85 $PHP_BIN pts-core/pts-run-test.php $2
87 "benchmark")
88 export SILENT_INSTALL=1
89 $PHP_BIN pts-core/pts-run-cmd.php INSTALL_TEST $2
90 $PHP_BIN pts-core/pts-run-test.php $2
92 "batch-benchmark")
93 export PTS_BATCH_MODE=1
94 export SILENT_INSTALL=1
95 $PHP_BIN pts-core/pts-run-cmd.php INSTALL_TEST $2
96 $PHP_BIN pts-core/pts-run-test.php $2
98 "merge-results")
99 $PHP_BIN pts-core/pts-run-cmd.php MERGE_RESULTS $2 $3 $4
101 "analyze" | "analyze-results")
102 $PHP_BIN pts-core/pts-run-cmd.php ANALYZE_RESULTS $2 $3
104 "remove-result")
105 $PHP_BIN pts-core/pts-run-cmd.php REMOVE_RESULT $2
107 "remove-all-results")
108 $PHP_BIN pts-core/pts-run-cmd.php REMOVE_ALL_RESULTS
110 "upload" | "upload-result" | "upload-saved-result")
111 $PHP_BIN pts-core/pts-run-cmd.php UPLOAD_RESULT $2
113 "make-download-cache")
114 $PHP_BIN pts-core/pts-run-cmd.php MAKE_DOWNLOAD_CACHE
116 "list-tests")
117 $PHP_BIN pts-core/pts-run-cmd.php LIST_TESTS
119 "list-all-tests" | "list-tests-all")
120 $PHP_BIN pts-core/pts-run-cmd.php LIST_ALL_TESTS
122 "list-suites")
123 $PHP_BIN pts-core/pts-run-cmd.php LIST_SUITES
125 "list-modules")
126 $PHP_BIN pts-core/pts-run-cmd.php LIST_MODULES
128 "list-possible-dependencies")
129 $PHP_BIN pts-core/pts-run-cmd.php LIST_POSSIBLE_EXTERNAL_DEPENDENCIES
131 "list-installed-tests")
132 $PHP_BIN pts-core/pts-run-cmd.php LIST_INSTALLED_TESTS
134 "list-usage" | "list-test-usage")
135 $PHP_BIN pts-core/pts-run-cmd.php LIST_TEST_USAGE
137 "list-results" | "list-saved-results" | "list-test-results")
138 $PHP_BIN pts-core/pts-run-cmd.php LIST_SAVED_RESULTS
140 "show-result" | "show-results" | "view-result" | "view-results")
141 $PHP_BIN pts-core/pts-run-cmd.php SHOW_RESULT $2
143 "info" | "suite-info" | "suite-information" | "test-info" | "test-information")
144 $PHP_BIN pts-core/pts-run-cmd.php INFO $2
146 "module-info")
147 $PHP_BIN pts-core/pts-run-cmd.php MODULE_INFO $2
149 "system-info" | "system-information")
150 $PHP_BIN pts-core/pts-run-cmd.php SYS_INFO
152 "diagnostics")
153 $PHP_BIN pts-core/pts-run-cmd.php DIAGNOSTICS_DUMP
155 "clone")
156 $PHP_BIN pts-core/pts-run-cmd.php CLONE $2
158 "initial-config")
159 $PHP_BIN pts-core/pts-run-cmd.php INITIAL_CONFIG
161 "version")
162 $PHP_BIN pts-core/pts-run-cmd.php VERSION
164 "login")
165 $PHP_BIN pts-core/pts-run-cmd.php LOGIN
167 "batch-setup")
168 $PHP_BIN pts-core/pts-run-cmd.php BATCH_SETUP
170 "refresh-graph" | "refresh-graphs" | "refresh-result")
171 $PHP_BIN pts-core/pts-run-cmd.php REFRESH_GRAPHS $2
173 "test-module" | "debug-module")
174 if [ "$1" = "debug-module" ]
175 then
176 export PTS_DEBUG=1
179 export PTS_IGNORE_MODULES=1
180 $PHP_BIN pts-core/pts-run-cmd.php TEST_MODULE $2
182 "sensors" | "sensor-options")
183 echo "\nThis option was dropped from the Phoronix Test Suite. For more information and the replacement option, view the latest documentation.\n"
186 cat <<'EOT'
188 =================================
189 Phoronix Test Suite
190 URL: http://www.phoronix-test-suite.com/
191 =================================
193 Installation Options:
194 install <suite / test>: Install or update the specified suite/test(s)
195 install-dependencies <suite / test>: Install the external (distribution-level) dependencies
196 install-all: Install or update all available tests
197 list-installed-tests: List all tests that are installed
199 Testing Options:
200 benchmark <suite / test / saved file / Global ID>: Install and then run the test(s)
201 run <suite / test / saved file / Global ID>: Run the specified test(s)
202 list-tests: List all tests and relevant information
203 list-suites: List all suites and relevant information
205 Batch Testing Options:
206 batch-setup: Setup the batch mode options
207 batch-run <suite OR test>: Run the specified test(s) in batch mode
208 batch-benchmark <suite OR test OR saved file>: Install and run the test(s) in batch mode
209 analyze <suite / test / saved file / Global ID>: Provide an analysis of the results generated from a batch run
211 Result Viewing Options:
212 list-results: List all saved results
213 show-result <saved name>: Show this result file in your web browser
214 remove-result <saved name>: Remove this saved result file
215 remove-all-results: Removes all saved results
216 merge-results <saved Name 1 / Global ID> <saved Name 2 / Global ID> <save name>: Merge two sets of results
217 upload <saved name>: Upload a saved set of results to Phoronix Global
218 login: Enter your Phoronix Global log-in information for uploading results
220 Module Options:
221 list-modules: List all installed/available PTS modules
222 module-info: Show detailed information on a PTS module
224 Miscellaneous Options:
225 make-download-cache: Backup all downloaded test files to ~/.phoronix-test-suite/download-cache/
226 info <suite / test>: Show detailed information about a test or suite
227 system-info: Show detected software and hardware information
228 diagnostics: Useful information when reporting a bug or problem
229 version: Print the Phoronix Test Suite version and code-name
232 esac