+2006-04-05 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by OMG BETH
+
+ * Scripts/run-testkjs:
+ - pipe STDERR to /dev/null by default; new --verbose option overrides
+ this behavior
+ - set DYLD_FRAMEWORK_PATH to the webkit-configured path
+ - output run command in a format that can be copied and pasted into the
+ terminal to run manually
+
2006-04-03 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
use Getopt::Long;
use webkitdirs;
-my $usage = "Usage: run-testkjs [-c|--count run_count] file1 [file2...]";
+my $usage = "Usage: run-testkjs [--count run_count] [--verbose] file1 [file2...]";
my $count = 1;
-GetOptions("count|c=i" => \$count);
+my $verbose = 0;
+GetOptions("count|c=i" => \$count,
+ "verbose|v" => \$verbose);
die "$usage\n" if (@ARGV < 1);
-my $testkjs = productDir() . "/testkjs";
+my $testkjs = productDir() . "/testkjs @ARGV";
+$testkjs .= " 2> /dev/null" unless $verbose;
-print STDERR "Running $count times: \"$testkjs @ARGV\"\n";
+my $dyld = productDir();
+
+$ENV{"DYLD_FRAMEWORK_PATH"} = $dyld;
+print STDERR "Running $count time(s): DYLD_FRAMEWORK_PATH=$dyld $testkjs\n";
while ($count--) {
- system($testkjs, @ARGV) and last;
+ if (system("$testkjs") != 0) {
+ last;
+ }
}