add testrunner for android

This commit is contained in:
Adam Velebil 2023-11-29 11:59:29 +01:00
parent 8a56a2b71a
commit e8da7f51ef
No known key found for this signature in database
GPG Key ID: C9B1E4A3CBBD2E10

View File

@ -0,0 +1,36 @@
#!/bin/bash
#
# Copyright (C) 2023 Yubico.
#
# This file defines which tests we should run in the CI environment
# It is now being used to check for flakiness, as we haven't decided
# which tests will be run in CI.
if (( $# < 1 )); then
echo "Usage $(basename $0) DEVICE_ID [TAGS]"
exit 1
fi
DEVICE="${1}"
if (( $# < 2 )); then
TAGS="android" # default
else
TAGS="(${2}) && android"
fi
echo "Running tests matching tag expression: $TAGS"
ANDROID_TESTS=('integration_test/oath_test.dart' 'integration_test/keyless_test.dart')
DRIVER="integration_test/utils/android/test_driver.dart"
flutter test \
--tags "${TAGS}" \
--device-id "${DEVICE}" \
--no-pub \
--no-track-widget-creation \
--reporter compact \
--file-reporter "github:build/integration_test_run_$(date +'%Y%m%d_%H:%M:%S')" \
"${ANDROID_TESTS[@]}"