8059627: Enable PKCS11 tests on Mac

Reviewed-by: mullan
This commit is contained in:
Vinnie Ryan 2014-10-06 16:44:57 +01:00
parent a8d4acac11
commit 3215ed2f0a
13 changed files with 12 additions and 6 deletions

View File

@ -189,6 +189,8 @@ public abstract class PKCS11Test {
if (osName.startsWith("Win")) {
osName = "Windows";
NSPR_PREFIX = "lib";
} else if (osName.equals("Mac OS X")) {
osName = "MacOSX";
}
String osid = osName + "-"
+ props.getProperty("os.arch") + "-" + props.getProperty("sun.arch.data.model");
@ -507,6 +509,8 @@ public abstract class PKCS11Test {
PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)});
osMap.put("Windows-amd64-64", new String[]{
PKCS11_BASE + "/nss/lib/windows-amd64/".replace('/', SEP)});
osMap.put("MacOSX-x86_64-64", new String[]{
PKCS11_BASE + "/nss/lib/macosx-x86_64/"});
}
private final static char[] hexDigits = "0123456789abcdef".toCharArray();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/**
* @test
* @bug 6298106 6275523 6420252
* @bug 6298106 6275523 6420252 8059627
* @summary make sure we can access the NSS trust anchor module
* @author Andreas Sterbenz
* @library ..
@ -43,10 +43,12 @@ public class TrustAnchors extends SecmodTest {
return;
}
if (System.getProperty("os.name").toLowerCase().startsWith("win")) {
// our secmod.db file says nssckbi.*so*, so NSS does not find the
// *DLL* on windows.
System.out.println("Test currently does not work on Windows, skipping");
// our secmod.db file says nssckbi.*so*, so NSS does not find the
// *DLL* on Windows nor the *DYLIB* on Mac OSX.
String osName = System.getProperty("os.name").toLowerCase();
if (osName.startsWith("win") || osName.startsWith("mac")) {
System.out.println("Test currently does not work on " + osName +
", skipping");
return;
}