1*6dbdd20aSAndroid Build Coastguard Worker#!/bin/bash 2*6dbdd20aSAndroid Build Coastguard Worker# Copyright (C) 2019 The Android Open Source Project 3*6dbdd20aSAndroid Build Coastguard Worker# 4*6dbdd20aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); 5*6dbdd20aSAndroid Build Coastguard Worker# you may not use this file except in compliance with the License. 6*6dbdd20aSAndroid Build Coastguard Worker# You may obtain a copy of the License at 7*6dbdd20aSAndroid Build Coastguard Worker# 8*6dbdd20aSAndroid Build Coastguard Worker# http://www.apache.org/licenses/LICENSE-2.0 9*6dbdd20aSAndroid Build Coastguard Worker# 10*6dbdd20aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 11*6dbdd20aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, 12*6dbdd20aSAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*6dbdd20aSAndroid Build Coastguard Worker# See the License for the specific language governing permissions and 14*6dbdd20aSAndroid Build Coastguard Worker# limitations under the License. 15*6dbdd20aSAndroid Build Coastguard Worker 16*6dbdd20aSAndroid Build Coastguard Workersource $(dirname ${BASH_SOURCE[0]})/common.sh 17*6dbdd20aSAndroid Build Coastguard Worker 18*6dbdd20aSAndroid Build Coastguard Workerexport CI=1 19*6dbdd20aSAndroid Build Coastguard Worker 20*6dbdd20aSAndroid Build Coastguard Workerinfra/perfetto.dev/build 21*6dbdd20aSAndroid Build Coastguard Worker 22*6dbdd20aSAndroid Build Coastguard Workerui/build --out ${OUT_PATH} 23*6dbdd20aSAndroid Build Coastguard Worker 24*6dbdd20aSAndroid Build Coastguard Workercp -a ${OUT_PATH}/ui/dist/ /ci/artifacts/ui 25*6dbdd20aSAndroid Build Coastguard Worker 26*6dbdd20aSAndroid Build Coastguard Workerui/run-unittests --out ${OUT_PATH} --no-build 27*6dbdd20aSAndroid Build Coastguard Worker 28*6dbdd20aSAndroid Build Coastguard Workerset +e 29*6dbdd20aSAndroid Build Coastguard Worker 30*6dbdd20aSAndroid Build Coastguard Worker# Install chrome 31*6dbdd20aSAndroid Build Coastguard Worker( 32*6dbdd20aSAndroid Build Coastguard Worker mkdir /ci/ramdisk/chrome 33*6dbdd20aSAndroid Build Coastguard Worker cd /ci/ramdisk/chrome 34*6dbdd20aSAndroid Build Coastguard Worker CHROME_VERSION=128.0.6613.137 35*6dbdd20aSAndroid Build Coastguard Worker curl -Ls -o chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb 36*6dbdd20aSAndroid Build Coastguard Worker dpkg-deb -x chrome.deb . 37*6dbdd20aSAndroid Build Coastguard Worker) 38*6dbdd20aSAndroid Build Coastguard Workerui/run-integrationtests --out ${OUT_PATH} --no-build 39*6dbdd20aSAndroid Build Coastguard WorkerRES=$? 40*6dbdd20aSAndroid Build Coastguard Worker 41*6dbdd20aSAndroid Build Coastguard Workerset +x 42*6dbdd20aSAndroid Build Coastguard Worker 43*6dbdd20aSAndroid Build Coastguard Worker# Copy the output of screenshots diff testing. 44*6dbdd20aSAndroid Build Coastguard Workerif [ -d ${OUT_PATH}/ui-test-artifacts ]; then 45*6dbdd20aSAndroid Build Coastguard Worker cp -a ${OUT_PATH}/ui-test-artifacts /ci/artifacts/ui-test-artifacts 46*6dbdd20aSAndroid Build Coastguard Worker echo "UI integration test report with screnshots:" 47*6dbdd20aSAndroid Build Coastguard Worker echo "https://storage.googleapis.com/perfetto-ci-artifacts/$PERFETTO_TEST_JOB/ui-test-artifacts/index.html" 48*6dbdd20aSAndroid Build Coastguard Worker echo "" 49*6dbdd20aSAndroid Build Coastguard Worker echo "To download locally the changed screenshots run:" 50*6dbdd20aSAndroid Build Coastguard Worker echo "tools/download_changed_screenshots.py $PERFETTO_TEST_JOB" 51*6dbdd20aSAndroid Build Coastguard Worker echo "" 52*6dbdd20aSAndroid Build Coastguard Worker echo "Perfetto UI build for this CL" 53*6dbdd20aSAndroid Build Coastguard Worker echo "https://storage.googleapis.com/perfetto-ci-artifacts/$PERFETTO_TEST_JOB/ui/index.html" 54*6dbdd20aSAndroid Build Coastguard Worker exit $RES 55*6dbdd20aSAndroid Build Coastguard Workerfi 56