[Mono-list] Patch for jsDriver.pl (in order to use mjs with the automated
rhino's testsuite)
Mauro Parra Miranda
mauro@novell.com
Mon, 20 Dec 2004 12:14:32 -0600
--=-lUTJgE4H7Xhrs6oY82YE
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hello,
I just made simple modification in jsDriver.pl to support the mjs
engine.
Cheers,
Mauro
--=-lUTJgE4H7Xhrs6oY82YE
Content-Disposition: attachment; filename=mjsdriver.diff
Content-Type: text/x-patch; name=mjsdriver.diff; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
--- jsDriver-mozilla.pl 2004-12-20 11:57:51.461655200 -0600
+++ jsDriver.pl 2004-12-20 12:04:24.378922696 -0600
@@ -551,6 +551,9 @@
} elsif ($opt_engine_type =~ /^ep(opt|debug)$/) {
&dd ("getting epimetheus engine command.");
$retval = &get_ep_engine_command;
+ } elsif ($opt_engine_type eq "mjs") {
+ &dd ("getting msj engine command.");
+ $retval = &get_mjs_engine_command;
} else {
die ("Unknown engine type selected, '$opt_engine_type'.\n");
}
@@ -770,6 +773,66 @@
return $retval;
}
+
+#
+# get the shell command used to run epimetheus
+#
+sub get_mjs_engine_command {
+ my $retval;
+
+ if ($opt_shell_path) {
+ # if the user provided a path to the shell, return that -
+ $retval = $opt_shell_path;
+
+ } else {
+ my $dir;
+ my $os;
+ my $debug;
+ my $opt;
+ my $exe;
+
+ $dir = "/usr/local/bin/";
+
+ if ($os_type eq "MAC") {
+ #
+ # On the Mac, the debug and opt builds lie in the same directory -
+ #
+ $os = "macbuild:";
+ $debug = "";
+ $opt = "";
+ $exe = "mjs";
+ } elsif ($os_type eq "WIN") {
+ $os = "winbuild/Epimetheus/";
+ $debug = "Debug/";
+ $opt = "Release/";
+ $exe = "mjs";
+ } else {
+ $os = "";
+ $debug = "";
+ $opt = ""; # <<<----- XXX THIS IS NOT RIGHT! CHANGE IT!
+ $exe = "mjs";
+ }
+
+
+ if ($opt_engine_type eq "mjsdebug") {
+ $retval = $dir . $os . $debug . $exe;
+ } else {
+ $retval = $dir . $os . $opt . $exe;
+ }
+
+ $retval = &xp_path($retval);
+
+ }# (user provided a path)
+
+
+ if (($os_type ne "MAC") && !(-x $retval)) {
+ # mac doesn't seem to deal with -x correctly
+ die ($retval . " is not a valid executable on this system.\n");
+ }
+
+ return $retval;
+}
+
#
# get the shell command used to run the liveconnect shell
#
--=-lUTJgE4H7Xhrs6oY82YE--