Home | History | Annotate | Download | only in java_test
      1 base=/system
      2 export CLASSPATH=$base/framework/hidl_test_java.jar:$base/framework/android.hardware.tests.baz-V1.0-java.jar:$base/framework/android.hidl.base-V1.0-java.jar
      3 export TREBLE_TESTING_OVERRIDE=true
      4 
      5 e=0
      6 for SIZE in 64 32; do
      7     native=/data/nativetest${SIZE/32}/hidl_test_java_native/hidl_test_java_native
      8 
      9     if [ -f $native ]; then
     10         echo "Testing $SIZE bit native client/server"
     11 
     12         # Test native server with Java client
     13         $native -s &
     14         sleep 1
     15         NATIVE_PID=$!
     16         app_process $base/bin com.android.commands.hidl_test_java.HidlTestJava -c \
     17             && echo "Java client => native server PASSED" \
     18             || (echo "Java client => native server FAILED" && false) || e=1
     19 
     20         kill $NATIVE_PID 2>/dev/null
     21 
     22         # Test Java server with native client
     23         app_process $base/bin com.android.commands.hidl_test_java.HidlTestJava -s &
     24         NATIVE_PID=$!
     25         $native -c \
     26             && echo "native client => Java server PASSED" \
     27             || (echo "native client => Java server FAILED" && false) || e=1
     28 
     29         kill $NATIVE_PID 2>/dev/null
     30     else
     31         echo "FAILED: Not running $native because it doesn't exist."
     32         e=1
     33     fi
     34 done
     35 
     36 echo
     37 echo "Summary: $e"
     38 [ $e -eq 0 ] && echo "All tests PASSED." || echo "Test(s) FAILED."
     39 
     40 exit $e
     41