fune/taskcluster/scripts/misc/wr-cargotest-macos-build.sh
Mike Hommey 74e2a2cabf Bug 1672499 - Get wrench cargo tests from the deps subdirectory. r=kats
As of cargo 1.44.0, the test binaries are not copied into
target/$target/debug, but they are in target/$target/debug/deps (they
were there too before). Cargo test runs the tests from there now
instead, so change the scripts accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D94402
2020-10-22 11:25:58 +00:00

24 lines
732 B
Bash
Executable file

#!/bin/bash
set -x -e -v
source ${GECKO_PATH}/taskcluster/scripts/misc/wr-macos-cross-build-setup.sh
export UPLOAD_DIR="${HOME}/artifacts"
mkdir -p "${UPLOAD_DIR}"
# Do a cross-build for cargo test run
pushd "${GECKO_PATH}/gfx/wr"
CARGOFLAGS="-vv --frozen --target=${TARGET_TRIPLE}" \
CARGOTESTFLAGS="--no-run" \
ci-scripts/macos-debug-tests.sh
# Package up the test binaries
cd "target/${TARGET_TRIPLE}"
mkdir cargo-test-binaries
mv debug cargo-test-binaries/
find cargo-test-binaries/debug/deps -type f -maxdepth 1 -executable -print0 > binaries.lst
tar cjf cargo-test-binaries.tar.bz2 --null -T binaries.lst
mv cargo-test-binaries.tar.bz2 "${UPLOAD_DIR}"
# Clean the build
cd "${GECKO_PATH}/gfx/wr"
rm -rf target
popd