Skip to content
Snippets Groups Projects
Commit ca2fb687 authored by Elliott Hughes's avatar Elliott Hughes Committed by Automerger Merge Worker
Browse files

Merge "Run tinyxml2 tests in presubmit." am: 8ff7e931 am: 903a7328 am:...

Merge "Run tinyxml2 tests in presubmit." am: 8ff7e931 am: 903a7328 am: dea5c0c3 am: b92ea84a

Original change: https://android-review.googlesource.com/c/platform/external/tinyxml2/+/1471260

Change-Id: I93aaf1046bbf2282520e63e1ba40adcec8389520
parents 947b02d0 b92ea84a
No related branches found
No related tags found
No related merge requests found
......@@ -32,10 +32,21 @@ cc_library {
}
cc_test {
name: "tinyxml2-tests",
name: "tinyxml2-xmltest",
srcs: ["xmltest.cpp"],
shared_libs: ["libtinyxml2"],
data: [
"resources/**/*",
],
}
sh_test {
name: "tinyxml2-tests",
src: "run-tinyxml2-tests-on-android.sh",
filename: "run-tinyxml2-tests-on-android.sh",
test_suites: ["general-tests"],
host_supported: true,
device_supported: false,
require_root: true,
target_required: ["tinyxml2-xmltest"],
}
{
"presubmit": [
{
"name": "tinyxml2-tests"
}
]
}
#!/bin/bash
# Copy the tests across.
adb sync
if tty -s; then
green="\033[1;32m"
red="\033[1;31m"
plain="\033[0m"
else
green=""
red=""
plain=""
fi
failures=0
check_failure() {
if [ $? -eq 0 ]; then
echo -e "${green}[PASS]${plain}"
else
failures=$(($failures+1))
echo -e "${red}[FAIL]${plain}"
fi
}
if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest/tinyxml2-xmltest/tinyxml2-xmltest" ]; then
adb shell "cd /data/nativetest/tinyxml2-xmltest; ./tinyxml2-xmltest"
check_failure
fi
if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest64/tinyxml2-xmltest/tinyxml2-xmltest" ]; then
adb shell "cd /data/nativetest64/tinyxml2-xmltest; ./tinyxml2-xmltest"
check_failure
fi
echo "_________________________________________________________________________"
echo
if [ $failures -ne 0 ]; then
echo -e "${red}FAILED${plain}: $failures"
fi
exit $failures
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment