diff --git a/src/org/rascalmpl/library/util/Eval.java b/src/org/rascalmpl/library/util/Eval.java index c9695288ee1..f3d69b88929 100644 --- a/src/org/rascalmpl/library/util/Eval.java +++ b/src/org/rascalmpl/library/util/Eval.java @@ -77,8 +77,6 @@ public Eval(IValueFactory values, OutputStream out, OutputStream err, InputStrea // TODO: this is to fix the course Question compiler with a workaround. // it would be better to parameterize eval with a PathConfig. - - this.eval.addRascalSearchPath(URIUtil.rootLocation("test-modules")); this.eval.addRascalSearchPath(URIUtil.rootLocation("std")); // this.eval.getConfiguration().setRascalJavaClassPathProperty(ctx.getConfiguration().getRascalJavaClassPathProperty()); } diff --git a/src/org/rascalmpl/test/infrastructure/RascalJUnitParallelRecursiveTestRunner.java b/src/org/rascalmpl/test/infrastructure/RascalJUnitParallelRecursiveTestRunner.java index 81e70004400..36cf36910e4 100644 --- a/src/org/rascalmpl/test/infrastructure/RascalJUnitParallelRecursiveTestRunner.java +++ b/src/org/rascalmpl/test/infrastructure/RascalJUnitParallelRecursiveTestRunner.java @@ -159,6 +159,7 @@ private void fillModuleWorkList() { for (String src : new RascalManifest().getSourceRoots(projectRoot)) { RascalJUnitTestRunner.getRecursiveModuleList(URIUtil.getChildLocation(projectRoot, src + "/" + prefix.replaceAll("::", "/")), result); } + result.stream().map(m -> prefix + "::" + m).forEach(n -> modules.add(n)); } catch (IOException e) { @@ -304,6 +305,8 @@ private void initializeEvaluator() { evaluator = new Evaluator(ValueFactoryFactory.getValueFactory(), System.in, System.err, System.out, root, heap); evaluator.addRascalSearchPathContributor(StandardLibraryContributor.getInstance()); evaluator.getConfiguration().setErrors(true); + + RascalJUnitTestRunner.configureProjectEvaluator(evaluator, projectRoot); } } diff --git a/src/org/rascalmpl/test/infrastructure/RascalJUnitTestRunner.java b/src/org/rascalmpl/test/infrastructure/RascalJUnitTestRunner.java index 9ee452080af..e4df8b119e2 100644 --- a/src/org/rascalmpl/test/infrastructure/RascalJUnitTestRunner.java +++ b/src/org/rascalmpl/test/infrastructure/RascalJUnitTestRunner.java @@ -99,7 +99,6 @@ public static void configureProjectEvaluator(Evaluator evaluator, ISourceLocatio PathConfig pcfg = PathConfig.fromSourceProjectRascalManifest(projectRoot, RascalConfigMode.INTERPETER); for (IValue path : pcfg.getSrcs()) { - System.err.println("Adding evaluator search path: " + path); evaluator.addRascalSearchPath((ISourceLocation) path); } @@ -158,6 +157,7 @@ public static String computeTestName(String name, ISourceLocation loc) { public static List getRecursiveModuleList(ISourceLocation root, List result) throws IOException { Queue todo = new LinkedList<>(); + todo.add(root); while (!todo.isEmpty()) { ISourceLocation currentDir = todo.poll(); diff --git a/src/org/rascalmpl/test/infrastructure/TestFramework.java b/src/org/rascalmpl/test/infrastructure/TestFramework.java index 9619815ab04..95fd0f2ffcf 100644 --- a/src/org/rascalmpl/test/infrastructure/TestFramework.java +++ b/src/org/rascalmpl/test/infrastructure/TestFramework.java @@ -61,9 +61,8 @@ public class TestFramework { evaluator = new Evaluator(ValueFactoryFactory.getValueFactory(), System.in, System.err, System.out, root, heap); evaluator.addRascalSearchPathContributor(StandardLibraryContributor.getInstance()); - - evaluator.addRascalSearchPath(URIUtil.rootLocation("test-modules")); + System.err.println("PROJECT ROOT: " + RascalJUnitTestRunner.inferProjectRoot(TestFramework.class)); RascalJUnitTestRunner.configureProjectEvaluator(evaluator, RascalJUnitTestRunner.inferProjectRoot(TestFramework.class)); try { diff --git a/test/org/rascalmpl/test/functionality/ParallelEvaluatorsTests.java b/test/org/rascalmpl/test/functionality/ParallelEvaluatorsTests.java index 77082c8f4e0..3730eaba9b0 100644 --- a/test/org/rascalmpl/test/functionality/ParallelEvaluatorsTests.java +++ b/test/org/rascalmpl/test/functionality/ParallelEvaluatorsTests.java @@ -16,7 +16,7 @@ import org.rascalmpl.interpreter.env.GlobalEnvironment; import org.rascalmpl.interpreter.env.ModuleEnvironment; import org.rascalmpl.interpreter.load.StandardLibraryContributor; -import org.rascalmpl.uri.URIUtil; +import org.rascalmpl.shell.ShellEvaluatorFactory; import org.rascalmpl.values.ValueFactoryFactory; import io.usethesource.vallang.ISourceLocation; @@ -34,9 +34,7 @@ private static Evaluator freshEvaluator() { var root = heap.addModule(new ModuleEnvironment("___test___", heap)); var evaluator = new Evaluator(ValueFactoryFactory.getValueFactory(), System.in, System.err, System.out, root, heap); - evaluator.addRascalSearchPathContributor(StandardLibraryContributor.getInstance()); - evaluator.addRascalSearchPath(URIUtil.rootLocation("test-modules")); - + evaluator.addRascalSearchPathContributor(StandardLibraryContributor.getInstance()); evaluator.setTestResultListener(new ITestResultListener() { @Override public void start(String context, int count) { }