go/src/testing
sivchari 5d29578fd5 testing: add TB.SetGOMAXPROCS function
Add a new method TB.SetGOMAXPROCS which sets variable of GOMAXPROCS.
This method aims to set a variable for the isolated lifetime of the test and cleans up.
And unset this when the test ends.
This method disables the test or benchmark from running in
parallel.

Fixes: #62020

Change-Id: Iae44109d0def35cc47049c3ca4cd5306173d52ee
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/519235
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-03-21 20:26:36 +00:00
..
fstest testing/fstest: return base name from mapfs FileInfo.Name 2024-02-20 14:59:55 +00:00
internal/testdeps testing: add available godoc link 2023-11-08 17:55:47 +00:00
iotest testing: add available godoc link 2023-11-08 17:55:47 +00:00
quick testing: add available godoc link 2023-11-08 17:55:47 +00:00
slogtest testing: add available godoc link 2023-11-08 17:55:47 +00:00
allocs.go
allocs_test.go
benchmark.go Revert "testing: simplify concurrency and cleanup logic" 2023-11-27 16:49:24 +00:00
benchmark_test.go
cover.go
example.go testing: enforce -skip in example tests 2023-07-21 21:37:46 +00:00
export_test.go
flag_test.go all: use ^TestName$ regular pattern for invoking a single test 2023-09-05 23:35:29 +00:00
fuzz.go testing: fix typo in comment 2024-02-28 20:32:54 +00:00
helper_test.go testing: use subprocesses in TestTBHelper and TestTBHelperParallel 2023-11-21 17:24:47 +00:00
helperfuncs_test.go testing: use subprocesses in TestTBHelper and TestTBHelperParallel 2023-11-21 17:24:47 +00:00
match.go all: use built-in clear to clear maps 2023-07-27 22:07:13 +00:00
match_test.go
newcover.go
panic_test.go Revert "testing: simplify concurrency and cleanup logic" 2023-11-27 16:49:24 +00:00
run_example.go
run_example_wasm.go
sub_test.go testing: add regression tests for reentrant calls to T.Run 2023-12-01 21:27:08 +00:00
testing.go testing: add TB.SetGOMAXPROCS function 2024-03-21 20:26:36 +00:00
testing_other.go
testing_test.go testing: add TB.SetGOMAXPROCS function 2024-03-21 20:26:36 +00:00
testing_windows.go