Migrate test to moved FlutterPlayStoreSplitApplication (#92593)

This commit is contained in:
Gary Qian 2021-11-01 14:43:22 -07:00 committed by GitHub
parent 6ef91147fa
commit 42d4bcb9eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -10,7 +10,7 @@ found in the LICENSE file. -->
additional functionality it is fine to subclass or reimplement additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. --> FlutterApplication and put your custom class here. -->
<application <application
android:name="io.flutter.app.FlutterPlayStoreSplitApplication" android:name="io.flutter.embedding.android.FlutterPlayStoreSplitApplication"
android:label="deferred_components_test" android:label="deferred_components_test"
android:extractNativeLibs="false"> android:extractNativeLibs="false">
<activity <activity

View File

@ -32,14 +32,15 @@ java -jar $bundletool_jar_path install-apks --apks=build/app/outputs/bundle/rele
$adb_path shell " $adb_path shell "
am start -n io.flutter.integration.deferred_components_test/.MainActivity am start -n io.flutter.integration.deferred_components_test/.MainActivity
sleep 20 sleep 30
exit exit
" "
$adb_path logcat -d -t "$script_start_time" -s "flutter" > build/app/outputs/bundle/release/run_logcat.log $adb_path logcat -d -t "$script_start_time" > build/app/outputs/bundle/release/run_logcat.log
echo "" echo ""
if cat build/app/outputs/bundle/release/run_logcat.log | grep -q "Running deferred code"; then if cat build/app/outputs/bundle/release/run_logcat.log | grep -q "Running deferred code"; then
echo "All tests passed." echo "All tests passed."
exit 0 exit 0
fi fi
cat build/app/outputs/bundle/release/run_logcat.log
echo "Failure: Deferred component did not load." echo "Failure: Deferred component did not load."
exit 1 exit 1