| Makoto Onuki | 8558e9a | 2023-08-31 10:48:38 -0700 | [diff] [blame] | 1 | #!/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 | |
| 16 | source "${0%/*}"/../common.sh |
| 17 | |
| 18 | # Move to the top directory of hoststubgen |
| 19 | cd .. |
| 20 | |
| Makoto Onuki | 0622dd1 | 2023-11-30 16:03:25 -0800 | [diff] [blame] | 21 | ATEST_ARGS="--host" |
| 22 | |
| Makoto Onuki | 8558e9a | 2023-08-31 10:48:38 -0700 | [diff] [blame] | 23 | # These tests are known to pass. |
| 24 | READY_TEST_MODULES=( |
| 25 | HostStubGenTest-framework-all-test-host-test |
| 26 | hoststubgen-test-tiny-test |
| Makoto Onuki | c8a04dc | 2023-11-21 09:52:24 -0800 | [diff] [blame] | 27 | CtsUtilTestCasesRavenwood |
| Makoto Onuki | 39d2c72 | 2023-12-04 08:44:26 -0800 | [diff] [blame] | 28 | CtsOsTestCasesRavenwood # This one uses native sustitution, so let's run it too. |
| Makoto Onuki | 8558e9a | 2023-08-31 10:48:38 -0700 | [diff] [blame] | 29 | ) |
| 30 | |
| Makoto Onuki | c69a84e | 2023-10-20 10:43:55 -0700 | [diff] [blame] | 31 | MUST_BUILD_MODULES=( |
| Makoto Onuki | c69a84e | 2023-10-20 10:43:55 -0700 | [diff] [blame] | 32 | "${NOT_READY_TEST_MODULES[*]}" |
| 33 | HostStubGenTest-framework-test |
| 34 | ) |
| 35 | |
| 36 | # First, build all the test / etc modules. This shouldn't fail. |
| 37 | run m "${MUST_BUILD_MODULES[@]}" |
| Makoto Onuki | 8558e9a | 2023-08-31 10:48:38 -0700 | [diff] [blame] | 38 | |
| Makoto Onuki | a0d4c58 | 2023-11-08 16:11:35 -0800 | [diff] [blame] | 39 | # Run the hoststubgen unittests / etc |
| Makoto Onuki | 0622dd1 | 2023-11-30 16:03:25 -0800 | [diff] [blame] | 40 | run atest $ATEST_ARGS hoststubgentest hoststubgen-invoke-test |
| Makoto Onuki | a0d4c58 | 2023-11-08 16:11:35 -0800 | [diff] [blame] | 41 | |
| Makoto Onuki | 8558e9a | 2023-08-31 10:48:38 -0700 | [diff] [blame] | 42 | # Next, run the golden check. This should always pass too. |
| 43 | # The following scripts _should_ pass too, but they depend on the internal paths to soong generated |
| 44 | # files, and they may fail when something changes in the build system. |
| 45 | run ./hoststubgen/test-tiny-framework/diff-and-update-golden.sh |
| 46 | |
| 47 | run ./hoststubgen/test-framework/run-test-without-atest.sh |
| Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 48 | |
| Makoto Onuki | 21d4b3d | 2023-10-13 12:04:29 -0700 | [diff] [blame] | 49 | run ./hoststubgen/test-tiny-framework/run-test-manually.sh |
| Makoto Onuki | 0622dd1 | 2023-11-30 16:03:25 -0800 | [diff] [blame] | 50 | run atest $ATEST_ARGS tiny-framework-dump-test |
| Makoto Onuki | 8558e9a | 2023-08-31 10:48:38 -0700 | [diff] [blame] | 51 | run ./scripts/build-framework-hostside-jars-and-extract.sh |
| 52 | |
| 53 | # This script is already broken on goog/master |
| 54 | # run ./scripts/build-framework-hostside-jars-without-genrules.sh |
| 55 | |
| 56 | # These tests should all pass. |
| Makoto Onuki | 0622dd1 | 2023-11-30 16:03:25 -0800 | [diff] [blame] | 57 | run atest $ATEST_ARGS ${READY_TEST_MODULES[*]} |
| Makoto Onuki | cedc08b | 2023-11-10 10:55:13 -0800 | [diff] [blame] | 58 | |
| Makoto Onuki | 39d2c72 | 2023-12-04 08:44:26 -0800 | [diff] [blame] | 59 | echo ""${0##*/}" finished, with no failures. Ready to submit!" |