Commit de1c0af9 authored by Evan W. Patton's avatar Evan W. Patton

Merge branch 'master' into ucr

Change-Id: I674f86a18d8082dcba93d8cc8a1bbd8b3ebd93b5
parents d0b152f3 2c98e799
...@@ -52,6 +52,10 @@ start_appinventor ...@@ -52,6 +52,10 @@ start_appinventor
Press Ctrl+C to quit the server. Enter exit at the prompt to leave the virtual machine. To reclaim resources when you are not actively developing, you can run `vagrant halt` to stop the virtual machine. To completely remove the virtual machine, run `vagrant destroy`. If you destroy the VM, you will need to start these instructions from the top. Press Ctrl+C to quit the server. Enter exit at the prompt to leave the virtual machine. To reclaim resources when you are not actively developing, you can run `vagrant halt` to stop the virtual machine. To completely remove the virtual machine, run `vagrant destroy`. If you destroy the VM, you will need to start these instructions from the top.
Note 1: For macOS users, if you are using VirtualBox and get any error while initializing the VM it may be due to security restrictions in System Preferences, consider reading [this](https://medium.com/@Aenon/mac-virtualbox-kernel-driver-error-df39e7e10cd8) article.
Note 2: If it seems like none of the dependencies are installed in the VM, run ```vagrant provision```.
For better performance, consider using the manual instructions. For better performance, consider using the manual instructions.
## Setup instructions (manual) ## Setup instructions (manual)
......
...@@ -22,13 +22,15 @@ import static org.junit.Assert.assertEquals; ...@@ -22,13 +22,15 @@ import static org.junit.Assert.assertEquals;
public class YailAndroidTest { public class YailAndroidTest {
private Scheme scheme; 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"; "/buildserver/tests/com/google/appinventor/buildserver/YailEvalTest.scm";
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
scheme = new Scheme(); scheme = new Scheme();
String yailRuntimeLibrary = Compiler.getResource(Compiler.YAIL_RUNTIME); String yailRuntimeLibrary = Compiler.getResource(Compiler.YAIL_RUNTIME);
yailRuntimeLibrary = TestUtils.windowsToUnix(yailRuntimeLibrary);
try { try {
scheme.eval("(load \"" + yailRuntimeLibrary + "\")"); scheme.eval("(load \"" + yailRuntimeLibrary + "\")");
scheme.eval("(load \"" + YAIL_SCHEME_TESTS + "\")"); scheme.eval("(load \"" + YAIL_SCHEME_TESTS + "\")");
......
...@@ -32,13 +32,15 @@ import java.util.Map; ...@@ -32,13 +32,15 @@ import java.util.Map;
public class YailEvalTest extends TestCase { public class YailEvalTest extends TestCase {
private Scheme scheme; 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"; "/buildserver/tests/com/google/appinventor/buildserver/YailEvalTest.scm";
@Override @Override
public void setUp() throws Exception { public void setUp() throws Exception {
scheme = new Scheme(); scheme = new Scheme();
String yailRuntimeLibrary = Compiler.getResource(Compiler.YAIL_RUNTIME); String yailRuntimeLibrary = Compiler.getResource(Compiler.YAIL_RUNTIME);
yailRuntimeLibrary = TestUtils.windowsToUnix(yailRuntimeLibrary);
try { try {
scheme.eval("(load \"" + yailRuntimeLibrary + "\")"); scheme.eval("(load \"" + yailRuntimeLibrary + "\")");
scheme.eval("(load \"" + YAIL_SCHEME_TESTS + "\")"); scheme.eval("(load \"" + YAIL_SCHEME_TESTS + "\")");
......
...@@ -31,8 +31,11 @@ public class TestUtils { ...@@ -31,8 +31,11 @@ public class TestUtils {
dir = dir.getParentFile(); dir = dir.getParentFile();
} }
assert false; throw new RuntimeException("Unable to locate App Inventor root");
return null; // to make compiler happy }
public static String windowsToUnix(String path) {
return path.replaceAll("\\\\", "/");
} }
} }
...@@ -20,4 +20,6 @@ out/ ...@@ -20,4 +20,6 @@ out/
.vagrant/ .vagrant/
*.log *.log
.build/ .build/
.jekyll-cache/ *-cache/
.bundle/
vendor/
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