Commit graph

12 commits

Author SHA1 Message Date
Alix
141ab6adde use message in android.AssertStringMatches()
function does not currently use the message argument  passed to it.
outputting this as part of the error message would be helpful for any
failures.

Change-Id: I5307df1567e79d85f81edd5a9eb3d4a093041535
2023-10-04 20:19:54 +00:00
Joe Onorato
175073c472 Make aconfig flags generate a library instead of a srcjar.
Also add unit tests for the rest of device_config

Bug: 283475679
Test: m nothing (soong unit tests)
Change-Id: Iee18a1f2f2cbb23e8c8d84c54e903b32be29a693
2023-06-09 06:16:06 -07:00
Sam Delmerico
b1daccdc97 ensure that privapp_allowlist is installed before android_app
AndroidMk assumes that the app is the last file installed, and it uses
this assumption to populate the LOCAL_SOONG_INSTALLED_MODULE entry. This
CL moves the privapp_allowlist installation to before the app
installation to respect this assumption.

Bug: 242509786
Test: go test
Test: OUT_DIR=out.ref m nothing &&
  cp aosp/2562351 && OUT_DIR=out.change m nothing &&
  GOWORK=$PWD/build/bazel/mkcompare/go.work \
  go run android/bazel/mkcompare/cmd -json \
  <(sed -e "s/out\.ref/out/g" out.ref/soong/Android-aosp_cheetah.mk) \
  <(sed -e "s/out\.change/out/g" out.change/soong/Android-aosp_cheetah.mk)
  && verify manually that the only diffs are related to the removal of
  the prebuilt_etc module.
Change-Id: I95ec27070f575e79fb976de68493a219717ed89a
2023-05-25 18:54:06 +00:00
Jooyung Han
4973d45d06 Add t.helper() to AssertStringListContainsEquals
Bug: n/a
Test: m nothing
Change-Id: I49d87ac75edbc4856eb5a178c9085134a4185487
2023-03-23 14:22:46 +09:00
Lukacs T. Berki
9f6c24a887 Rename BuildDir and NinjaBuildDir.
These are just out/ and out/soong/ and the old names were quite
confusing.

Test: Presubmits.
Merged-In: I999ca62162062f27e449f83ffb00fa580d4065b8
Merged-In: I2fcd80a9e376a6842a06aa104a9f6f5c5e16f8c7
Change-Id: Ib481d2aac40df8da1b74174dc8ec576c1cb48be0
2021-08-27 10:08:49 +02:00
Anton Hansson
dae54cd84f Add new stub_only_static_libs attr for sdk_library
Allow java_sdk_libraries to include libraries statically into their
stubs. The immediate use-case of this is to embed libcore notice files
into their stubs.

Also extend the java_sdk_library tests for impl/stub-only-libs, plus
some not assert utils.

Bug: 173186484
Bug: 184839599
Test: soong tests
Change-Id: I1ebf2f35c048eab5cec5125482a0304fe660f188
2021-04-22 10:20:13 +01:00
Paul Duffin
9f4b3bbb7c Replace AssertPanic with AssertPanicMessageContains
Bug: 182885307
Test: m nothing
Change-Id: Idffa314285c90080796cc3df391de9c314eaa422
2021-03-20 12:08:51 +00:00
Paul Duffin
c14e8aa6a8 Merge "Add AssertSame" 2021-03-18 08:56:21 +00:00
Paul Duffin
64d371896e Add AssertIntEquals
Bug: 182402754
Test: m nothing
Change-Id: Ifed5cd656b6ad72ef59f9a5fadb10add5807c015
2021-03-17 17:55:00 +00:00
Paul Duffin
3d11961d43 Add AssertSame
Bug: 182885307
Test: m nothing
Change-Id: I9af030ae9cd3fcfd3442af82c5fcba60aec80861
2021-03-17 16:18:17 +00:00
Paul Duffin
567465da8c Add (String)Path(s)RelativeToTop and assert functions
The existing NormalizePathForTesting function does not handle make
install paths very well, as it returns a relative path with a leading
"../" which is very confusing. It also does not clearly differentiate
between the different paths.

These functions return paths that are basically what are seen in a
normal developer build, i.e.
* <source path>
* out/soong/<soong output path>
* out/<make output path>

That makes tests that use them easier to understand.

Follow up changes will clean up the existing usages of the
Normalize... functions.

Bug: 182885307
Test: m nothing
Change-Id: I17ddc996bef5bbbf4a62da8334ea6ce29e306109
2021-03-16 12:23:56 +00:00
Paul Duffin
9dcf253197 Add new function Assert methods
Bug: 181070625
Test: m nothing
Change-Id: If7977493d4f7380e746df1b9b8b4cb13c39abeac
2021-03-12 14:25:33 +00:00