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 unbound variable when printing an archive_contents_test failure message #2319

Merged

Conversation

jszumski
Copy link
Contributor

@jszumski jszumski commented Nov 3, 2023

In the "standalone binary" branch ARCHIVE_ROOT was not set, which causes an error when printing the failure message of an archive_contents_test:

test/starlark_tests/verifier_scripts/archive_contents_test.sh: line 103: ARCHIVE_ROOT: unbound variable
-- Test log: -----------------------------------------------------------
(Log file did not exist.)
------------------------------------------------------------------------
 FAILED: Archive did not contain "does not exist" contents were:
 .

The xcarchive tests fall into this branch, so you can reproduce by adding a bogus string to it's contains array:

    archive_contents_test(
        name = "{}_contains_xcarchive_files_simulator".format(name),
        build_type = "simulator",
        target_under_test = "//test/starlark_tests/targets_under_test/ios:app_minimal.xcarchive",
        contains = [
            "does not exist",
        ],
        tags = [name],
    )

@jszumski jszumski changed the title Fix unbound variable when printing a archive_contents_test failure message Fix unbound variable when printing an archive_contents_test failure message Nov 3, 2023
@luispadron luispadron merged commit d9c767a into bazelbuild:master Nov 3, 2023
1 check passed
@jszumski jszumski deleted the jszumski/fix-verification-unbound-var branch November 3, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants