DryRun mode for GenerateTests is added
Relates to #KTI-17
This commit is contained in:
+16
-5
@@ -6,13 +6,24 @@
|
||||
package org.jetbrains.kotlin.pill.generateAllTests;
|
||||
|
||||
import org.jetbrains.kotlin.generators.tests.*;
|
||||
import org.jetbrains.kotlin.generators.tests.generator.InconsistencyChecker;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
GenerateCompilerTestsKt.main();
|
||||
GenerateTestsKt.main();
|
||||
GenerateJsTestsKt.main();
|
||||
GenerateJava8TestsKt.main();
|
||||
GenerateRuntimeDescriptorTestsKt.main();
|
||||
GenerateCompilerTestsKt.main(args);
|
||||
GenerateTestsKt.main(args);
|
||||
GenerateJsTestsKt.main(args);
|
||||
GenerateJava8TestsKt.main(args);
|
||||
GenerateRuntimeDescriptorTestsKt.main(args);
|
||||
|
||||
boolean dryRun = InconsistencyChecker.Companion.hasDryRunArg(args);
|
||||
List<String> affectedFiles = InconsistencyChecker.Companion.inconsistencyChecker(dryRun).getAffectedFiles();
|
||||
int size = affectedFiles.size();
|
||||
if (size > 0) {
|
||||
throw new IllegalStateException("There " + (size == 1 ? "is a test" : "are " + size + " tests") + " to be regenerated:\n"
|
||||
+ String.join("\n", affectedFiles));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user