#!/usr/bin/env bash
set -x

_SCRIPT_DIR=$(dirname $0);
pushd $_SCRIPT_DIR;

. ./_build_env

export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.86.0-1/skia-binaries-cab569e6478958ca0783-x86_64-unknown-linux-gnu-gl-svg-textlayout-binary-cache-webp.tar.gz"}
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"x86_64-unknown-linux-gnu"};

cargo test --bin render_wasm -- --show-output

# Exit with the same status code as cargo test
exit $?

popd
