Skip to content

Commit a785b65

Browse files
Skip benchmarks on jdk7 ci system
1 parent cbd810c commit a785b65

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/test/java/org/cryptomator/siv/BenchmarkTest.java

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,22 @@ public class BenchmarkTest {
1818

1919
@Test
2020
public void runBenchmarks() throws RunnerException {
21-
// Taken from http://stackoverflow.com/a/30486197/4014509:
22-
Options opt = new OptionsBuilder()
23-
// Specify which benchmarks to run
24-
.include(getClass().getPackage().getName() + ".*Benchmark.*")
25-
// Set the following options as needed
26-
.threads(2).forks(2) //
27-
.shouldFailOnError(true).shouldDoGC(true)
28-
// .jvmArgs("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining")
29-
// .addProfiler(WinPerfAsmProfiler.class)
30-
.build();
21+
if (System.getProperty("java.version").startsWith("1.8")) {
22+
// Taken from http://stackoverflow.com/a/30486197/4014509:
23+
Options opt = new OptionsBuilder()
24+
// Specify which benchmarks to run
25+
.include(getClass().getPackage().getName() + ".*Benchmark.*")
26+
// Set the following options as needed
27+
.threads(2).forks(2) //
28+
.shouldFailOnError(true).shouldDoGC(true)
29+
// .jvmArgs("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining")
30+
// .addProfiler(WinPerfAsmProfiler.class)
31+
.build();
3132

32-
new Runner(opt).run();
33+
new Runner(opt).run();
34+
} else {
35+
System.out.println("Skipping Benchmarks");
36+
}
3337
}
3438

3539
}

0 commit comments

Comments
 (0)