Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: mozilla-tests/jsDriver.pl

Issue 2865028: Update the mozilla tests to new version (as of 2010-06-29). (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mozilla-tests/js1_8_1/trace/trace-test.js ('k') | mozilla-tests/known-failures.pl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mozilla-tests/jsDriver.pl
===================================================================
--- mozilla-tests/jsDriver.pl (revision 43940)
+++ mozilla-tests/jsDriver.pl (working copy)
@@ -43,7 +43,6 @@
# Branched 11/01/99
use strict;
-use Getopt::Mixed "nextOption";
use File::Temp qw/ tempfile tempdir /;
use POSIX qw(sys_wait_h);
@@ -84,9 +83,11 @@
"h help>h i j=s javapath>j k confail>k K linefail>K R report>R l=s list>l " .
"L=s neglist>L o=s opt>o p=s testpath>p s=s shellpath>s t trace>t " .
"T=s timeout>T u=s lxrurl>u " .
- "x noexitmunge>x n:s narcissus>n " .
+ "x noexitmunge>x n=s narcissus>n " .
"Q noquitinthandler>Q";
+my $last_option;
+
if ($os_type eq "MAC") {
$opt_suite_path = `directory`;
$opt_suite_path =~ s/[\n\r]//g;
@@ -502,16 +503,48 @@
}
+sub next_option {
+ my ($key, $val, $implied);
+
+ return if @ARGV == 0;
+
+ &dd ("ARGV is now: @ARGV\n");
+
+ $key = shift @ARGV;
+ if ($key =~ s/^--?(.*)/$1/) {
+ $implied = 0;
+ } else {
+ $implied = 1;
+ $val = $key;
+ $key = $last_option;
+ }
+
+ if ($key =~ /\w+/ and $options =~ /\b$key>(\w+)/) {
+ $key = $1;
+ }
+
+ if ($options =~ /\b$key=s\b/) {
+ if (!$implied) {
+ die "option '$key' requires an argument" if @ARGV == 0;
+ $val = shift @ARGV;
+ }
+ } elsif ($options =~ /(^|\s)$key(\s|$)/) {
+ die "option '$key' doesn't take an argument" if $implied;
+ $val = 1;
+ } else {
+ die "can't figure out option '$key'";
+ }
+ $last_option = $key;
+ return ($key, $val);
+}
+
sub parse_args {
my ($option, $value, $lastopt);
&dd ("checking command line options.");
- Getopt::Mixed::init ($options);
- $Getopt::Mixed::order = $Getopt::Mixed::RETURN_IN_ORDER;
+ while (($option, $value) = next_option()) {
- while (($option, $value) = nextOption()) {
-
if ($option eq "b") {
&dd ("opt: setting bugurl to '$value'.");
$opt_bug_url = $value;
@@ -625,8 +658,6 @@
}
- Getopt::Mixed::cleanup();
-
if ($#opt_engine_list == -1) {
die "You must select a shell to test in.\n";
}
« no previous file with comments | « mozilla-tests/js1_8_1/trace/trace-test.js ('k') | mozilla-tests/known-failures.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698