Skip to content

Commit 0e2a285

Browse files
Evgeny NikitinTobiHartmann
Evgeny Nikitin
authored andcommitted
8344833: CTW: Make failing on zero classes optional
Reviewed-by: thartmann, kvn
1 parent f6021a9 commit 0e2a285

File tree

1 file changed

+7
-1
lines changed
  • test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw

1 file changed

+7
-1
lines changed

test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,14 @@ private void startCtwforAllClasses() {
172172

173173
long classStart = start(totalClassCount);
174174
long classStop = stop(totalClassCount);
175-
176175
long classCount = classStop - classStart;
176+
177+
boolean allowZeroClassCount = Boolean.getBoolean("sun.hotspot.tools.ctw.allow_zero_class_count");
178+
if (allowZeroClassCount && totalClassCount == 0L) {
179+
System.out.println("WARN: " + target + "(at " + targetPath + ") has no classes. Ignoring.");
180+
return;
181+
}
182+
177183
Asserts.assertGreaterThan(classCount, 0L,
178184
target + "(at " + targetPath + ") does not have any classes");
179185

0 commit comments

Comments
 (0)