Skip to content

Commit

Permalink
Revert "Temporarily disable most macos test (#80)" (#81)
Browse files Browse the repository at this point in the history
This reverts commit 33f24c3.
  • Loading branch information
msullivan authored Apr 23, 2024
1 parent 33f24c3 commit a9c8b24
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions integration/macos/test.sh
Original file line number Diff line number Diff line change
@@ -1 +1,62 @@
#!/bin/bash

set -eEx

dest="artifacts"
if [ -n "${PKG_PLATFORM}" ]; then
dest="${dest}/${PKG_PLATFORM}"
fi
if [ -n "${PKG_PLATFORM_VERSION}" ]; then
dest="${dest}-${PKG_PLATFORM_VERSION}"
fi
if [ -n "${PKG_TEST_JOBS}" ]; then
dash_j="-j${PKG_TEST_JOBS}"
else
dash_j=""
fi

cliurl="https://packages.edgedb.com/dist/${PKG_PLATFORM_VERSION}-apple-darwin.nightly"

tarball=
for pack in ${dest}/*.tar; do
if [ -e "${pack}" ]; then
tarball=$(tar -xOf "${pack}" "build-metadata.json" \
| jq -r ".installrefs[]" \
| grep ".tar.gz$")
if [ -n "${tarball}" ]; then
break
fi
fi
done

if [ -z "${tarball}" ]; then
echo "${dest} does not contain a valid build tarball" >&2
exit 1
fi

workdir=$(mktemp -d)

function finally {
rm -rf "$workdir"
}
trap finally EXIT ERR

mkdir "${workdir}/bin"
curl --proto '=https' --tlsv1.2 -sSfL -o "${workdir}/bin/edgedb" \
"${cliurl}/edgedb-cli"
chmod +x "${workdir}/bin/edgedb"

gtar -xOf "${pack}" "${tarball}" | gtar -xzf- --strip-components=1 -C "$workdir"

if [ "$1" == "bash" ]; then
cd "$workdir"
exec /bin/bash
fi

export PATH="${workdir}/bin/:${PATH}"

"${workdir}/bin/python3" \
-m edb.tools --no-devmode test \
"${workdir}/data/tests" \
-e cqa_ -e tools_ \
--verbose ${dash_j}

0 comments on commit a9c8b24

Please sign in to comment.