Skip to content
Browse files

Adding build.xml

  • Loading branch information...
1 parent e28dfd2 commit 02c270bb3039607f4018bd3a6397afd7a580dded @jmschultz committed Mar 16, 2012
View
0 README → README.md
File renamed without changes.
View
1 android-project-test/.classpath
@@ -8,5 +8,6 @@
<classpathentry kind="lib" path="libs/junit.jar"/>
<classpathentry kind="lib" path="libs/maps.jar"/>
<classpathentry kind="lib" path="libs/robolectric-with-dependencies.jar"/>
+ <classpathentry kind="var" path="CLASSPATH"/>
<classpathentry kind="output" path="bin"/>
</classpath>
View
8 android-project-test/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,12 @@
-#Fri Mar 16 20:46:28 PDT 2012
+#Fri Mar 16 21:21:15 PDT 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.6
View
BIN android-project-test/bin/com/justinschultz/tests/activity/SampleTest.class
Binary file not shown.
View
BIN android-project-test/bin/com/justinschultz/tests/runner/SampleTestRunner.class
Binary file not shown.
View
85 android-project-test/build.xml
@@ -0,0 +1,85 @@
+<project name="AndroidProjectTest" default="test-report-junit" basedir=".">
+ <description>
+ Andrioid-Project-Test - JUnit Tests for HotelTonight Android Application
+ </description>
+
+ <!-- set global properties for this build -->
+
+ <property name="libs.dir" value="./libs/"/>
+ <property name="build.dir" value="./build/"/>
+ <property name="test.report.dir" value="./test-reports/"/>
+ <property name="test.html.dir" value="./test-report-html/"/>
+ <property name="source.dir" value="./src/"/>
+
+ <filelist id="android_jars" dir="${libs.dir}">
+ <file name="android.jar"/>
+ <file name="maps.jar"/>
+ </filelist>
+
+ <filelist id="libs_jars" dir="${libs.dir}">
+ <file name="junit.jar"/>
+ <file name="hamcrest.jar"/>
+ <file name="robolectric-with-dependencies.jar"/>
+ </filelist>
+
+ <path id="compile_classpath">
+ <filelist refid="libs_jars"/>
+ <filelist refid="android_jars"/>
+ <pathelement path="../android-project/bin/classes/"/>
+ <pathelement path="./build/"/>
+ </path>
+
+ <path id="junit_classpath">
+ <pathelement path="${build.dir}"/>
+ <pathelement path="../android-project/bin/classes/"/>
+ <!-- NOTE: junit.jar must come before android.jar -->
+ <filelist refid="libs_jars"/>
+ <filelist refid="android_jars"/>
+ </path>
+ <!-- targets -->
+
+ <target name="init">
+ <!-- Create the time stamp -->
+ <tstamp/>
+ <mkdir dir="${build.dir}"/>
+ </target>
+
+ <target name="compile" depends="init" description="compile test source">
+ <!--<echo message="sdk home = ${env.ANDROID_SDK_HOME}"/>-->
+
+ <javac srcdir="${source.dir}" destdir="${build.dir}" debug="true" >
+ <classpath refid="compile_classpath" />
+ </javac>
+ </target>
+
+ <target name="test-run" depends="compile" description="run JUnit tests">
+ <mkdir dir="${test.report.dir}"/>
+ <echo message="Running JUnit Tests in directory ${source.dir}..."/>
+ <junit showoutput="true" printsummary="yes" failureproperty="junit.failure" fork="yes" forkmode="once" maxmemory="512m">
+ <formatter type="plain"/>
+ <formatter type="xml"/>
+ <batchtest todir="${test.report.dir}">
+ <fileset dir="${source.dir}">
+ <include name="**/*Test.java"/>
+ </fileset>
+ </batchtest>
+ <classpath refid="junit_classpath"/>
+ </junit>
+ <fail if="junit.failure" message="Unit test(s) failed. See reports!"/>
+ </target>
+
+ <target name="test-report-junit" depends="test-run" description="generate JUnit HTML reports">
+ <mkdir dir="${test.html.dir}"/>
+ <junitreport todir="${test.report.dir}">
+ <fileset dir="${test.report.dir}" includes="TEST-*.xml"/>
+ <report format="frames" todir="${test.html.dir}"/>
+ </junitreport>
+ </target>
+
+ <target name="clean" description="clean up" >
+ <delete dir="${build.dir}"/>
+ <delete dir="${test.report.dir}"/>
+ <delete dir="${test.html.dir}"/>
+ <delete file="${basedir}/tmp/cached-robolectric-classes.jar"/>
+ </target>
+</project>
View
BIN android-project-test/tmp/cached-robolectric-classes.jar
Binary file not shown.
View
4 android-project/.classpath
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
View
BIN android-project/bin/android-project.apk
Binary file not shown.
View
BIN android-project/bin/classes.dex
Binary file not shown.
View
BIN android-project/bin/res/drawable-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN android-project/bin/res/drawable-ldpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN android-project/bin/res/drawable-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN android-project/bin/resources.ap_
Binary file not shown.

0 comments on commit 02c270b

Please sign in to comment.
Something went wrong with that request. Please try again.