if USE_64 is set use option -d64 to java

write to stderr like the programs do so output is in order and logfiles
	are clean
fixed path so script works on NT
tarted to put in markers strings so a status report script will be
	able to find the things
clean fix for the NATIVE_FLAG problem
more output for the ENVIRONMENT section
This commit is contained in:
sonja.mirtitsch%sun.com 2002-09-13 00:24:34 +00:00
Родитель 7a06f3f06e
Коммит 9672a4c6fc
1 изменённых файлов: 26 добавлений и 12 удалений

Просмотреть файл

@ -39,9 +39,9 @@ my $java;
# release <java release dir> <nss release dir> <nspr release dir>
sub usage {
print "Usage:\n";
print "$0 dist <dist_dir>\n";
print "$0 release <jss release dir> <nss release dir> "
print STDERR "Usage:\n";
print STDERR "$0 dist <dist_dir>\n";
print STDERR "$0 release <jss release dir> <nss release dir> "
. "<nspr release dir>\n";
exit(1);
}
@ -77,8 +77,8 @@ sub setup_vars {
shift @$argv;
my $dist_dir = shift @$argv or usage("did not provide dist_dir");
$ENV{CLASSPATH} .= "$pathsep$dist_dir/../classes$dbg_suffix";
$ENV{$ld_lib_path} .= "$pathsep$dist_dir/lib";
$ENV{CLASSPATH} .= "$dist_dir/../classes$dbg_suffix";
$ENV{$ld_lib_path} = $ENV{$ld_lib_path} . $pathsep . "$dist_dir/lib";
$nss_lib_dir = "$dist_dir/lib"
} elsif( $$argv[0] eq "release" ) {
shift @$argv;
@ -97,25 +97,34 @@ sub setup_vars {
}
unless( $ENV{JAVA_HOME} ) {
print "Must set JAVA_HOME environment variable\n";
print STDERR "Must set JAVA_HOME environment variable\n";
exit(1);
}
$java = "$ENV{JAVA_HOME}/jre/bin/java$exe_suffix";
(-f $java) or die "'$java' does not exist\n";
$java = $java . $ENV{NATIVE_FLAG};
if ($ENV{USE_64}) {
$java = $java . " -d64";
}
$pwfile = "passwords";
print "*****ENVIRONMENT*****\n";
print "java=$java\n";
print "$ld_lib_path=$ENV{$ld_lib_path}\n";
print "CLASSPATH=$ENV{CLASSPATH}\n";
print STDERR "*****ENVIRONMENT*****\n";
print STDERR "java=$java\n";
print STDERR "NATIVE_FLAG=$ENV{NATIVE_FLAG}\n";
print STDERR "$ld_lib_path=$ENV{$ld_lib_path}\n";
print STDERR "CLASSPATH=$ENV{CLASSPATH}\n";
print STDERR "USE_64=$ENV{USE_64}\n";
}
setup_vars(\@ARGV);
my $signingToken = "Internal Key Storage Token";
(-f $java) or die "'$java' does not exist\n";
print "*********************\n";
print STDERR "*********************\n";
#
# Make the test database directory
@ -135,6 +144,7 @@ if( ! -d $testdir ) {
$result and die "Failed to copy builtins library";
}
my $result;
print STDERR "============= Setup DB\n";
$result = system("$java org.mozilla.jss.tests.SetupDBs testdir $pwfile");
$result >>=8;
$result and die "SetupDBs returned $result";
@ -142,6 +152,7 @@ $result and die "SetupDBs returned $result";
#
# List CA certs
#
print STDERR "============= List CA certs\n";
$result = system("$java org.mozilla.jss.tests.ListCACerts $testdir");
$result >>=8;
$result and die "ListCACerts returned $result";
@ -149,18 +160,21 @@ $result and die "ListCACerts returned $result";
#
# test sockets
#
print STDERR "============= test sockets\n";
$result = system("$java org.mozilla.jss.tests.SSLClientAuth $testdir $pwfile");
$result >>=8;
$result and die "SSLClientAuth returned $result";
# test key gen
#
print STDERR "============= test key gen\n";
$result = system("$java org.mozilla.jss.tests.TestKeyGen $testdir $pwfile");
$result >>=8;
$result and die "TestKeyGen returned $result";
# test signing
#
print STDERR "============= test signing\n";
$result = system("$java org.mozilla.jss.tests.SigTest $testdir " .
"\"$signingToken\" $pwfile"); $result >>=8;
$result and die "SigTest returned $result";