From e251a228f21991388d8d177be161acf91c4fbab6 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 20 Jul 2021 21:46:01 -0700 Subject: [PATCH] Delete unused CI scripts (flutter/engine#27606) --- .../testing/scenario_app/assemble_apk.sh | 35 ------------- .../build_and_run_android_tests.sh | 46 ----------------- .../scenario_app/build_and_run_ios_tests.sh | 46 ----------------- .../testing/scenario_app/firebase_xctest.sh | 49 ------------------- 4 files changed, 176 deletions(-) delete mode 100755 engine/src/flutter/testing/scenario_app/assemble_apk.sh delete mode 100755 engine/src/flutter/testing/scenario_app/build_and_run_android_tests.sh delete mode 100755 engine/src/flutter/testing/scenario_app/build_and_run_ios_tests.sh delete mode 100755 engine/src/flutter/testing/scenario_app/firebase_xctest.sh diff --git a/engine/src/flutter/testing/scenario_app/assemble_apk.sh b/engine/src/flutter/testing/scenario_app/assemble_apk.sh deleted file mode 100755 index bd54c7fb92..0000000000 --- a/engine/src/flutter/testing/scenario_app/assemble_apk.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -e - -# Needed because if it is set, cd may print the path it changed to. -unset CDPATH - -# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one -# link at a time, and then cds into the link destination and find out where it -# ends up. -# -# The function is enclosed in a subshell to avoid changing the working directory -# of the caller. -function follow_links() ( - cd -P "$(dirname -- "$1")" - file="$PWD/$(basename -- "$1")" - while [[ -L "$file" ]]; do - cd -P "$(dirname -- "$file")" - file="$(readlink -- "$file")" - cd -P "$(dirname -- "$file")" - file="$PWD/$(basename -- "$file")" - done - echo "$file" -) - -SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")") -SRC_DIR="$(cd "$SCRIPT_DIR/../../.."; pwd -P)" -export ANDROID_HOME="$SRC_DIR/third_party/android_tools/sdk" - -# TODO(dnfield): Delete this whole file. -DEVICE_OUT_DIR=${2%"clang_x64"} - -# LUCI expects to find the APK here -mkdir -p "$SCRIPT_DIR/android/app/build/outputs/apk/debug" -cp "$DEVICE_OUT_DIR/scenario_app/app/outputs/apk/debug/app-debug.apk" "$SCRIPT_DIR/android/app/build/outputs/apk/debug" diff --git a/engine/src/flutter/testing/scenario_app/build_and_run_android_tests.sh b/engine/src/flutter/testing/scenario_app/build_and_run_android_tests.sh deleted file mode 100755 index 73c2a9362d..0000000000 --- a/engine/src/flutter/testing/scenario_app/build_and_run_android_tests.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -set -e - -# Needed because if it is set, cd may print the path it changed to. -unset CDPATH - -# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one -# link at a time, and then cds into the link destination and find out where it -# ends up. -# -# The function is enclosed in a subshell to avoid changing the working directory -# of the caller. -function follow_links() ( - cd -P "$(dirname -- "$1")" - file="$PWD/$(basename -- "$1")" - while [[ -h "$file" ]]; do - cd -P "$(dirname -- "$file")" - file="$(readlink -- "$file")" - cd -P "$(dirname -- "$file")" - file="$PWD/$(basename -- "$file")" - done - echo "$file" -) - -SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")") -SRC_DIR="$(cd "$SCRIPT_DIR/../../.."; pwd -P)" -GN="$SRC_DIR/flutter/tools/gn" - -FLUTTER_ENGINE=android_debug_unopt_x64 -export ANDROID_HOME="$SRC_DIR/third_party/android_tools/sdk" - -if [[ $# -eq 1 ]]; then - FLUTTER_ENGINE="$1" -fi - -if [[ ! -d "$SRC_DIR/out/$FLUTTER_ENGINE" ]]; then - "$GN" --android --unoptimized --android-cpu x64 --runtime-mode debug -fi - -autoninja -C "$SRC_DIR/out/$FLUTTER_ENGINE" - -"$SCRIPT_DIR/run_android_tests.sh" "$FLUTTER_ENGINE" diff --git a/engine/src/flutter/testing/scenario_app/build_and_run_ios_tests.sh b/engine/src/flutter/testing/scenario_app/build_and_run_ios_tests.sh deleted file mode 100755 index ef5a25d800..0000000000 --- a/engine/src/flutter/testing/scenario_app/build_and_run_ios_tests.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -set -e - -# Needed because if it is set, cd may print the path it changed to. -unset CDPATH - -# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one -# link at a time, and then cds into the link destination and find out where it -# ends up. -# -# The function is enclosed in a subshell to avoid changing the working directory -# of the caller. -function follow_links() ( - cd -P "$(dirname -- "$1")" - file="$PWD/$(basename -- "$1")" - while [[ -h "$file" ]]; do - cd -P "$(dirname -- "$file")" - file="$(readlink -- "$file")" - cd -P "$(dirname -- "$file")" - file="$PWD/$(basename -- "$file")" - done - echo "$file" -) - -SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")") -SRC_DIR="$(cd "$SCRIPT_DIR/../../.."; pwd -P)" -GN="$SRC_DIR/flutter/tools/gn" - -FLUTTER_ENGINE=ios_debug_sim_unopt - -if [[ $# -eq 1 ]]; then - FLUTTER_ENGINE="$1" -fi - -if [ ! -d "$SRC_DIR/out/$FLUTTER_ENGINE" ]; then - "$GN" --ios --simulator --unoptimized - "$GN" --unoptimized -fi - -autoninja -C "$SRC_DIR/out/$FLUTTER_ENGINE" - -"$SCRIPT_DIR/run_ios_tests.sh" "$FLUTTER_ENGINE" diff --git a/engine/src/flutter/testing/scenario_app/firebase_xctest.sh b/engine/src/flutter/testing/scenario_app/firebase_xctest.sh deleted file mode 100755 index e418971c47..0000000000 --- a/engine/src/flutter/testing/scenario_app/firebase_xctest.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -set -e - -# Needed because if it is set, cd may print the path it changed to. -unset CDPATH - -# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one -# link at a time, and then cds into the link destination and find out where it -# ends up. -# -# The function is enclosed in a subshell to avoid changing the working directory -# of the caller. -function follow_links() ( - cd -P "$(dirname -- "$1")" - file="$PWD/$(basename -- "$1")" - while [[ -L "$file" ]]; do - cd -P "$(dirname -- "$file")" - file="$(readlink -- "$file")" - cd -P "$(dirname -- "$file")" - file="$PWD/$(basename -- "$file")" - done - echo "$file" -) - -SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")") - -"$SCRIPT_DIR/compile_ios_aot.sh" "$1" "$2" - -GIT_REVISION="${3:-$(git rev-parse HEAD)}" -BUILD_ID="${4:-$CIRRUS_BUILD_ID}" - -( - cd "${BASH_SOURCE%/*}/ios/Scenarios" - xcodebuild -project Scenarios.xcodeproj -scheme Scenarios -configuration Debug \ - -sdk iphoneos \ - -derivedDataPath DerivedData/Scenarios \ - build-for-testing -) - -( - cd DerivedData/Scenarios/Build/Products - zip -r scenarios.zip Debug-iphoneos Scenarios*.xctestrun - gcloud firebase test ios run --test ./scenarios.zip \ - --device model=iphone8plus,version=12.0,locale=en_US,orientation=portrait \ - --xcode-version=10.2 \ - --results-bucket=gs://flutter_firebase_testlab \ - --results-dir="engine_scenario_test/$GIT_REVISION/$BUILD_ID" -)