Commit edd77ae2 authored by Wouter van Oortmerssen's avatar Wouter van Oortmerssen Committed by GitHub

Merge pull request #4010 from rgilles/master

Isolate the complied Java classes into a target folder.
parents 8e3fa336 582fd90c
#!/bin/sh
#!/bin/bash
#
# Copyright 2014 Google Inc. All rights reserved.
#
......@@ -16,14 +16,29 @@
echo Compile then run the Java test.
java -version
testdir=$(readlink -fn `dirname $0`)
thisdir=$(readlink -fn `pwd`)
targetdir=${testdir}/target
if [[ "$testdir" != "$thisdir" ]]; then
echo error: must be run from inside the ${testdir} directory
echo you ran it from ${thisdir}
exit 1
fi
javac -classpath ${testdir}/../java:${testdir}:${testdir}/namespace_test JavaTest.java
java -classpath ${testdir}/../java:${testdir}:${testdir}/namespace_test JavaTest
find .. -type f -name "*.class" -exec rm {} \;
if [[ -e "${targetdir}" ]]; then
echo "clean target"
rm -rf ${targetdir}
fi
mkdir ${targetdir}
javac -d ${targetdir} -classpath ${testdir}/../java:${testdir}:${testdir}/namespace_test JavaTest.java
java -classpath ${targetdir} JavaTest
rm -rf ${targetdir}
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