Commit 2c98e799 authored by Evan W. Patton's avatar Evan W. Patton Committed by ellelili2025

Fix build server tests on Windows

Change-Id: I85ed935936facb8d337b5abc471c5227e3de21d9
parent c5b3e2d2
......@@ -22,13 +22,15 @@ import static org.junit.Assert.assertEquals;
public class YailAndroidTest {
private Scheme scheme;
private static final String YAIL_SCHEME_TESTS = TestUtils.APP_INVENTOR_ROOT_DIR +
private static final String YAIL_SCHEME_TESTS =
TestUtils.windowsToUnix(TestUtils.APP_INVENTOR_ROOT_DIR) +
"/buildserver/tests/com/google/appinventor/buildserver/YailEvalTest.scm";
@Before
public void setUp() throws Exception {
scheme = new Scheme();
String yailRuntimeLibrary = Compiler.getResource(Compiler.YAIL_RUNTIME);
yailRuntimeLibrary = TestUtils.windowsToUnix(yailRuntimeLibrary);
try {
scheme.eval("(load \"" + yailRuntimeLibrary + "\")");
scheme.eval("(load \"" + YAIL_SCHEME_TESTS + "\")");
......
......@@ -32,13 +32,15 @@ import java.util.Map;
public class YailEvalTest extends TestCase {
private Scheme scheme;
private static final String YAIL_SCHEME_TESTS = TestUtils.APP_INVENTOR_ROOT_DIR +
private static final String YAIL_SCHEME_TESTS =
TestUtils.windowsToUnix(TestUtils.APP_INVENTOR_ROOT_DIR) +
"/buildserver/tests/com/google/appinventor/buildserver/YailEvalTest.scm";
@Override
public void setUp() throws Exception {
scheme = new Scheme();
String yailRuntimeLibrary = Compiler.getResource(Compiler.YAIL_RUNTIME);
yailRuntimeLibrary = TestUtils.windowsToUnix(yailRuntimeLibrary);
try {
scheme.eval("(load \"" + yailRuntimeLibrary + "\")");
scheme.eval("(load \"" + YAIL_SCHEME_TESTS + "\")");
......
......@@ -31,8 +31,11 @@ public class TestUtils {
dir = dir.getParentFile();
}
assert false;
return null; // to make compiler happy
throw new RuntimeException("Unable to locate App Inventor root");
}
public static String windowsToUnix(String path) {
return path.replaceAll("\\\\", "/");
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment