138 // copy the files into the directory structures
139 copyFile(srcLibjvmSo, dstServerLibjvm);
140 // does not matter if it is client or a server
141 copyFile(srcLibjvmSo, dstClientLibjvm);
142 desc = "LD_LIBRARY_PATH should be set";
143 break;
144 case NO_LIBJVM:
145 if (!dstClientDir.exists()) {
146 Files.createDirectories(dstClientDir.toPath());
147 } else {
148 Files.deleteIfExists(dstClientLibjvm.toPath());
149 }
150
151 if (!dstServerDir.exists()) {
152 Files.createDirectories(dstServerDir.toPath());
153 } else {
154 Files.deleteIfExists(dstServerLibjvm.toPath());
155 }
156
157 desc = "LD_LIBRARY_PATH should not be set (no libjvm.so)";
158 break;
159 case NO_DIR:
160 if (dstLibDir.exists()) {
161 recursiveDelete(dstLibDir);
162 }
163 desc = "LD_LIBRARY_PATH should not be set (no directory)";
164 break;
165 default:
166 throw new RuntimeException("unknown case");
167 }
168
169 /*
170 * Case 1: set the server path
171 */
172 env.clear();
173 env.put(LD_LIBRARY_PATH, dstServerDir.getAbsolutePath());
174 run(env,
175 v.value + 1, // Add one to account for our setting
176 "Case 1: " + desc);
177
178 /*
179 * Case 2: repeat with client path
180 */
181 env.clear();
182 env.put(LD_LIBRARY_PATH, dstClientDir.getAbsolutePath());
183 run(env,
|
138 // copy the files into the directory structures
139 copyFile(srcLibjvmSo, dstServerLibjvm);
140 // does not matter if it is client or a server
141 copyFile(srcLibjvmSo, dstClientLibjvm);
142 desc = "LD_LIBRARY_PATH should be set";
143 break;
144 case NO_LIBJVM:
145 if (!dstClientDir.exists()) {
146 Files.createDirectories(dstClientDir.toPath());
147 } else {
148 Files.deleteIfExists(dstClientLibjvm.toPath());
149 }
150
151 if (!dstServerDir.exists()) {
152 Files.createDirectories(dstServerDir.toPath());
153 } else {
154 Files.deleteIfExists(dstServerLibjvm.toPath());
155 }
156
157 desc = "LD_LIBRARY_PATH should not be set (no libjvm.so)";
158 if (TestHelper.isAIX) {
159 System.out.println("Skipping test case \"" + desc +
160 "\" because the Aix launcher adds the paths in any case.");
161 continue;
162 }
163 break;
164 case NO_DIR:
165 if (dstLibDir.exists()) {
166 recursiveDelete(dstLibDir);
167 }
168 desc = "LD_LIBRARY_PATH should not be set (no directory)";
169 if (TestHelper.isAIX) {
170 System.out.println("Skipping test case \"" + desc +
171 "\" because the Aix launcher adds the paths in any case.");
172 continue;
173 }
174 break;
175 default:
176 throw new RuntimeException("unknown case");
177 }
178
179 /*
180 * Case 1: set the server path
181 */
182 env.clear();
183 env.put(LD_LIBRARY_PATH, dstServerDir.getAbsolutePath());
184 run(env,
185 v.value + 1, // Add one to account for our setting
186 "Case 1: " + desc);
187
188 /*
189 * Case 2: repeat with client path
190 */
191 env.clear();
192 env.put(LD_LIBRARY_PATH, dstClientDir.getAbsolutePath());
193 run(env,
|