Skip to content
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

Fix corner cases in Bash runfiles library - automation testing #84

Closed
wants to merge 1 commit into from

Conversation

Pavank1992
Copy link
Collaborator

Due to tests not actually verifying the exit code of rlocation calls, a few special cases were not handled correctly. In particular, absolute paths still went through regular rlocation lookup and could fail there even after the absolute path had been printed to stdout.

Also adds a missing newline in the (very rare) case that a manifest entry is found, but doesn't point to an existing file (e.g. if it is an unresolved symlink), and rlocation is not used with command substitution, but some other mechanism that doesn't strip trailing newlines.

The tests now assert the expected exit code (== 0 or != 0).

Fixes bazelbuild#16933

Due to tests not actually verifying the exit code of rlocation calls,
a few special cases were not handled correctly. In particular, absolute
paths still went through regular rlocation lookup and could fail there
even after the absolute path had been printed to stdout.

Also adds a missing newline in the (very rare) case that a manifest
entry is found, but doesn't point to an existing file (e.g. if it is an
unresolved symlink), and `rlocation` is not used with command
substitution, but some other mechanism that doesn't strip trailing
newlines.

The tests now assert the expected exit code (== 0 or != 0).

Fixes bazelbuild#16933
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants