summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2018-06-29 19:25:43 -0400
committerAndrew Morrow <acm@mongodb.com>2018-07-10 08:59:31 -0400
commit5f42f89382821634d1daba179b9ae2236c2dffeb (patch)
tree30438586312bbd31c5dba08da6235fef919b1075
parent8d5d6cf7a21c228f22c472c2779fc650c520fcfa (diff)
downloadmongo-5f42f89382821634d1daba179b9ae2236c2dffeb.tar.gz
SERVER-33996 Only code sign when running tests
(cherry picked from commit 52721f79b7e92cd1b743f9d20de0d9ecf0a53655)
-rw-r--r--etc/evergreen.yml117
1 files changed, 49 insertions, 68 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 1d79a457d59..b5a0371a5d5 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -1040,30 +1040,6 @@ functions:
sudo umount /efs || umount /efs || true
fi
- "build cdriver" :
- command: shell.exec
- params:
- script: |
- set -o errexit
- set -o verbose
-
- VERSION=${version}
- WORKDIR=${workdir}
-
- CDRIVER_VERSION=1.10.3
- rm -rf mongo-c-driver-$CDRIVER_VERSION
- rm -rf mongo-c-driver
- curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$CDRIVER_VERSION/mongo-c-driver-$CDRIVER_VERSION.tar.gz
- tar xzf mongo-c-driver-$CDRIVER_VERSION.tar.gz
- mv mongo-c-driver-$CDRIVER_VERSION mongo-c-driver
- cd mongo-c-driver
-
- trap "cat CMakeFiles/CMakeOutput.log" EXIT
- export ${compile_env|}
- ${cmake_path|/opt/cmake/bin/cmake} -DCMAKE_INSTALL_PREFIX=$WORKDIR/src/build/mongo-embedded-sdk-$VERSION-tmp -DENABLE_SHM_COUNTERS=OFF -DENABLE_SNAPPY=OFF -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_ZLIB=OFF -DENABLE_SSL=OFF -DENABLE_SASL=OFF -DENABLE_TESTS=OFF -DENABLE_SRV=OFF -DENABLE_EXAMPLES=OFF -DENABLE_STATIC=OFF ${cdriver_cmake_flags}
- make install VERBOSE=1
- mv $WORKDIR/src/build/mongo-embedded-sdk-$VERSION-tmp $WORKDIR/src/build/mongo-embedded-sdk-$VERSION
-
"build new tools" :
command: shell.exec
params:
@@ -1684,30 +1660,6 @@ functions:
${activate_virtualenv}
$python buildscripts/idl/run_tests.py
- "run embedded tests" :
- command: shell.exec
- type: test
- params:
- working_dir: src
- script: |
- set -o verbose
- set -o errexit
-
- ${activate_virtualenv}
- if [ ${enable_embedded_tests|false} = "ios_tvos_simulator" ]; then
- ${compile_env|} buildscripts/runiossim.sh ${ios_sim_device} ${ios_sim_runtime} "build/mongo-embedded-sdk-${version}/bin/mongo_embedded_capi_test" --tempPath /data
- ${compile_env|} buildscripts/runiossim.sh ${ios_sim_device} ${ios_sim_runtime} "build/mongo-embedded-sdk-${version}/bin/mongo_embedded_mongoc_client_test" --tempPath /data
- elif [ ${enable_embedded_tests|false} = "android_emulator" ]; then
- # strip because the binaries with debug symbols are too big for the default storage on the emulator
- find build/mongo-embedded-sdk-${version}/bin -type f | xargs $(dirname $(pwd))/android_toolchain-${android_toolchain_target_arch}-${android_toolchain_api_version}/bin/*-linux-android*-strip
- find build/mongo-embedded-sdk-${version}/lib -type f -name "*.so" | xargs $(dirname $(pwd))/android_toolchain-${android_toolchain_target_arch}-${android_toolchain_api_version}/bin/*-linux-android*-strip
- ${compile_env|} buildscripts/runandroidsim.sh $(dirname $(pwd))/android_sdk ${android_toolchain_system_image_arch} ${android_system_image_version} "build/mongo-embedded-sdk-${version}" "bin/mongo_embedded_capi_test" --tempPath /data
- ${compile_env|} buildscripts/runandroidsim.sh $(dirname $(pwd))/android_sdk ${android_toolchain_system_image_arch} ${android_system_image_version} "build/mongo-embedded-sdk-${version}" "bin/mongo_embedded_mongoc_client_test" --tempPath /data
- elif [ ${enable_embedded_tests|false} = "native" ]; then
- "build/mongo-embedded-sdk-${version}/bin/mongo_embedded_capi_test"
- "build/mongo-embedded-sdk-${version}/bin/mongo_embedded_mongoc_client_test"
- fi
-
"run powercycle test" :
- command: shell.exec
params:
@@ -3401,7 +3353,28 @@ tasks:
- name: embedded_sdk_build_cdriver
commands:
- - func: "build cdriver"
+ - command: shell.exec
+ params:
+ script: |
+ set -o errexit
+ set -o verbose
+
+ VERSION=${version}
+ WORKDIR=${workdir}
+
+ CDRIVER_VERSION=1.10.3
+ rm -rf mongo-c-driver-$CDRIVER_VERSION
+ rm -rf mongo-c-driver
+ curl -LO https://github.com/mongodb/mongo-c-driver/releases/download/$CDRIVER_VERSION/mongo-c-driver-$CDRIVER_VERSION.tar.gz
+ tar xzf mongo-c-driver-$CDRIVER_VERSION.tar.gz
+ mv mongo-c-driver-$CDRIVER_VERSION mongo-c-driver
+ cd mongo-c-driver
+
+ trap "cat CMakeFiles/CMakeOutput.log" EXIT
+ export ${compile_env|}
+ ${cmake_path|/opt/cmake/bin/cmake} -DCMAKE_INSTALL_PREFIX=$WORKDIR/src/build/mongo-embedded-sdk-$VERSION-tmp -DENABLE_SHM_COUNTERS=OFF -DENABLE_SNAPPY=OFF -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -DENABLE_ZLIB=OFF -DENABLE_SSL=OFF -DENABLE_SASL=OFF -DENABLE_TESTS=OFF -DENABLE_SRV=OFF -DENABLE_EXAMPLES=OFF -DENABLE_STATIC=OFF ${cdriver_cmake_flags}
+ make install VERBOSE=1
+ mv $WORKDIR/src/build/mongo-embedded-sdk-$VERSION-tmp $WORKDIR/src/build/mongo-embedded-sdk-$VERSION
- name: embedded_sdk_install_dev
commands:
@@ -3423,18 +3396,6 @@ tasks:
- name: embedded_sdk_s3_put
commands:
- # Need to sign artifacts on iOS-ish.
- - command: shell.exec
- params:
- working_dir: "src/build/mongo-embedded-sdk-${version}"
- script: |
- set -o errexit
- set -o verbose
- if command -v xcrun; then
- # Do ad-hoc signing for now, until we have a better answer
- find ./lib -type f -name "*.dylib" -print0 | xargs -0 -L 1 xcrun codesign -s -
- fi
-
# Not using archive.targz_pack here because I can't get it to work.
- command: shell.exec
params:
@@ -3463,21 +3424,41 @@ tasks:
vars:
targets: install-mobile-test
task_compile_flags: *embedded_sdk_compile_flags
+
+- name: embedded_sdk_run_tests
+ commands:
- command: shell.exec
params:
working_dir: "src/build/mongo-embedded-sdk-${version}"
script: |
set -o errexit
set -o verbose
- if command -v xcrun; then
- # Do ad-hoc signing for now, until we have a better answer
- find ./lib -type f -name "*.dylib" -print0 | \
- xargs -0 -L 1 -I "{}" bash -c "xcrun codesign -v {} || xcrun codesign -s - {}"
+ if [ ${enable_embedded_tests|false} = "ios_tvos_simulator" -a $(command -v xcrun) ]; then
+ find ./lib -type f -name "*.dylib" -print0 | xargs -0 -L 1 xcrun codesign -s -
fi
-- name: embedded_sdk_run_tests
- commands:
- - func: "run embedded tests"
+ - command: shell.exec
+ type: test
+ params:
+ working_dir: src
+ script: |
+ set -o verbose
+ set -o errexit
+
+ ${activate_virtualenv}
+ if [ ${enable_embedded_tests|false} = "ios_tvos_simulator" ]; then
+ ${compile_env|} buildscripts/runiossim.sh ${ios_sim_device} ${ios_sim_runtime} "build/mongo-embedded-sdk-${version}/bin/mongo_embedded_capi_test" --tempPath /data
+ ${compile_env|} buildscripts/runiossim.sh ${ios_sim_device} ${ios_sim_runtime} "build/mongo-embedded-sdk-${version}/bin/mongo_embedded_mongoc_client_test" --tempPath /data
+ elif [ ${enable_embedded_tests|false} = "android_emulator" ]; then
+ # strip because the binaries with debug symbols are too big for the default storage on the emulator
+ find build/mongo-embedded-sdk-${version}/bin -type f | xargs $(dirname $(pwd))/android_toolchain-${android_toolchain_target_arch}-${android_toolchain_api_version}/bin/*-linux-android*-strip
+ find build/mongo-embedded-sdk-${version}/lib -type f -name "*.so" | xargs $(dirname $(pwd))/android_toolchain-${android_toolchain_target_arch}-${android_toolchain_api_version}/bin/*-linux-android*-strip
+ ${compile_env|} buildscripts/runandroidsim.sh $(dirname $(pwd))/android_sdk ${android_toolchain_system_image_arch} ${android_system_image_version} "build/mongo-embedded-sdk-${version}" "bin/mongo_embedded_capi_test" --tempPath /data
+ ${compile_env|} buildscripts/runandroidsim.sh $(dirname $(pwd))/android_sdk ${android_toolchain_system_image_arch} ${android_system_image_version} "build/mongo-embedded-sdk-${version}" "bin/mongo_embedded_mongoc_client_test" --tempPath /data
+ elif [ ${enable_embedded_tests|false} = "native" ]; then
+ "build/mongo-embedded-sdk-${version}/bin/mongo_embedded_capi_test"
+ "build/mongo-embedded-sdk-${version}/bin/mongo_embedded_mongoc_client_test"
+ fi
# If this is a patch build, blow away the file so our subsequent and optional s3.put
# doesn't run. That way, we won't overwrite the latest part in our patches.