| # This script runs a bunch of room related compilations repeatedly |
| # to avoid a native library loading bug in xerial |
| # https://github.com/xerial/sqlite-jdbc/issues/97 |
| if [ ! -f gradlew ]; then |
| echo "./gradlew does not exist! Make sure I live under frameworks/support/room" |
| SUCCESS_MSG="BUILD SUCCESSFUL" |
| OUTPUT_FOLDER="room_stress_test_output_${NOW}" |
| success=`grep "${SUCCESS_MSG}" $1 | wc -l` |
| echo "output folder:${OUTPUT_FOLDER}. Will run ${REPEAT} times" |
| for (( i=0; i<$REPEAT; i++ )) |
| ./gradlew --no-build-cache --stacktrace \ |
| :room:integration-tests:room-testapp-noappcompat:asAnTest \ |
| :room:integration-tests:room-testapp-autovalue:asAnTest \ |
| :room:integration-tests:room-testapp:asAnTest \ |
| :room:integration-tests:room-testapp-kotlin:asAnTest \ |
| > "${OUTPUT_FOLDER}/${OUTPUT_PREFIX}${i}" 2>"${OUTPUT_FOLDER}/${ERROR_PREFIX}${i}" || true |
| printResult "${OUTPUT_FOLDER}/${OUTPUT_PREFIX}${i}" |
| totalSuccess=`grep "${SUCCESS_MSG}" ${OUTPUT_FOLDER}/* |wc -l` |
| echo "${totalSuccess} over ${REPEAT} succeeded" |