Skip to content
Snippets Groups Projects
  • Alexey Vilenski's avatar
    2e794c2b
    testing: add TB.Setenv · 2e794c2b
    Alexey Vilenski authored
    Add a new method TB.Setenv that'll set environment variables
    only for the isolated lifetime of the test, and will clean up
    and unset these variables when the test ends.
    This method disables the test or benchmark from running in
    parallel.
    
    Fixes #41260
    
    Change-Id: I0a18f094ec1c6ec3157b4b12993ea3075e2e9867
    GitHub-Last-Rev: 0ca12fa565318f350b927e2ef94f3b4f792c75c2
    GitHub-Pull-Request: golang/go#41857
    Reviewed-on: https://go-review.googlesource.com/c/go/+/260577
    
    
    Trust: Daniel Martí <mvdan@mvdan.cc>
    Trust: Emmanuel Odeke <emmanuel@orijtech.com>
    Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: default avatarroger peppe <rogpeppe@gmail.com>
    2e794c2b
    History
    testing: add TB.Setenv
    Alexey Vilenski authored
    Add a new method TB.Setenv that'll set environment variables
    only for the isolated lifetime of the test, and will clean up
    and unset these variables when the test ends.
    This method disables the test or benchmark from running in
    parallel.
    
    Fixes #41260
    
    Change-Id: I0a18f094ec1c6ec3157b4b12993ea3075e2e9867
    GitHub-Last-Rev: 0ca12fa565318f350b927e2ef94f3b4f792c75c2
    GitHub-Pull-Request: golang/go#41857
    Reviewed-on: https://go-review.googlesource.com/c/go/+/260577
    
    
    Trust: Daniel Martí <mvdan@mvdan.cc>
    Trust: Emmanuel Odeke <emmanuel@orijtech.com>
    Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: default avatarroger peppe <rogpeppe@gmail.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.