diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-06-28 11:45:31 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-06-28 11:43:10 +0000 |
| commit | 62e12a69a0ef8fec1cc0648b1314428621f9a697 (patch) | |
| tree | c83853badaf8423f143e7fcae68fe6c21ff31c06 /pkg/runtest | |
| parent | 0ec2737332c407cb0ba0d78686d5d004a58ba570 (diff) | |
pkg/vminfo: make it possible to force coverage support
We need this in pkg/runtest since not all TestOS targets natively
support the coverage instrumentation.
We used to achieve this by starting the RPC server with Coverage=false
and then updating it to Coverage=true to suppress fallback the fallback
signal, but it's better to avoid such runtime config changes.
Diffstat (limited to 'pkg/runtest')
| -rw-r--r-- | pkg/runtest/run_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/runtest/run_test.go b/pkg/runtest/run_test.go index 4de56f4e8..abb801bf5 100644 --- a/pkg/runtest/run_test.go +++ b/pkg/runtest/run_test.go @@ -385,10 +385,12 @@ func startRpcserver(t *testing.T, target *prog.Target, executor string, source q cfg := &rpcserver.LocalConfig{ Config: rpcserver.Config{ Config: vminfo.Config{ - Target: target, - Debug: *flagDebug, - Features: flatrpc.AllFeatures, - Sandbox: flatrpc.ExecEnvSandboxNone, + Target: target, + Debug: *flagDebug, + Features: flatrpc.AllFeatures, + Sandbox: flatrpc.ExecEnvSandboxNone, + Cover: true, + ForceCover: true, }, Procs: runtime.GOMAXPROCS(0), Slowdown: 10, // to deflake slower tests @@ -402,7 +404,6 @@ func startRpcserver(t *testing.T, target *prog.Target, executor string, source q if machineChecked != nil { machineChecked(features) } - cfg.Cover = true return source } errc := make(chan error) |
