Introduce top-level "compile.tests" Ant target

Currently, our pre-checks don't compile the tests, which can cause false
positives for Verified+1 labels from Jenkins.

Change-Id: If07214d68e3ed8f94e6ea3db0c5b598b7d18a769
diff --git a/build.xml b/build.xml
index 25d5dc8..fad7a60 100755
--- a/build.xml
+++ b/build.xml
@@ -145,6 +145,16 @@
     <call-subproject subproject="samples" subtarget="checkstyle"/>
   </target>
 
+  <target name="compile.tests" description="[action] Compile all the GWT tests, without running them">
+    <call-subproject subproject="buildtools" subtarget="compile.tests"/>
+    <call-subproject subproject="dev" subtarget="compile.tests"/>
+    <call-subproject subproject="codeserver" subtarget="compile.tests"/>
+    <call-subproject subproject="user" subtarget="compile.tests"/>
+    <call-subproject subproject="requestfactory" subtarget="compile.tests"/>
+    <call-subproject subproject="servlet" subtarget="compile.tests"/>
+    <call-subproject subproject="tools" subtarget="compile.tests"/>
+  </target>
+
   <target name="test" depends="dist-dev,apicheck,checkstyle"
           description="[action] Runs all the GWT tests, including checkstyle and apicheck">
     <call-subproject subproject="buildtools" subtarget="test"/>
@@ -156,6 +166,7 @@
     <call-subproject subproject="tools" subtarget="test"/>
   </target>
 
+
   <target name="testrf" depends="dist-dev"
           description="[action] Runs the GWT RequestFactory tests">
     <call-subproject subproject="dev" subtarget="compile.tests"/>
diff --git a/build_tools/build.xml b/build_tools/build.xml
index 3ca7104..ebb5793 100644
--- a/build_tools/build.xml
+++ b/build_tools/build.xml
@@ -24,6 +24,12 @@
     </antcall>
   </target>
 
+  <target name="compile.tests" description="Compile GWT tests">
+    <antcall target="-do">
+      <param name="target" value="compile.tests" />
+    </antcall>
+  </target>
+
   <target name="test" depends="build" description="Test GWT">
     <antcall target="-do">
       <param name="target" value="test" />
diff --git a/common.ant.xml b/common.ant.xml
index 920ab7f..bc2eb89 100755
--- a/common.ant.xml
+++ b/common.ant.xml
@@ -406,6 +406,7 @@
   <target name="verify" depends="checkstyle, test"
           description="Runs tests and checkstyle static analysis"/>
   <target name="checkstyle"/>
+  <target name="compile.tests"/>
   <target name="test" depends="build"/>
   <target name="build"/>