Mercurial > hg > graal-jvmci-8
comparison test/runtime/NMT/PrintNMTStatistics.java @ 8814:c342fbdf8a70
8008454: test/runtime/NMT/PrintNMTStatistics is broken
Summary: Added @run tag so that it actually runs the test, also fixed broken command line and incorrect parsing. Also reviewed by gerard.ziemski@oracle.com
Reviewed-by: mgerdin, zgu
author | ctornqvi |
---|---|
date | Sun, 24 Mar 2013 09:11:55 +0100 |
parents | 1b0dc9f87e75 |
children | 21db9a1d43ef e56d11f8cc21 |
comparison
equal
deleted
inserted
replaced
8812:14509df4cd63 | 8814:c342fbdf8a70 |
---|---|
25 * @test | 25 * @test |
26 * @key nmt regression | 26 * @key nmt regression |
27 * @bug 8005936 | 27 * @bug 8005936 |
28 * @summary Make sure PrintNMTStatistics works on normal JVM exit | 28 * @summary Make sure PrintNMTStatistics works on normal JVM exit |
29 * @library /testlibrary /testlibrary/whitebox | 29 * @library /testlibrary /testlibrary/whitebox |
30 * @run compile PrintNMTStatistics.java | 30 * @build PrintNMTStatistics |
31 * @run main ClassFileInstaller sun.hotspot.WhiteBox | |
32 * @run main PrintNMTStatistics | |
31 */ | 33 */ |
32 | 34 |
33 import com.oracle.java.testlibrary.*; | 35 import com.oracle.java.testlibrary.*; |
34 | 36 |
35 import java.util.regex.Matcher; | 37 import java.util.regex.Matcher; |
50 return; | 52 return; |
51 } | 53 } |
52 | 54 |
53 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( | 55 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( |
54 "-XX:+UnlockDiagnosticVMOptions", | 56 "-XX:+UnlockDiagnosticVMOptions", |
57 "-Xbootclasspath/a:.", | |
58 "-XX:+WhiteBoxAPI", | |
55 "-XX:NativeMemoryTracking=summary", | 59 "-XX:NativeMemoryTracking=summary", |
56 "+XX:+PrintNMTStatistics", | 60 "-XX:+PrintNMTStatistics", |
57 "PrintNMTStatistics", | 61 "PrintNMTStatistics", |
58 "test"); | 62 "test"); |
59 | 63 |
60 OutputAnalyzer output = new OutputAnalyzer(pb.start()); | 64 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
61 output.shouldContain("Java Heap (reserved="); | 65 output.shouldContain("Java Heap (reserved="); |
62 output.shouldNotContain("error"); | 66 output.shouldNotContain("error"); |
63 output.shouldNotContain("warning"); | 67 output.shouldNotContain("warning"); |
64 output.shouldHaveExitValue(0); | 68 output.shouldHaveExitValue(0); |
65 } | 69 } |
66 } | 70 } |