mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
all: move //go:debug decoratemappings=0 test to cmd/go
test/decoratemappingszero.go is intended to test that //go:debug decoratemappings=0 disables annonations. Unfortunately, //go:debug processing is handled by cmd/go, but cmd/internal/testdir (which runs tests from test/) generally invokes the compiler directly, thus it does not set default GODEBUGs. Move this test to the cmd/go script tests, alongside the similar test for language version. Fixes #72772. Cq-Include-Trybots: luci.golang.try:gotip-linux-ppc64le_power10 Change-Id: I6a6a636c9d380ef984f760be5689fdc7f5cb2aeb Reviewed-on: https://go-review.googlesource.com/c/go/+/656795 Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
8867af9207
commit
3fb8b4f3db
@ -1,14 +1,18 @@
|
||||
// run
|
||||
env GO111MODULE=on
|
||||
|
||||
// Copyright 2025 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
[!GOOS:linux] skip
|
||||
[short] skip
|
||||
|
||||
// Disable mapping annotations, which only exists for Linux.
|
||||
# Programs with //go:debug decoratemappings=0 should never see annotations.
|
||||
# This ensures that the runtime has not overridden the default.
|
||||
go run .
|
||||
|
||||
//go:debug decoratemappings=0
|
||||
//go:build linux
|
||||
-- go.mod --
|
||||
go 1.25
|
||||
module m
|
||||
|
||||
-- main.go --
|
||||
//go:debug decoratemappings=1
|
||||
package main
|
||||
|
||||
import (
|
Loading…
x
Reference in New Issue
Block a user