Skip to content

--test_arg broken in go_bazel_test #2223

@jmhodges

Description

@jmhodges

What version of rules_go are you using?

HEAD. This is in the main repo.

What version of gazelle are you using?

The one in rules_go's WORKSPACE.

What version of Bazel are you using?

0.29.1

If you try to pass a test argument to the go test inside of go_bazel_test, you'll get strange failures.

For instance, on that gopackagesdriver branch I've been committing on, I can run:

bazel test //tests/core/gopackages:gopackages_test --test_output=all --test_arg='-v'

and the output will include this error message:

==================== Test output for //tests/core/gopackages:gopackages_test:
error: unexpected file: -v
panic: runtime error: invalid memory address or nil pointer dereference
================================================================================

and the target will have failed immediately.

Similar happens when I pass in --test_arg='-test.v' if the flagset stuff is important (the file name mentioned is, of course, -test.v).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions