From 27afff7a4a9fa94ffdaab67fe516d4bee01aeb5f Mon Sep 17 00:00:00 2001 From: "pschwartau%netscape.com" Date: Wed, 8 Aug 2001 00:12:50 +0000 Subject: [PATCH] Now able to run tests against the JS2 shell (code-named "DikDik"). git-svn-id: svn://10.0.0.236/trunk@100547 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/tests/jsDriver.pl | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/mozilla/js/tests/jsDriver.pl b/mozilla/js/tests/jsDriver.pl index 90188c56a54..755c9412eb2 100755 --- a/mozilla/js/tests/jsDriver.pl +++ b/mozilla/js/tests/jsDriver.pl @@ -538,6 +538,9 @@ sub get_engine_command { } elsif ($opt_engine_type =~ /^sm(opt|debug)$/) { &dd ("getting spidermonkey engine command."); $retval = &get_sm_engine_command; + } elsif ($opt_engine_type =~ /^dd(opt|debug)$/) { + &dd ("getting dikdik engine command."); + $retval = &get_dd_engine_command; } else { die ("Unknown engine type selected, '$opt_engine_type'.\n"); } @@ -681,6 +684,62 @@ sub get_sm_engine_command { } +# +# get the shell command used to run dikdik +# +sub get_dd_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 = $opt_suite_path . "../cpp/"; + + if ($os_type eq "MAC") { + # + # On the Mac, the debug and opt builds lie in the same directory - + # + $os = "macbuild:"; + $debug = ""; + $opt = ""; + $exe = "JS2"; + } elsif ($os_type eq "WIN") { + $os = "winbuild/"; + $debug = "DikDik_shell___Win32_Debug/"; + $opt = "Release/"; + $exe = "DikDik_shell.exe"; + } else { + $os = ""; + $debug = ""; + $opt = ""; # <<<----- XXX THIS IS NOT RIGHT! CHANGE IT! + $exe = "dikdik"; + } + + + if ($opt_engine_type eq "dddebug") { + $retval = &xp_path($dir . $os . $debug . $exe); + } else { + $retval = &xp_path($dir . $os . $opt . $exe); + } + + + 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 #