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/20 05:26:54 UTC

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

Author: cutting
Date: Fri Nov 20 04:26:52 2009
New Revision: 882408

URL: http://svn.apache.org/viewvc?rev=882408&view=rev
Log:
AVRO-223.  Fix test-avroj on Mac OS X.  Contributed by Philip Zeyliger.

Modified:
    hadoop/avro/trunk/CHANGES.txt
    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=882408&r1=882407&r2=882408&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Fri Nov 20 04:26:52 2009
@@ -127,6 +127,8 @@
     AVRO-222. Fix Python interop tests broken by AVRO-201.
     (Jeff Hammerbacher via cutting)
 
+    AVRO-223. Fix test-avroj on Mac OS X.  (Philip Zeyliger via cutting)
+
 Avro 1.2.0 (14 October 2009)
 
   INCOMPATIBLE CHANGES

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=882408&r1=882407&r2=882408&view=diff
==============================================================================
--- hadoop/avro/trunk/src/test/bin/test_avroj.sh (original)
+++ hadoop/avro/trunk/src/test/bin/test_avroj.sh Fri Nov 20 04:26:52 2009
@@ -22,6 +22,11 @@
 # This script will exist at any false return value.
 set -o errexit
 
+if [ "$JAVA_HOME" = "" ]; then
+  echo "Error: JAVA_HOME is not set."
+  exit 1
+fi
+
 if [ "$AVROJ" = "" ]; then
   echo "Error: AVROJ is not set."
   exit 1
@@ -32,21 +37,23 @@
   exit 1
 fi
 
+CMD="$JAVA_HOME/bin/java -jar $AVROJ"
+
 ######################################################################
 # Clean up temp directory.
 rm -rf $TMPDIR
 
 ######################################################################
-$AVROJ compile protocol src/test/schemata/namespace.avpr $TMPDIR/namespace
+$CMD compile protocol src/test/schemata/namespace.avpr $TMPDIR/namespace
 # Check that the expected names were generated
 [ "MD5.java TestError.java TestNamespace.java TestRecord.java " = \
   "$(find $TMPDIR/namespace -name "*.java" \
     | awk -F "/" '{ print $NF }' | sort | tr '\n' ' ')" ]
-$AVROJ compile schema src/test/schemata/interop.avsc $TMPDIR/schema
+$CMD compile schema src/test/schemata/interop.avsc $TMPDIR/schema
 [ "Foo.java Interop.java Kind.java MD5.java Node.java " = \
   "$(find $TMPDIR/schema -name "*.java" \
     | awk -F "/" '{ print $NF }' | sort | tr '\n' ' ')" ]
 
 ######################################################################
-$AVROJ 2>&1 | grep -q "Expected one of the following"
-$AVROJ doesnotexist 2>&1 | grep -q "Expected one of the following"
+$CMD 2>&1 | grep -q "Expected one of the following"
+$CMD doesnotexist 2>&1 | grep -q "Expected one of the following"