Skip to content

Commit

Permalink
Use configAltPath for jti files
Browse files Browse the repository at this point in the history
Signed-off-by: Mesbah-Alam <Mesbah_Alam@ca.ibm.com>
  • Loading branch information
Mesbah-Alam committed May 27, 2022
1 parent 1898c35 commit 2ee71c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions jck/jck.mk
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ ifndef JCK_ROOT
endif

ifndef CONFIG_ALT_PATH
export CONFIG_ALT_PATH:=$(TEST_ROOT)$(D)jck$(D)jtrunner$(D)config$(D)default
export CONFIG_ALT_PATH:=$(TEST_ROOT)$(D)jck$(D)jtrunner$(D)config
endif

OTHER_OPTS=
# if JDK_IMPL is openj9 or ibm
ifneq ($(filter openj9 ibm, $(JDK_IMPL)),)
OTHER_OPTS= -Xtrace:maximal=all{level2} -Xfuture
export CONFIG_ALT_PATH:=$(JCK_ROOT)$(D)config$(D)default
export CONFIG_ALT_PATH:=$(JCK_ROOT)$(D)config
ifneq (,$(findstring zos, $(SPEC)))
OTHER_OPTS += -Dcom.ibm.tools.attach.enable=yes
endif
Expand Down
11 changes: 7 additions & 4 deletions jck/jtrunner/JavaTestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@ public static boolean generateJTB() throws Exception {
if (platform.equals("solaris")) {
nativesLoc = jckRoot + File.separator + "natives" + File.separator + "sunos";
}
jtiFile = testRoot + File.separator + "jck" + File.separator + "jtrunner" + File.separator + CONFIG + File.separator + jckVersion + File.separator + testSuite.toLowerCase() + ".jti";
fileUrl = "file:///" + jckBase + "/testsuite.jtt";

jtiFile = configAltPath + File.separator + jckVersion + File.separator + testSuite.toLowerCase() + ".jti";
fileUrl = "file:///" + jckBase + "/testsuite.jtt";
System.out.println("Using jti file "+ jtiFile);

// The first release of a JCK will have an initial excludes (.jtx) file in test-suite/lib - e.g. JCK-runtime-8b/lib/jck8b.jtx.
// Updates to the excludes list may subsequently be supplied as a separate file, which supersedes the initial file.
// A known failures list (.kfl) file is optional.
Expand Down Expand Up @@ -292,15 +294,16 @@ public static boolean generateJTB() throws Exception {

if (testSuite.equals("RUNTIME") && (tests.contains("api/java_net") || tests.contains("api/java_nio") || tests.contains("api/org_ietf") || tests.contains("api/javax_security") || tests.equals("api"))) {
if (!configAltPath.equals("NULL")) {
jckConfigLoc = configAltPath;
jckConfigLoc = configAltPath + File.separator + "default";
} else {
if (config.equals("NULL")) {
config = "default";
}
String subdir = "config/" + config;
String subdir = "config" + File.separator + config;
jckConfigLoc = jckRoot + File.separator + subdir;
}

System.out.println("Reading config files from "+ jckConfigLoc);
File configFolder = new File(jckConfigLoc);
if (!configFolder.exists()) {
System.out.println(testExecutionType + "Cannot locate the configuration directory containing the Kerberos and Http server settings here: " + jckConfigLoc + ". The requested tests include at least one of the tests which require these files.");
Expand Down

0 comments on commit 2ee71c3

Please sign in to comment.