1#!/usr/bin/env bash 2 3# This Source Code Form is subject to the terms of the Mozilla Public 4# License, v. 2.0. If a copy of the MPL was not distributed with this 5# file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7# This must be run from the root webrender directory! 8# Users may set the CARGOFLAGS environment variable to pass 9# additional flags to cargo if desired. 10# The WRENCH_BINARY environment variable, if set, is used to run 11# the precached reftest. 12 13set -o errexit 14set -o nounset 15set -o pipefail 16set -o xtrace 17 18CARGOFLAGS=${CARGOFLAGS:-""} # default to empty if not set 19WRENCH_BINARY=${WRENCH_BINARY:-""} 20 21pushd wrench 22python script/headless.py reftest 23if [[ -z "${WRENCH_BINARY}" ]]; then 24 cargo build ${CARGOFLAGS} --release 25 WRENCH_BINARY="../target/release/wrench" 26fi 27"${WRENCH_BINARY}" --precache \ 28 reftest reftests/clip/fixed-position-clipping.yaml 29popd 30