platform_build_soong/cmd
Paul Duffin 3f7bf9fa0d Allow namespace config to be tested properly
Previously, the NewTextContext created a context that always called
NewNameResolver with a export filter that always returned true.

This change fixes that by:
1. Changing NewNameResolver to take a Config parameter instead of a
   filter parameter and pushing the code to create the filter from the
   Config from newNameResolver() in cmd/soong_build/main.go into the
   NewNameResolver function.

2. Extracting a newTestContextForFixture that does not create a
   NameResolver or set it on the context. That avoids creating a
   NameResolver before the test has prepared the config.

3. Modify the fixture to create and set the NameResolver in the Context
   after the config has been prepared by the test.

4. Added test to verify that it all works.

Bug: 234825639
Test: m nothing
Change-Id: Ie4b13f18093dc01a0ab65a9ecfd143585d843b55
2022-11-08 17:38:56 +00:00
..
dep_fixer Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
diff_target_files Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
extract_apks cherrypick of ag/20211286 2022-10-20 17:02:42 +00:00
extract_jar_packages Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
extract_linker Fix adding /DISCARD/ to linker script 2022-02-25 18:25:45 -08:00
fileslist Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
go2bp If invoked 'go list' command fails, show its stderr. 2022-04-19 11:32:28 -07:00
host_bionic_verify Stop injecting symbols into host bionic binaries 2021-06-11 15:22:41 -07:00
javac_wrapper Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
merge_zips Move response file handling to a separate package 2021-03-25 11:06:45 -07:00
multiproduct_kati Add bazelMode arguments to multiproduct_kati. 2022-10-27 21:24:13 +00:00
path_interposer Add comments for path_interposer. 2022-05-06 12:42:05 +02:00
pom2bp Add support for pom with packaging=apk to pom2bp. 2022-10-12 12:12:02 -07:00
pom2mk Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00
run_with_timeout Increase timeouts in Test_runWithTimeout 2021-09-17 21:36:29 +00:00
sbox Reformat build/soong for go 1.19 2022-08-17 10:43:13 -07:00
soong_build Allow namespace config to be tested properly 2022-11-08 17:38:56 +00:00
soong_ui Add non-zero exit + error message to soong metrics 2022-10-24 10:51:56 -04:00
symbols_map symbols_map: allow unexpected EOF in ELF files 2022-04-12 21:18:09 +00:00
zip2zip Add zip2zip alias and allowlist unblocked rdeps. 2022-09-23 02:29:02 +00:00
zipsync Add LOCAL_LICENSE_KINDS to build/soong 2021-02-06 04:23:21 +00:00