summaryrefslogtreecommitdiffstats
path: root/pts-core
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-16 21:51:06 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-16 21:51:06 -0500
commitdcf7cd85560661311d94ecd2a6aa9fd56d110186 (patch)
tree35a351ae5ebeadac68e5ee7f0c132e323f423844 /pts-core
parenta6dcb59a659b0f1b88b434419e2290eb63518a9a (diff)
downloadphoronix-test-suite-upstream-dcf7cd85560661311d94ecd2a6aa9fd56d110186.tar.gz
phoronix-test-suite-upstream-dcf7cd85560661311d94ecd2a6aa9fd56d110186.tar.xz
phoronix-test-suite-upstream-dcf7cd85560661311d94ecd2a6aa9fd56d110186.zip
pts-core: Add auto-file-select and auto-directory-selection options to
PTS auto options support
Diffstat (limited to 'pts-core')
-rw-r--r--pts-core/functions/pts-functions-run.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php
index 319cd3e..2072790 100644
--- a/pts-core/functions/pts-functions-run.php
+++ b/pts-core/functions/pts-functions-run.php
@@ -1190,6 +1190,36 @@ function pts_auto_process_test_option($identifier, &$option_names, &$option_valu
}
$option_names = $option_values;
break;
+ case "auto-file-select":
+ $names = $option_names;
+ $values = $option_values;
+ $option_names = array();
+ $option_values = array();
+
+ for($i = 0; $i < count($names) && $i < count($values); $i++)
+ {
+ if(is_file($values[$i]))
+ {
+ array_push($option_names, $names[$i]);
+ array_push($option_values, $values[$i]);
+ }
+ }
+ break;
+ case "auto-directory-select":
+ $names = $option_names;
+ $values = $option_values;
+ $option_names = array();
+ $option_values = array();
+
+ for($i = 0; $i < count($names) && $i < count($values); $i++)
+ {
+ if(is_dir($values[$i]))
+ {
+ array_push($option_names, $names[$i]);
+ array_push($option_values, $values[$i]);
+ }
+ }
+ break;
}
}
function pts_test_options($identifier)