summaryrefslogtreecommitdiff
path: root/sdk/exports_test.go
AgeCommit message (Collapse)Author
2025-02-06Add t.Parallel() to SDK tests Colin Cross
Reduces time to run go test ./sdk from 44 seconds to 22.5 seconds. Requires moving snapshotTestCustomizations from a map to a struct with individual fields to avoid concurrent map accesses between subtests. Test: go test ./sdk Change-Id: Id6f451ba9cbace8bc7ea915033a795456b85cf3f
2024-03-20Add an apex_contributions_defaults module to module sdk Spandan Das
This metadata module will contain a flattened list of all the soong modules contributed by this module to the rest of the build. This is supported in V and above. Bug: 326246905 Test: m art-module-host-exports Test: unzip -p out/soong/mainline-sdks/art-module-host-exports-current.zip Android.bp | grep -A 15 apex_contributions_defaults apex_contributions_defaults { name: "art-module-host-exports.contributions", contents: [ "prebuilt_art.module.api.annotations", "prebuilt_dex2oat", "prebuilt_dex2oatd", "prebuilt_dexdump", "prebuilt_hiddenapi", "prebuilt_oatdump", "prebuilt_profman", "prebuilt_veridex", "prebuilt_libartpalette", "prebuilt_libartbase", ], } Change-Id: Iba43a9da5430adfc0a5fd9b5dc27b5d89c5eacb8
2022-05-24Remove support for generating versioned snapshots Paul Duffin
Previously, the code for selecting specific versions of sdk snapshots was removed (along with the uses_sdks property). That makes versioned snapshots useless so this change removes all the code and tests that generated those versioned snapshots. Bug: 232546567 Test: m nothing packages/modules/common/build/mainline_modules_sdks.sh Change-Id: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
2021-04-16Migrate sdk tests away from checkAndroidBpContents Paul Duffin
Replaces a single call to checkAndroidBpContents(...) with separate calls to check the versioned and unversioned Android.bp files. Test: m nothing Bug: 179354495 Change-Id: I270bf73909958d97b2f298e8d7f6d10a1f75ae71
2021-03-13Stop sdk package depending on testing.T being embedded in TestResult Paul Duffin
This change is in preparation for removing testing.T from TestResult. Bug: 181070625 Test: m nothing Change-Id: I67535aff0d894e6e3d8456b75540f340af853355
2021-03-11Switch CheckSnapshot from a testSdkResult method to a function Paul Duffin
This will allow the testSdkResult to be replaced with the TestResult when switching sdk package to use test fixtures. Bug: 181070625 Test: m nothing Change-Id: Ieca63f4c189f5e804102aeb4073289ea03143b6e
2020-11-04Always set apex_available in SDK snapshots. Martin Stjernholm
Also fix //apex_available:platform that could get lost in the generated apex_available properties. It only happened if a module didn't specify an apex_available setting and then got extra entries from apex.BaselineApexAvailable. Test: Build ART SDK with libnativeloader_lazy in the SDK, and check that the generated prebuilt module has //apex_available:platform (before https://r.android.com/1480559). Change-Id: I9df20aee63455932a7e558993f0f26769cb02792
2020-10-09Revert "Make lots of tests run in parallel" Colin Cross
This reverts commit 323dc60712491c71ccdc5363c42df61f0a192487. Reason for revert: Possible cause of test instability Bug: 170513220 Test: soong tests Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-06Make lots of tests run in parallel Colin Cross
Putting t.Parallel() in each test makes them run in parallel. Additional t.Parallel() could be added to each subtest, although that requires making a local copy of the loop variable for table driven tests. Test: m checkbuild Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
2020-10-01Explicitly specify visibility in sdk/module_exports snapshot Paul Duffin
This change ensures that each prebuilt in a snapshot explicitly specifies its visibility even when that visibility is the current default. This is done for two reasons: 1. It simplifies a follow up change that adds visibility rules to an existing set of rules. 2. It ensures that the snapshots are independent of the current Soong default visibility. The latter is important because we intend to switch from modules being visible to everyone by default (i.e. //visibility:public) to only being visible to modules in the same package (i.e. //visibility:private). By making the snapshots of modules that do not specify any visibility explicitly specify that they are "//visibility:public" it ensures that the snapshots will not need to be changed when the default changes. Bug: 168301990 Test: m nothing Change-Id: Ia034f4a1e5124c17f46d73b0e9a6c5f2a251038e
2020-03-02Add CommonOS variant for sdk Paul Duffin
Adds a CommonOS variant for sdk that depends on the os specific variants and is used to generate a single sdk for multiple OsTypes, e.g. host linux and android. At the minute the member types only support a single OsType but the basic mechanism for managing the CommonOS variant and collating the variants across all of them is there. The only visible effect of this change is that the location of the generated snapshot is changed, it is no longer os specific and instead is in the same location irrespective of which os it is built for. A lot of tests needed to be changed to specify "common_os" as the variant type instead of the specific os type. As that is the same across all tests it is hard coded in CheckSnapshot method. Test: m nothing Bug: 150451422 Change-Id: If36be39b06d6910453649f7c288c2d34f688b2f4
2019-12-30Added module_exports/_snapshot as alias for sdk/_snapshot Paul Duffin
Bug: 146341462 Test: m nothing Change-Id: I27e1ef494a2b0874074aa43614612189b17e7860