Spandan Das | c32e046 | 2024-11-05 17:55:39 +0000 | [diff] [blame] | 1 | // Copyright 2024 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package android |
| 16 | |
| 17 | import ( |
| 18 | "testing" |
| 19 | ) |
| 20 | |
| 21 | func TestPropFileInputs(t *testing.T) { |
| 22 | bp := ` |
| 23 | build_prop { |
| 24 | name: "vendor-build.prop", |
| 25 | stem: "build.prop", |
| 26 | vendor: true, |
| 27 | android_info: ":board-info", |
| 28 | //product_config: ":product_config", |
| 29 | } |
| 30 | android_info { |
| 31 | name: "board-info", |
| 32 | stem: "android-info.txt", |
| 33 | } |
| 34 | ` |
| 35 | |
| 36 | res := GroupFixturePreparers( |
| 37 | FixtureRegisterWithContext(registerBuildPropComponents), |
| 38 | ).RunTestWithBp(t, bp) |
| 39 | buildPropCmd := res.ModuleForTests("vendor-build.prop", "").Rule("vendor-build.prop_.vendor-build.prop").RuleParams.Command |
| 40 | AssertStringDoesContain(t, "Could not find android-info in prop files of vendor build.prop", buildPropCmd, "--prop-files=out/soong/.intermediates/board-info/android-info.prop") |
| 41 | } |