cake_wallet/integration_test_runner.sh
cyan 3e10023e18
CW-827 CI/CD update (#1948)
* CI update
- use existing build outputs in build_monero_all.sh
- update $HOME, fix gh actions
- add secrets earlier in the runtime (potentially speed up 'Build generated code' step)
- add windows dockerfile
- add linux/android dockerfile
- update android/linux ci script

* [skip slack] [run tests] Run tests on CI, fix tests

* [skip slack] [run tests] force enable kvm in android

* [skip slack] [run tests] remove inexisting flag

* [run tests] [skip slack] update tests

* add extra dependencies [skip ci]

* [skip slack] [run tests] Add secrets

* [skip slack] [run tests] Timeout test cases, continue on error

* [skip slack] [run tests] Xvfb fix, timeout fix

* [skip slack] [run tests] Start dbus to clean up the logs, use SIGKILL

* [skip slack] [run tests] Enable network manager

* [skip slack] [run tests] Screen record test, resize screen

* [skip slack] [run tests] Improve status report for tests

* [skip slack] [run tests] Increase framerate

* [skip slack] [run tests] Remove test that I am unable to fix locally easily from CI

* [skip slack] [run tests] Simplify ffmpeg command

* [skip slack] [run tests] Increase timeout, add comment

* [skip slack] Update dockerfile, migrate from mrcyjanek to cake-tech for the ghcr org

* Update lib/entities/default_settings_migration.dart

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2025-01-15 13:09:59 +02:00

50 lines
1.3 KiB
Bash
Executable file

#!/bin/bash
export DESKTOP_FORCE_MOBILE="Y"
declare -a targets
declare -a passed_tests
declare -a failed_tests
# Collect all Dart test files in the integration_test directory
while IFS= read -r -d $'\0' file; do
targets+=("$file")
done < <(find integration_test/test_suites -name "*.dart" -type f -print0)
# Run each test and collect results
for target in "${targets[@]}"
do
if [[ "x$REMOVE_DATA_DIRECTORY" == "xY" ]];
then
rm -rf ~/.local/share/com.example.cake_wallet ~/Documents/cake_wallet
fi
echo "Running test: $target"
if flutter drive \
--driver=test_driver/integration_test.dart \
--target="$target"; then
echo "✅ Test passed: $target"
passed_tests+=("$target")
else
echo "❌ Test failed: $target"
failed_tests+=("$target")
fi
done
# Provide a summary of test results
echo -e "\n===== Test Summary ====="
if [ ${#passed_tests[@]} -gt 0 ]; then
echo "✅ Passed Tests:"
for test in "${passed_tests[@]}"; do
echo " - $test"
done
fi
if [ ${#failed_tests[@]} -gt 0 ]; then
echo -e "\n❌ Failed Tests:"
for test in "${failed_tests[@]}"; do
echo " - $test"
done
# Exit with a non-zero status to indicate failure
exit 1
else
echo -e "\n🎉 All tests passed successfully!"
fi