bug 384502: adds ability to start MochiTest's runtests.pl on a certain test or in a specific directoryr=sayrer

This commit is contained in:
myk@mozilla.org 2007-06-14 22:42:06 -07:00
Родитель 5a994b469d
Коммит bf4ec04109
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -123,7 +123,7 @@ my $unixish = (!($is_win32) && !($is_mac));
sub main {
my ($close_when_done, $appoverride, $log_path, $autorun,
$console_level, $file_level, $help, $do_chrome);
$console_level, $file_level, $help, $do_chrome, $test_path);
GetOptions("close-when-done!"=> \$close_when_done,
"appname:s"=> \$appoverride,
"log-file:s" => \$log_path,
@ -131,6 +131,7 @@ sub main {
"console-level:s" => \$console_level,
"file-level:s" => \$file_level,
"chrome!" => \$do_chrome,
"test-path:s" => \$test_path,
"help!" => \$help);
# if the switches include --help, exit and print directions
@ -163,9 +164,9 @@ sub main {
my $url;
if ($do_chrome) {
$url = CHROMETESTS_URL . "?";
$url = CHROMETESTS_URL . ($test_path ? $test_path : "") . "?";
} else {
$url = TESTS_URL . "?";
$url = TESTS_URL . ($test_path ? $test_path : "") . "?";
}
if ($autorun) {
@ -215,6 +216,7 @@ sub usage_and_exit {
print " [--close-when-done] \\\n";
print " [--appname=/path/to/app] \\\n";
print " [--log-file=/path/to/logfile] \\\n";
print " [--test-path=relative/path/to/tests] \\\n";
print " [--file-level=DEBUG|INFO|ERROR|FATAL|WARNING] \\\n";
print " [--console-level=DEBUG|INFO|ERROR|FATAL|WARNING] \n\n";
exit(1);

Просмотреть файл

@ -242,7 +242,7 @@ function list(requestPath, directory, recurse)
count = files.length;
for each (var file in files) {
var key = requestPath + file.leafName;
var key = path + file.leafName;
var childCount = 0;
if (file.isDirectory()) {
key += "/";