You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by cu...@apache.org on 2009/11/13 00:30:59 UTC

svn commit: r835640 - in /hadoop/avro/trunk: CHANGES.txt build.xml src/test/bin/test_avroj.sh

Author: cutting
Date: Thu Nov 12 23:30:59 2009
New Revision: 835640

URL: http://svn.apache.org/viewvc?rev=835640&view=rev
Log:
AVRO-193.  Fix 'ant test-avroj' on Ubuntu 9.10.

Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/build.xml
    hadoop/avro/trunk/src/test/bin/test_avroj.sh

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=835640&r1=835639&r2=835640&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Thu Nov 12 23:30:59 2009
@@ -62,6 +62,8 @@
 
     AVRO-192. Improved errors for Java schema parsing problems. (cutting)
 
+    AVRO-193. Fix 'ant test-avroj' on Ubuntu 9.10. (cutting)
+
   OPTIMIZATIONS
 
     AVRO-172. More efficient schema processing (massie)

Modified: hadoop/avro/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.xml?rev=835640&r1=835639&r2=835640&view=diff
==============================================================================
--- hadoop/avro/trunk/build.xml (original)
+++ hadoop/avro/trunk/build.xml Thu Nov 12 23:30:59 2009
@@ -462,7 +462,10 @@
   <target name="test-avroj" depends="avroj"
    description="Tests avroj commands">
     <exec executable="${basedir}/src/test/bin/test_avroj.sh"
-        failonerror="true" />
+          failonerror="true">
+      <env key="AVROJ" value="${build.dir}/avroj-${version}.jar"/>
+      <env key="TMPDIR" value="${test.java.build.dir}/avroj"/>
+    </exec>
   </target>
 
   <target name="pydoc" description="Generate python api docs">

Modified: hadoop/avro/trunk/src/test/bin/test_avroj.sh
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/bin/test_avroj.sh?rev=835640&r1=835639&r2=835640&view=diff
==============================================================================
--- hadoop/avro/trunk/src/test/bin/test_avroj.sh (original)
+++ hadoop/avro/trunk/src/test/bin/test_avroj.sh Thu Nov 12 23:30:59 2009
@@ -22,14 +22,21 @@
 # This script will exist at any false return value.
 set -o errexit
 
-AVROJ="java -jar build/avroj-*.jar"
-
-# Create a temp directory.
-TMPDIR=$(mktemp -d -t test_avroj)
+if [ "$AVROJ" = "" ]; then
+  echo "Error: AVROJ is not set."
+  exit 1
+fi
+
+if [ "$TMPDIR" = "" ]; then
+  echo "Error: TMPDIR is not set."
+  exit 1
+fi
 
 ######################################################################
-echo "Testing code generation..."
+# Clean up temp directory.
+rm -rf $TMPDIR
 
+######################################################################
 $AVROJ compile protocol src/test/schemata/namespace.avpr $TMPDIR/namespace
 # Check that the expected names were generated
 [ "MD5.java TestError.java TestNamespace.java TestRecord.java " = \
@@ -41,13 +48,5 @@
     | awk -F "/" '{ print $NF }' | sort | tr '\n' ' ')" ]
 
 ######################################################################
-echo "Testing avroj command..."
-
 $AVROJ 2>&1 | grep -q "Expected one of the following"
 $AVROJ doesnotexist 2>&1 | grep -q "Expected one of the following"
-
-######################################################################
-# Clean up temp directory.
-rm -rf $TMPDIR
-
-echo "Tests passed!"