#!/bin/sh # Phoronix Test Suite # Copyright (C) 2008, Phoronix Media. # http://www.phoronix.com/ # http://www.phoronix-test-suite.com/ # The Phoronix Test Suite is licensed under the GNU GPLv3. For more information see COPYING # Full path to root directory of the actual Phoronix Test Suite code export PTS_DIR=`pwd` if [ $PTS_DIR != `pwd` ] then cd $PTS_DIR fi # Location to save results, download cache, results viewer, etc. Must have trailing slash. export PTS_USER_DIR=$HOME'/.phoronix-test-suite/' # Set DOWNLOAD_CACHE if it's not set already by the user if [ "X$DOWNLOAD_CACHE" = "X" ] then export DOWNLOAD_CACHE=$PTS_USER_DIR'download-cache/' fi # Determine PHP binary location if [ -x /usr/bin/php5 ] || [ -x /usr/local/bin/php5 ] then export PHP_BIN="php5" elif [ -x /usr/bin/php ] || [ -x /usr/local/bin/php ] then export PHP_BIN="php" else export PHP_BIN="" fi # Make sure PHP is installed if [ "X$PHP_BIN" = "X" ] then echo "\n\nPHP5 CLI Must Be Installed To Run The Phoronix Test Suite!" echo "Only PHP For The Command Line Is Needed, Not A Full-Blown PHP w/ Web Server" echo "The PHP CLI package is usually called php-cli or php5-cli. Also required is the PHP GD library (php-gd)" echo "To attempt to have the dependencies installed automatically, run: phoronix-test-suite install-dependencies pts" echo "For support visit: http://www.phoronix.com/forums/forumdisplay.php?f=49\n\n" fi case "$1" in "install") $PHP_BIN pts-core/pts-run-cmd.php INSTALL_BENCHMARK $2 ;; "force-install") $PHP_BIN pts-core/pts-run-cmd.php FORCE_INSTALL_BENCHMARK $2 ;; "install-dependencies") $PHP_BIN pts-core/pts-run-cmd.php INSTALL_EXTERNAL_DEPENDENCIES $2 ;; "run") $PHP_BIN pts-core/pts-run-benchmark.php $2 ;; "batch-run") $PHP_BIN pts-core/pts-run-benchmark.php $2 BATCH ;; "benchmark") export SILENT_INSTALL=1 $PHP_BIN pts-core/pts-run-cmd.php INSTALL_BENCHMARK $2 $PHP_BIN pts-core/pts-run-benchmark.php $2 ;; "batch-benchmark") export SILENT_INSTALL=1 $PHP_BIN pts-core/pts-run-cmd.php INSTALL_BENCHMARK $2 $PHP_BIN pts-core/pts-run-benchmark.php $2 BATCH ;; "merge-results") $PHP_BIN pts-core/pts-run-cmd.php MERGE_RESULTS $2 $3 $4 ;; "remove-result") $PHP_BIN pts-core/pts-run-cmd.php REMOVE_RESULT $2 ;; "remove-all-results") $PHP_BIN pts-core/pts-run-cmd.php REMOVE_ALL_RESULTS ;; "upload") $PHP_BIN pts-core/pts-run-cmd.php UPLOAD_RESULT $2 ;; "make-download-cache") $PHP_BIN pts-core/pts-run-cmd.php MAKE_DOWNLOAD_CACHE ;; "list-tests") $PHP_BIN pts-core/pts-run-cmd.php LIST_TESTS ;; "list-suites") $PHP_BIN pts-core/pts-run-cmd.php LIST_SUITES ;; "list-results" | "list-saved-results") $PHP_BIN pts-core/pts-run-cmd.php LIST_SAVED_RESULTS ;; "show-result") $PHP_BIN pts-core/pts-run-cmd.php SHOW_RESULT $2 ;; "suite-info" | "suite-information") $PHP_BIN pts-core/pts-run-cmd.php SUITE_INFO $2 ;; "test-info" | "test-information") $PHP_BIN pts-core/pts-run-cmd.php TEST_INFO $2 ;; "system-info" | "system-information") $PHP_BIN pts-core/pts-run-cmd.php SYS_INFO ;; "sensors") export MONITOR=all $PHP_BIN pts-core/pts-run-cmd.php SENSORS ;; "sensor-options") $PHP_BIN pts-core/pts-run-cmd.php SENSOR_OPTIONS ;; "diagnostics") $PHP_BIN pts-core/pts-run-cmd.php DIAGNOSTICS_DUMP ;; "initial-config") $PHP_BIN pts-core/pts-run-cmd.php INITIAL_CONFIG ;; "version") $PHP_BIN pts-core/pts-run-cmd.php VERSION ;; "login") $PHP_BIN pts-core/pts-run-cmd.php LOGIN ;; *) echo "\n=================================" echo "Phoronix Test Suite" echo "http://www.phoronix-test-suite.com/" echo "=================================\n" echo "install : Install or Update The Specified Test(s)" echo "install-dependencies : Install The External (Distribution) Dependencies For Specified Test(s)" echo "run : Run The Specified Test/Suite" echo "batch-run : Run The Specified Test/Suite in Batch Mode" echo "benchmark : Same as manually running install and then run" echo "batch-benchmark : Same as manually running install and then run in Batch Mode" echo "merge-results : Merge two saved result sets" echo "list-tests: List all Phoronix Test Suite test profiles" echo "list-suites: List all Phoronix Test Suites" echo "list-results: List all saved results" echo "make-download-cache: Backup all saved files to ~/.phoronix-test-suite/download-cache/" echo "remove-result : Remove this saved result file and associated files" echo "remove-all-results: Removes all saved results and associated files" echo "suite-info: Show tests in a suite and other information about the suite" echo "test-info: Show information about a test" echo "system-info: Dump detected software and hardware information detected by PTS" echo "sensor-options: Show system sensors that can be monitored through PTS" echo "upload : Upload these results to be shared globally" echo "show-result : Show this result file in your web browser" echo "version: Report the Phoronix Test Suite version and code-name" echo "login: Enter in your PTS Global log-in information for uploading results" echo "\n" ;; esac