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