Skip to content

proposal: testing: set an environment variable to indicate we're in a test #66122

@matloob

Description

@matloob

Proposal Details

This proposal is to have the testing package set a new GO_TESTING environment variable, perhaps for the duration of testing.(*M).Run, to indicate that it's running a test. This would allow subprocesses started by the test to know that they're running as part of a test.

This is useful so that the Go toolchain could suppress telemetry when it's invoked by a test to avoid contaminating users' telemetry data.

@bcmills @adonovan @findleyr

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions