aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-29Snap for 10878163 from d605057434dcabba796c020773aab68d9790ff9f to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android-14.0.0_r28android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-releaseAndroid Build Coastguard Worker
Change-Id: I5432c013e363b410651db122ce34f909f023d8bf
2023-09-28Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 20475333ee ↵HEADmastermainRomain Jobredeaux
am: 36c23a4a19 am: adb5cee483 am: a40e5383d6 am: 55848a95b2 Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2758210 Change-Id: Iaae49adb2c0655431630825fc21f8b676b73cc64 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 20475333ee ↵Romain Jobredeaux
am: 36c23a4a19 am: adb5cee483 am: a40e5383d6 Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2758210 Change-Id: Ic125623241536b66e797a7ae46d86078031a79e5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 20475333ee ↵Romain Jobredeaux
am: 36c23a4a19 am: adb5cee483 Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2758210 Change-Id: Ia14a3bc43c3dbb6e74f2c5090c157dd2b54a69be Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 20475333ee ↵Romain Jobredeaux
am: 36c23a4a19 Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2758210 Change-Id: I62a65f13399337378df4cc6e3d741eb5ef6087ef Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: 20475333eeRomain Jobredeaux
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2758210 Change-Id: Ib90cdb479bfccb41ac47f6e7438cec536f8afae8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-22Merge remote-tracking branch 'aosp/upstream-master' into HEADRomain Jobredeaux
* aosp/upstream-master: Fix spelling feat: Add DefaultInfoSubject docs: add human-friendly changelog feat: Add StructSubject feat: Allow setting common rule attributes for analysis tests feat: add CollectionSubject.transform feat: add DictSubject.get feat: add file_basename_equals, file_extension_in matchers feat: publically expose the rest of the subjects docs: link to readthedocs instead of docs directory in readme feat: Add CollectionSubject.offset feat: Support unit test (non-analysis test) types of tests in rules_testing cleanup: Delete unused utils.bzl cleanup: Upgrade to stardoc 0.5.6 and enable bzlmod for building docs cleanup: upgrade to rules_python 0.22.0 Add default_applicable_licenses to lib package. Change-Id: Iaca64c0f3dfbab9dbbedc2fcab1f958aff7f6a0e
2023-08-22Merge pull request #68 from Vertexwahn:fix-spellingBlaze Rules Copybara
PiperOrigin-RevId: 559025210
2023-08-20Fix spellingVertexwahn
2023-07-11Merge pull request #62 from rickeylev:default.info.subjectBlaze Rules Copybara
PiperOrigin-RevId: 547207066
2023-07-10feat: Add DefaultInfoSubjectRichard Levasseur
This is a subject for the `DefaultInfo` provider. Normally accessing its information is done through TargetSubject, however, if an object has a direct reference to DefaultInfo instance, then there isn't a target directly associated with it. Such a situation can occur when using toolchain info forwarding rules (e.g. :current_foo_toolchain). Fixes https://github.com/bazelbuild/rules_testing/issues/52
2023-07-10Merge pull request #61 from rickeylev:struct.subjectBlaze Rules Copybara
PiperOrigin-RevId: 546947647
2023-07-10docs: add human-friendly changelogRichard Levasseur
This adds a changelog in keepachanglog.com-style format so that it's easier to see what features and changes are present in a release. The log only goes back to 0.0.5, since that's the first real release -- one that wasn't part of testing of releases and cleanup as part of initial releasing. PiperOrigin-RevId: 546784896
2023-07-07feat: Add StructSubjectRichard Levasseur
StructSubject is a subject to wrap structs and return their values as other subjects. This makes it easier to test ad-hoc struct values, such as ones returned by helper functions, because a dedicated subject implementation doesn't need to be written. All that needs to be provided are the attribute names and factory functions to handle them. Fixes https://github.com/bazelbuild/rules_testing/issues/53
2023-07-07Merge pull request #55 from rickeylev:common.attrsBlaze Rules Copybara
PiperOrigin-RevId: 546406547
2023-07-07feat: Allow setting common rule attributes for analysis testsRichard Levasseur
This allows setting common rule attributes such as tags, visibility, target_compatible_with, etc. Before this change, this was only possibly by manually invoking the underlying `testing.analysis_test()` rule to pass the `attr_values` arg. After this change, it is possible to do the equivalent by directly passing the corresponding attribute by name instead of nesting it within `attr_values`. This allows setting several useful attributes, such as tags, target_compatible_with, etc. Fixes #43
2023-07-06Merge pull request #58 from rickeylev:transformBlaze Rules Copybara
PiperOrigin-RevId: 546048463
2023-07-06Merge pull request #59 from rickeylev:dict.getBlaze Rules Copybara
PiperOrigin-RevId: 546040187
2023-07-06Merge pull request #57 from rickeylev:more.matchersBlaze Rules Copybara
PiperOrigin-RevId: 546032568
2023-07-06Merge pull request #56 from rickeylev:expose.subjectsBlaze Rules Copybara
PiperOrigin-RevId: 546032520
2023-07-05feat: add CollectionSubject.transformRichard Levasseur
This adds a generic method to perform arbitrary transformations on the collection's value. When performing a transformation, a human friendly description of the transformation is required. When possible, a description is inferred from the args. Fixes #45
2023-07-03feat: add DictSubject.getRichard Levasseur
This makes it easier to perform checks on keys/values within dicts when different asserts may be required depending on the key. Fixes #51
2023-07-03feat: add file_basename_equals, file_extension_in matchersRichard Levasseur
These come from some of experience from porting the cc rules to use rules_testing * Also moves the matcher tests into their own file because the truth_tests.bzl file is getting large. * Also switches the matcher tests to be basic tests, since they don't really require a target graph to be setup. Fixed #44
2023-07-03feat: publically expose the rest of the subjectsRichard Levasseur
This allows using them directly with arbitrary values without having to go through the expect object. This is helpful for when the value is manually constructed and the metadata needs more direct customization. Fixes #54
2023-06-14docs: link to readthedocs instead of docs directory in readmeRichard Levasseur
The docs directory doesn't work anymore; readthedocs is where the user-facing docs are now at PiperOrigin-RevId: 540283201
2023-06-13feat: Add CollectionSubject.offsetRichard Levasseur
This is a relatively thin accessor. The main advantage over directly accessing the underlying value is the additional context information is propagated. The user must manually pass a `factory` arg to construct the wrapped value for two reasons: * A collection doesn't know the types of elements it contains. * CollectionSubject can't depend on StrSubject because it would cause a circular dependency (StrSubject.split requires CollectionSubject), and finding a solution for this looks non-trivial. A factory arg is necessary anyways to support custom subjects. Also exposes StrSubject as `subjects.str` (as done with several other subjects) Closes #41 PiperOrigin-RevId: 540009713
2023-06-12feat: Support unit test (non-analysis test) types of tests in rules_testingRichard Levasseur
This adds support to write tests of general Starlark code that doesn't require analysis phase information. While this was possible to do with enough work, it's a bit of boiler plate to do so. This moves that boiler plate into rules_testing, so that users just need to define their verification function. Also makes `test_suite` able to handle both basic tests (ones that are only an implementation function, like most unit tests) and regular tests (tests that require a loading-phase setup process, like analyss tests). Also creates a best practices doc. Some of the same advice pertains across test suite, unit test, and analysis test. Closes #37 PiperOrigin-RevId: 539743721
2023-06-12Merge pull request #40 from rickeylev:stardoc.bzlmodBlaze Rules Copybara
PiperOrigin-RevId: 539715930
2023-06-12cleanup: Delete unused utils.bzlRichard Levasseur
Public utility code is largely in util.bzl and utils.bzl is unused. PiperOrigin-RevId: 539567048
2023-06-12Merge pull request #39 from rickeylev:rules.python.22Blaze Rules Copybara
PiperOrigin-RevId: 539566632
2023-06-10cleanup: Upgrade to stardoc 0.5.6 and enable bzlmod for building docsRichard Levasseur
The latest version of stardoc supports bzlmod, which makes developing much nicer than using workspace.
2023-06-10cleanup: upgrade to rules_python 0.22.0Richard Levasseur
This is to get the fix that allows configuring pip to use the same version of Python as the rules use.
2023-06-06Add default_applicable_licenses to lib package.Richard Levasseur
This is to satisfy some license compliance policies within Google. PiperOrigin-RevId: 538251455
2023-05-11add METADATA file am: b026ecd62b am: 26b2b7ccf4 am: 08bca01f9a am: ↵Sam Delmerico
af990cca49 am: 79e5caf442 am: e94020ad4c Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583100 Change-Id: I66be8e6bd3e6e6bfd6c5c2dabaec7fc41f32a793 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: df3fbff25a ↵Sam Delmerico
am: 57c3a0ddaf am: 7039a2c0d8 am: a7db178f60 am: afb82132fd am: 08d401c119 Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583095 Change-Id: I66adcaca5c1279078987296d893107662bc4070c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11add METADATA file am: b026ecd62b am: 26b2b7ccf4 am: 08bca01f9a am: ↵Sam Delmerico
af990cca49 am: 79e5caf442 Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583100 Change-Id: I24c3f5963c1aa3f30b6c0e23744c34ebafbb7b61 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11add METADATA file am: b026ecd62b am: 26b2b7ccf4 am: 08bca01f9a am: af990cca49Sam Delmerico
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583100 Change-Id: I6fb7a7ae46494a8862505351b327d3a0997a4983 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: df3fbff25a ↵Sam Delmerico
am: 57c3a0ddaf am: 7039a2c0d8 am: a7db178f60 am: afb82132fd Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583095 Change-Id: I6e3e91337a80b7f1e175f90122a0c682f13528f0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10add METADATA file am: b026ecd62b am: 26b2b7ccf4 am: 08bca01f9aSam Delmerico
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583100 Change-Id: I0d5270d6b6564826996ba49fd576d0d1b4312a85 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10add METADATA file am: b026ecd62b am: 26b2b7ccf4Sam Delmerico
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583100 Change-Id: I89c3abb6828ce5607628eedc342580ea7e512a83 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: df3fbff25a ↵Sam Delmerico
am: 57c3a0ddaf am: 7039a2c0d8 am: a7db178f60 Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583095 Change-Id: Ib88add388944a20693089974a48f7b24685e64a8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10add METADATA file am: b026ecd62bSam Delmerico
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583100 Change-Id: I220efcd913ada86a30a0cd010e097b2218f6085d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: df3fbff25a ↵Sam Delmerico
am: 57c3a0ddaf am: 7039a2c0d8 Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583095 Change-Id: I3d5d7227f446619b27a0afec29c0682bdf5d9bd5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10add METADATA fileSam Delmerico
Change-Id: I97d34445413da3c6df120b10a901108da6b07492
2023-05-10Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: df3fbff25a ↵Sam Delmerico
am: 57c3a0ddaf Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583095 Change-Id: I920a504688dd0d68cae184953f838681dc4ec677 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10Merge remote-tracking branch 'aosp/upstream-master' into HEAD am: df3fbff25aSam Delmerico
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_testing/+/2583095 Change-Id: I33d830cb15bfc965a5fca1a5eae206e502af14b6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10Merge remote-tracking branch 'aosp/upstream-master' into HEADSam Delmerico
Change-Id: I6499409d2887d4993c8920c613d6517df14c74c1
2023-05-08Initial empty repositorymain-16kInna Palant
2023-05-02Merge pull request #34 from rickeylev:fix.register.toolchainsBlaze Rules Copybara
PiperOrigin-RevId: 528847773
2023-05-02docs: mention that Label() should be used for config_setting labelsRichard Levasseur
This is to help users understand why they might get hard to understand errors when they pass labels in, and how they can fix it. PiperOrigin-RevId: 528836275