Commit e9a89b80 authored by Hyang-Ah Hana Kim's avatar Hyang-Ah Hana Kim

misc/cgo/testcshared: make test.bash resilient against noise.

Instead of comparing against the entire output that may include
verbose warning messages, use the last line of the output and check
it includes the expected success message (PASS).

Change-Id: Iafd583ee5529a8aef5439b9f1f6ce0185e4b1331
Reviewed-on: https://go-review.googlesource.com/9304Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
parent b3000b6f
......@@ -40,7 +40,11 @@ function run() {
args[$i]=${args[$i]//.\//${androidpath}\/}
args[$i]=${args[$i]//=./=${androidpath}}
done
echo $(adb shell ${args} | tr -d '\r')
output=$(adb shell ${args} | tr -d '\r')
case $output in
*PASS) echo "PASS";;
*) echo "$output";;
esac
;;
*)
echo $(env $@)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment