a little better error handling if no argument provided.

git-svn-id: svn://10.0.0.236/trunk@26395 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbegle%netscape.com
1999-04-06 01:11:13 +00:00
parent b90333572e
commit 21843069bc

View File

@@ -5,10 +5,27 @@
# $MOZ_SRC/mozilla/js/tests/$suite/shell.js, $
# MOZ_SRC/mozilla/js/tests/$suite/browser.js,
# and the test.js file.
#
#
$moz_src = $ENV{"MOZ_SRC"} ||
die ("You need to set your MOZ_SRC environment variable.\n");
$test_home = $moz_src ."/js/tests/";
opendir (TEST_HOME, $test_home);
@__suites = readdir (TEST_HOME);
closedir TEST_HOME;
foreach (@__suites ) {
if ( -d $_ && $_ !~ /\./ && $_ !~ 'CVS' ) {
$suites[$#suites+1] = $_;
}
}
if ( ! $ARGV[0] ) {
die ( "Specify a directory: ". join(" ", @suites) ."\n" );
}
$js_test_dir = $moz_src . "/js/tests/" . $ARGV[0] ."/";
print "Generating html files for the tests in $js_test_dir\n";