export CLASSPATH=/data/framework/hidl_test_java_java.jar r=0 # at least one test ran e=0 # error for SIZE in 64 32; do native=/data/nativetest${SIZE/32}/hidl_test_java_native/hidl_test_java_native if [ -f $native ]; then r=1 echo "Testing $SIZE bit native client/server" # Test native server with Java client $native -s & sleep 1 NATIVE_PID=$! app_process /data/framework com.android.commands.hidl_test_java.HidlTestJava -c \ && echo "Java client => native server PASSED" \ || (echo "Java client => native server FAILED" && false) || e=1 kill $NATIVE_PID 2>/dev/null # Test Java server with native client app_process /data/framework com.android.commands.hidl_test_java.HidlTestJava -s & NATIVE_PID=$! $native -c \ && echo "native client => Java server PASSED" \ || (echo "native client => Java server FAILED" && false) || e=1 kill $NATIVE_PID 2>/dev/null else echo "FAILED: Not running $native because it doesn't exist." fi done echo echo "Summary: $e" if [ $r = 0 ]; then echo "NO TESTS RAN" e=1 fi [ $e -eq 0 ] && echo "All tests PASSED." || echo "Test(s) FAILED." exit $e