1#!/bin/bash 2# Copyright (C) 2019 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16INSTALL_BUILD_DEPS_ARGS="--ui" 17source $(dirname ${BASH_SOURCE[0]})/common.sh 18 19ui/build --out ${OUT_PATH} 20 21cp -a ${OUT_PATH}/ui/dist/ /ci/artifacts/ui 22 23ui/run-unittests --out ${OUT_PATH} --no-build 24 25set +e 26ui/run-integrationtests --out ${OUT_PATH} --no-build 27RES=$? 28 29# Copy the screenshots for diff testing when the test fails. 30if [ $RES -ne 0 -a -d ${OUT_PATH}/ui-test-artifacts ]; then 31 cp -a ${OUT_PATH}/ui-test-artifacts /ci/artifacts/ui-test-artifacts 32 exit $RES 33fi 34