Skip to content

Commit

Permalink
Fix cache / parallel [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcsakany committed Nov 8, 2024
1 parent f443da9 commit 0fd0b80
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,23 @@ public class PsmEpsilonValidator {
public static void validatePsm(Logger log,
PsmModel psmModel,
URI scriptRoot) throws ScriptExecutionException, URISyntaxException {
validatePsm(log, psmModel, scriptRoot, emptyList(), null);
validatePsm(log, psmModel, scriptRoot, emptyList(), emptyList());
}

public static void validatePsm(Logger log,
PsmModel psmModel,
URI scriptRoot,
Collection<String> expectedErrors,
Collection<String> expectedWarnings) throws ScriptExecutionException, URISyntaxException {
validatePsm(log, psmModel, scriptRoot, expectedErrors, expectedWarnings, false);
}

public static void validatePsm(Logger log,
PsmModel psmModel,
URI scriptRoot,
Collection<String> expectedErrors,
Collection<String> expectedWarnings,
Boolean useCache) throws ScriptExecutionException, URISyntaxException {

ExecutionContext executionContext = executionContextBuilder()
.log(log)
Expand All @@ -60,8 +69,9 @@ public static void validatePsm(Logger log,
.log(log)
.name("PSM")
.validateModel(false)
.useCache(true)
.useCache(useCache)
.resource(psmModel.getResource())
.parallel(true)
.build()))
.injectContexts(singletonMap("psmUtils", new PsmUtils()))
.build();
Expand All @@ -73,11 +83,10 @@ public static void validatePsm(Logger log,
// Transformation script
executionContext.executeProgram(
evlExecutionContextBuilder()
// TODO: https://github.com/eclipse/epsilon/issues/133
.parallel(false)
.source(UriUtil.resolve("psm.evl", scriptRoot))
.expectedErrors(expectedErrors)
.expectedWarnings(expectedWarnings)
.parallel(true)
.build());

} finally {
Expand Down

0 comments on commit 0fd0b80

Please sign in to comment.