Files
build_soong/java/platform_compat_config_test.go
Colin Cross 844cb6a664 Add t.Parallel() to java tests
Speeds up go test ./java from 32 seconds to 9 seconds.

Test: go test ./java
Change-Id: I4c6640e787c0744c6dfda03b7382839b452e24cf
2025-01-31 11:31:24 -08:00

46 lines
1.2 KiB
Go

// Copyright 2021 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package java
import (
"testing"
"android/soong/android"
)
func TestPlatformCompatConfig(t *testing.T) {
t.Parallel()
result := android.GroupFixturePreparers(
PrepareForTestWithPlatformCompatConfig,
android.FixtureWithRootAndroidBp(`
platform_compat_config {
name: "myconfig2",
include_in_merged_xml: false,
}
platform_compat_config {
name: "myconfig1",
}
platform_compat_config {
name: "myconfig3",
}
`),
).RunTest(t)
CheckMergedCompatConfigInputs(t, result, "myconfig",
"out/soong/.intermediates/myconfig1/myconfig1_meta.xml",
"out/soong/.intermediates/myconfig3/myconfig3_meta.xml",
)
}