blob: c7007db6028e82493f2898baba7bedcbececbe36 [file] [log] [blame]
Makoto Onuki8558e9a2023-08-31 10:48:38 -07001#!/bin/bash
2# Copyright (C) 2023 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
16source "${0%/*}"/../common.sh
17
18# Move to the top directory of hoststubgen
19cd ..
20
Makoto Onuki0622dd12023-11-30 16:03:25 -080021ATEST_ARGS="--host"
22
Makoto Onuki8558e9a2023-08-31 10:48:38 -070023# These tests are known to pass.
24READY_TEST_MODULES=(
25 HostStubGenTest-framework-all-test-host-test
26 hoststubgen-test-tiny-test
Makoto Onukic8a04dc2023-11-21 09:52:24 -080027 CtsUtilTestCasesRavenwood
Makoto Onuki8558e9a2023-08-31 10:48:38 -070028)
29
Makoto Onukic69a84e2023-10-20 10:43:55 -070030MUST_BUILD_MODULES=(
Makoto Onukic69a84e2023-10-20 10:43:55 -070031 "${NOT_READY_TEST_MODULES[*]}"
32 HostStubGenTest-framework-test
33)
34
35# First, build all the test / etc modules. This shouldn't fail.
36run m "${MUST_BUILD_MODULES[@]}"
Makoto Onuki8558e9a2023-08-31 10:48:38 -070037
Makoto Onukia0d4c582023-11-08 16:11:35 -080038# Run the hoststubgen unittests / etc
Makoto Onuki0622dd12023-11-30 16:03:25 -080039run atest $ATEST_ARGS hoststubgentest hoststubgen-invoke-test
Makoto Onukia0d4c582023-11-08 16:11:35 -080040
Makoto Onuki8558e9a2023-08-31 10:48:38 -070041# Next, run the golden check. This should always pass too.
42# The following scripts _should_ pass too, but they depend on the internal paths to soong generated
43# files, and they may fail when something changes in the build system.
44run ./hoststubgen/test-tiny-framework/diff-and-update-golden.sh
45
46run ./hoststubgen/test-framework/run-test-without-atest.sh
Makoto Onuki3aefe332023-10-06 10:02:07 -070047
Makoto Onuki21d4b3d2023-10-13 12:04:29 -070048run ./hoststubgen/test-tiny-framework/run-test-manually.sh
Makoto Onuki0622dd12023-11-30 16:03:25 -080049run atest $ATEST_ARGS tiny-framework-dump-test
Makoto Onuki8558e9a2023-08-31 10:48:38 -070050run ./scripts/build-framework-hostside-jars-and-extract.sh
51
52# This script is already broken on goog/master
53# run ./scripts/build-framework-hostside-jars-without-genrules.sh
54
55# These tests should all pass.
Makoto Onuki0622dd12023-11-30 16:03:25 -080056run atest $ATEST_ARGS ${READY_TEST_MODULES[*]}
Makoto Onukicedc08b2023-11-10 10:55:13 -080057
Makoto Onuki1a00cae2023-11-29 14:27:31 -080058echo ""${0##*/}" finished, with no failures. Ready to submit!"