Skip to content

Commit

Permalink
Make configured_query_test less sensitive to PyInfo details.
Browse files Browse the repository at this point in the history
This makes the test pass with the Starlark implementation enabled. This test
doesn't seem to really care what PyInfo state is, just that the provider is
found, so just check for that.

Work towards #15897

PiperOrigin-RevId: 481713979
Change-Id: I4c8e8d2b721a2ca2cc477e5e4151607534647732
  • Loading branch information
rickeylev authored and copybara-github committed Oct 17, 2022
1 parent ec3d03c commit 8c2f739
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/shell/integration/configured_query_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1221,14 +1221,14 @@ def format(target):
ret += '\n\tVisbilityProvider.label:' + str(vis_info.label)
py_info = p.get('PyInfo')
if py_info:
ret += '\n\tPyInfo:py3_only=' + str(py_info.has_py3_only_sources)
ret += '\n\tPyInfo found'
return ret
EOF
bazel cquery "//$pkg:pylib" --output=starlark --starlark:file="$pkg/outfunc.bzl" >output \
2>"$TEST_log" || fail "Expected success"

assert_contains "//$pkg:pylib:providers=.*PyInfo" output
assert_contains "PyInfo:py3_only=True" output
assert_contains "PyInfo found" output

# A file
bazel cquery "//$pkg:pylib.py" --output=starlark --starlark:file="$pkg/outfunc.bzl" >output \
Expand Down

0 comments on commit 8c2f739

Please sign in to comment.