summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorAndrew Morrow <andrew.morrow@10gen.com>2019-11-20 15:01:13 +0000
committerevergreen <evergreen@mongodb.com>2019-11-20 15:01:13 +0000
commitc65877d82f3fcc9f355c93f9921bf7a332a88817 (patch)
tree5eb38aa03d3e331fa4a9cf9595653456be110067 /buildscripts
parent13c3960a0c30e05d8a3b25e5bf9669e268933ec7 (diff)
downloadmongo-c65877d82f3fcc9f355c93f9921bf7a332a88817.tar.gz
SERVER-44545 Remove mobile embedded variants and associated support files
Diffstat (limited to 'buildscripts')
-rwxr-xr-xbuildscripts/runandroidsim.sh78
-rwxr-xr-xbuildscripts/runiossim.sh54
-rwxr-xr-xbuildscripts/setup-android-toolchain.sh40
3 files changed, 0 insertions, 172 deletions
diff --git a/buildscripts/runandroidsim.sh b/buildscripts/runandroidsim.sh
deleted file mode 100755
index 86dcc84dc8e..00000000000
--- a/buildscripts/runandroidsim.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/bash
-
-if [ "$#" -lt "5" ]; then
- echo "usage:"
- echo "$0 <android-sdk-path> <sysarch> <image-api-version> <directory> <test-path-in-directory>"
- exit 1
-fi
-
-set -o verbose
-set -o errexit
-set -o pipefail
-
-ANDROID_SDK=$1
-shift
-ANDROID_SYSTEM_IMAGE_ARCH=$1
-shift
-ANDROID_IMAGE_API_VERSION=$1
-shift
-DIRECTORY=$1
-shift
-TEST_PATH_IN_DIRECTORY=$1
-shift
-
-EMULATOR_PID=''
-cleanup() {
- echo "Cleanup handler invoked"
-
- if [ -z "$EMULATOR_PID" ]; then
- echo "No EMULATOR_PID found; not killing"
- else
- echo "Killing emulator"
- kill $EMULATOR_PID || true
-
- echo "Waiting for emulator to shut down"
- wait $EMULATOR_PID || true
- fi
-
- echo "Deleting the virtual device"
- $ANDROID_SDK/tools/bin/avdmanager delete avd -n android_avd || true
-
- echo "Exiting with status $1"
- exit $1
-}
-
-echo "Creating Android virtual device"
-echo no | $ANDROID_SDK/tools/bin/avdmanager create avd --force -k "system-images;android-$ANDROID_IMAGE_API_VERSION;google_apis;$ANDROID_SYSTEM_IMAGE_ARCH" --name android_avd --abi google_apis/$ANDROID_SYSTEM_IMAGE_ARCH -p android_avd
-
-trap 'cleanup $?' INT TERM EXIT
-
-echo "Starting the virtual device on the emulator"
-$ANDROID_SDK/emulator/emulator @android_avd -no-window -no-audio -no-accel &
-EMULATOR_PID=$!
-
-echo "Waiting for the adb service to be ready for commands"
-$ANDROID_SDK/platform-tools/adb wait-for-device
-
-echo "Making the adb service become root"
-$ANDROID_SDK/platform-tools/adb root
-
-echo "Copying the test to the virtual device"
-$ANDROID_SDK/platform-tools/adb push $DIRECTORY /data
-
-echo "Running the test on the virtual device"
-$ANDROID_SDK/platform-tools/adb shell /data/$(basename $DIRECTORY)/$TEST_PATH_IN_DIRECTORY "$@" | tee android_sim_test_output.txt 2>&1
-
-# On the android sim ( possibly on normal android as well ) if a program fails its runtime link,
-# for example because of a missing library, it will have an exit code of 0. In which case the
-# android_sim_test_output.txt file will not contian the test output, but instead will contain
-# "CANNOT LINK EXECUTABLE"
-# So, once we're here in this script, the previous adb shell test command has either run
-# successfully or failed to link. If it ran with errors, this script would have returned already
-# because of the errexit.
-# We test the output file to disambiguate
-grep -q 'SUCCESS - All tests in all suites passed' android_sim_test_output.txt
-
-# Do not add additional statements after the above command invocation without
-# forwarding its exit status or you will cause failing tests to appear
-# to succeed.
diff --git a/buildscripts/runiossim.sh b/buildscripts/runiossim.sh
deleted file mode 100755
index 77e0be6b75d..00000000000
--- a/buildscripts/runiossim.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-
-set -o verbose
-set -o errexit
-
-# This script used to create simulators called 'mongo-sim', but then
-# failed to delete them leading to stale instances on the machines. We
-# have since changed the name, and made the script smarter, but this
-# startup code is here to clean out any old stale devices. It can
-# probably be removed in a few weeks.
-xcrun simctl list | grep mongo-sim | awk '{print $1}' | xargs xcrun simctl delete || true
-
-if [ "$#" -lt "3" ]; then
- echo "usage:"
- echo "$0 <device> <runtime> <test>"
- exit 1
-fi
-
-DEVICE="$1"
-shift
-RUNTIME="$1"
-shift
-TEST="$1"
-shift
-
-cleanup() {
- echo "Shutting down simulator"
- xcrun simctl shutdown $_SimId || true
-
- echo "Erasing simulator"
- xcrun simctl erase $_SimId || true
-
- echo "Deleting simulator"
- xcrun simctl delete $_SimId || true
-
- echo "Exiting with status $1"
- exit $1
-}
-
-echo "Creating simulator"
-_SimId=$(xcrun simctl create mongodb-simulator-$DEVICE.$RUNTIME "com.apple.CoreSimulator.SimDeviceType.$DEVICE" "com.apple.CoreSimulator.SimRuntime.$RUNTIME")
-echo "Simulator created with ID $_SimId"
-
-trap 'cleanup $?' INT TERM EXIT
-
-echo "Booting simulator"
-xcrun simctl boot $_SimId
-
-echo "Spawning test program in simulator"
-xcrun simctl spawn $_SimId "$TEST" "$@"
-
-# Do not add additional statements after the above spawn without
-# forwarding its exit status or you will cause failing tests to appear
-# to succeed.
diff --git a/buildscripts/setup-android-toolchain.sh b/buildscripts/setup-android-toolchain.sh
deleted file mode 100755
index 9d2f5f08151..00000000000
--- a/buildscripts/setup-android-toolchain.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-set -o verbose
-set -o errexit
-
-SDK_ROOT=$1
-if [ -z $SDK_ROOT ]; then
- echo "usage: $0 <sdk-root>"
- exit 1
-fi
-shift
-
-NDK=android-ndk-r19c
-NDK_PACKAGE=$NDK-linux-x86_64.zip
-# The releases of the sdk tools are published at
-# https://developer.android.com/studio/releases/sdk-tools
-SDK_PACKAGE=sdk-tools-linux-4333796.zip # 26.1.1
-
-test -e $SDK_PACKAGE || curl -O https://dl.google.com/android/repository/$SDK_PACKAGE
-test -e $NDK_PACKAGE || curl -O https://dl.google.com/android/repository/$NDK_PACKAGE
-
-if [ ! -e $SDK_ROOT ]; then
- mkdir $SDK_ROOT
- (
- cd $SDK_ROOT
- unzip -q ../$SDK_PACKAGE
- yes | ./tools/bin/sdkmanager --channel=0 \
- "build-tools;28.0.0" \
- "emulator" \
- "patcher;v4" \
- "platforms;android-28" \
- "platform-tools" \
- "system-images;android-24;google_apis;arm64-v8a" \
- "system-images;android-24;google_apis;armeabi-v7a" \
- "system-images;android-24;google_apis;x86_64" \
- | grep -v Unzipping
- )
- unzip -q $NDK_PACKAGE
- mv $NDK $SDK_ROOT/ndk-bundle
-fi