|
1 | 1 | /* |
2 | | - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
31 | 31 | * @requires vm.flagless |
32 | 32 | * @library /test/lib |
33 | 33 | * @compile GetAvailableProcessors.java |
34 | | - * @run testng TestAvailableProcessors |
| 34 | + * @run testng/othervm/native TestAvailableProcessors |
35 | 35 | */ |
36 | 36 |
|
37 | 37 | import java.io.IOException; |
38 | | -import java.nio.file.Path; |
39 | | -import java.nio.file.Paths; |
40 | | -import java.util.ArrayList; |
41 | 38 | import java.util.List; |
42 | 39 | import java.util.HashSet; |
43 | 40 | import java.util.Set; |
44 | 41 |
|
45 | | -import jdk.test.lib.Utils; |
46 | 42 | import jdk.test.lib.process.OutputAnalyzer; |
47 | 43 | import jdk.test.lib.process.ProcessTools; |
48 | 44 |
|
@@ -172,12 +168,8 @@ private static void verifyAvailableProcessorsWithEnabledProductFlag(boolean sche |
172 | 168 |
|
173 | 169 | @Test |
174 | 170 | private static void testProcessorAvailability() throws IOException { |
175 | | - // Launch GetProcessorInfo.exe to gather processor counts |
176 | | - Path nativeGetProcessorInfo = Paths.get(Utils.TEST_NATIVE_PATH) |
177 | | - .resolve("GetProcessorInfo.exe") |
178 | | - .toAbsolutePath(); |
179 | | - |
180 | | - var processBuilder = new ProcessBuilder(nativeGetProcessorInfo.toString()); |
| 171 | + // Launch "<nativepath>/GetProcessorInfo.exe" to gather processor counts |
| 172 | + var processBuilder = new ProcessBuilder("GetProcessorInfo.exe"); |
181 | 173 | var outputAnalyzer= new OutputAnalyzer(processBuilder.start()); |
182 | 174 | outputAnalyzer.shouldHaveExitValue(0); |
183 | 175 | outputAnalyzer.shouldContain(totalProcessorCountMessage); |
|
0 commit comments