2020-04-30 18:52:54 +07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
main() {
|
|
|
|
cd "$(dirname "$0")/../.."
|
2021-06-23 04:34:44 +07:00
|
|
|
source ./ci/lib.sh
|
|
|
|
|
|
|
|
local dir="$PWD"
|
|
|
|
if [[ ! ${CODE_SERVER_TEST_ENTRY-} ]]; then
|
|
|
|
echo "Set CODE_SERVER_TEST_ENTRY to test another build of code-server"
|
|
|
|
else
|
|
|
|
pushd "$CODE_SERVER_TEST_ENTRY"
|
|
|
|
dir="$PWD"
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Testing build in '$dir'"
|
|
|
|
|
|
|
|
# Simple sanity checks to see that we've built. There could still be things
|
|
|
|
# wrong (native modules version issues, incomplete build, etc).
|
|
|
|
if [[ ! -d $dir/out ]]; then
|
|
|
|
echo >&2 "No code-server build detected"
|
|
|
|
echo >&2 "You can build it with 'yarn build' or 'yarn watch'"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! -d $dir/lib/vscode/out ]]; then
|
|
|
|
echo >&2 "No VS Code build detected"
|
|
|
|
echo >&2 "You can build it with 'yarn build:vscode' or 'yarn watch'"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-04-14 07:31:56 +07:00
|
|
|
cd test
|
2021-06-23 04:34:44 +07:00
|
|
|
yarn playwright test "$@"
|
2020-04-30 18:52:54 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|