summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGE-LOG1
-rw-r--r--pts-core/functions/pts-functions-run.php3
-rwxr-xr-xpts-core/test-libraries/timed-kill.sh3
-rwxr-xr-xpts/test-resources/base/wine-humus-tests/install.sh8
4 files changed, 7 insertions, 8 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 8479b99..641e05d 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -13,6 +13,7 @@ Phoronix Test Suite (Git)
- pts-core: Add support for reading detailed RAM information on OpenSolaris using DMI
- pts-core: Fix bug that caused installation of multiple Cascading Test Profiles to only go one level deep
- pts-core: Rework code to pts_hw_string() and pts_sw_string()
+- pts-core: Add timed kill infrasturcture to kill a process from a test script by calling $TIMED_KILL <process_name> <time_in_seconds>
- pts: Switch tandem-xml test profile to using $PHP_BIN instead of calling php (thus allows it to run where PHP isn't part of their path, such as Solaris)
- pts: Switch pts-graph test profile to using $PHP_BIN instead of calling php (thus allows it to run where PHP isn't part of their path, such as Solaris)
- pts: Add additional run-time tests for x11perf test profile
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php
index a047976..c2a2199 100644
--- a/pts-core/functions/pts-functions-run.php
+++ b/pts-core/functions/pts-functions-run.php
@@ -493,7 +493,8 @@ function pts_run_test($test_identifier, $extra_arguments = "", $arguments_descri
$benchmark_log_file = TEST_ENV_DIR . $test_identifier . "/" . $test_identifier . "-" . THIS_RUN_TIME . "-" . ($i + 1) . ".log";
$start_timer = TEST_LIBRARIES_DIR . "timer-start.sh";
$stop_timer = TEST_LIBRARIES_DIR . "timer-stop.sh";
- $test_extra_runtime_variables = array_merge($extra_runtime_variables, array("LOG_FILE" => $benchmark_log_file, "TIMER_START" => $start_timer, "TIMER_STOP" => $stop_timer, "PHP_BIN" => PHP_BIN));
+ $timed_kill = TEST_LIBRARIES_DIR . "timed-kill.sh";
+ $test_extra_runtime_variables = array_merge($extra_runtime_variables, array("LOG_FILE" => $benchmark_log_file, "TIMER_START" => $start_timer, "TIMER_STOP" => $stop_timer, "TIMED_KILL" => $timed_kill, "PHP_BIN" => PHP_BIN));
echo pts_string_header($test_title . " (Run " . ($i + 1) . " of " . $times_to_run . ")");
$result_output = array();
diff --git a/pts-core/test-libraries/timed-kill.sh b/pts-core/test-libraries/timed-kill.sh
new file mode 100755
index 0000000..ffb0661
--- /dev/null
+++ b/pts-core/test-libraries/timed-kill.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+(sleep $2; killall -9 $1) > /dev/null 2>&1 &
+
diff --git a/pts/test-resources/base/wine-humus-tests/install.sh b/pts/test-resources/base/wine-humus-tests/install.sh
index d6ae29c..e7bf6f5 100755
--- a/pts/test-resources/base/wine-humus-tests/install.sh
+++ b/pts/test-resources/base/wine-humus-tests/install.sh
@@ -1,13 +1,7 @@
#!/bin/sh
echo "#!/bin/sh
-sleep 60
-killall -9 \$1
-" > humus-kill-process
-chmod +x humus-kill-process
-
-echo "#!/bin/sh
-humus-kill-process \$1 &
+\$TIMED_KILL \$1 60
export WINEDEBUG=fps
wine \$1 > \$LOG_FILE 2>&1" > wine-humus-run
chmod +x wine-humus-run