Repository navigation
Add more integration tests #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Scenarios for custom lint checks embedded in AAR dependencies (lint.jar), exercising the | ||
| # collect_aar_outputs_aspect extraction and auto-discovery path. Requires ANDROID_HOME. | ||
|
|
||
| # --- begin runfiles.bash initialization v2 --- | ||
| # Copy-pasted from the Bazel Bash runfiles library v2. | ||
| set -uo pipefail; f=bazel_tools/tools/bash/runfiles/runfiles.bash | ||
| source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ | ||
| source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \ | ||
| source "$0.runfiles/$f" 2>/dev/null || \ | ||
| source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ | ||
| source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ | ||
| { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e | ||
| # --- end runfiles.bash initialization v2 --- | ||
|
|
||
| source "$(rlocation rules_android_lint/tests/bashunit/unittest.bash)" || \ | ||
| (echo >&2 "Failed to locate unittest.bash" && exit 1) | ||
|
|
||
| source "$(rlocation rules_android_lint/tests/scripts/lint_helper.sh)" || \ | ||
| (echo >&2 "Failed to locate lint_helper.sh" && exit 1) | ||
|
|
||
| function set_up() { | ||
| rm -rf -- * .bazelrc 2>/dev/null || true | ||
| set_up_lint_workspace | ||
| enable_android_in_workspace | ||
| } | ||
|
|
||
| function test_aar_embedded_lint_jar_flags_issue() { | ||
| write_composable_annotation_stub | ||
| write_dirty_composable | ||
| write_fixture_aar | ||
| write_aar_dep_lint_targets | ||
|
|
||
| "${BIT_BAZEL_BINARY}" test --test_output=all //:lib_lint_test >& "$TEST_log" \ | ||
| && fail "Expected lint test with AAR-embedded checks to fail" || true | ||
| expect_log "ComposeNamingUppercase" | ||
| } | ||
|
|
||
| function test_aar_embedded_lint_jar_accepts_clean_composable() { | ||
| write_composable_annotation_stub | ||
| write_clean_composable | ||
| write_fixture_aar | ||
| write_aar_dep_lint_targets | ||
|
|
||
| "${BIT_BAZEL_BINARY}" test --test_output=all //:lib_lint_test >& "$TEST_log" \ | ||
| || fail "Expected lint test with AAR-embedded checks to pass" | ||
| } | ||
|
|
||
| run_suite "android_lint AAR lint.jar discovery scenarios" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an actual bug