Commit ec510045 authored by Bryan C. Mills's avatar Bryan C. Mills

cmd/go: add a [root] condition to script_test

[root] reports whether the current effective user ID is 0.

Updates #29127

Change-Id: I9ef42f1271ea669689011e7ceff4d918c0cecb6b
Reviewed-on: https://go-review.googlesource.com/c/153637
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent f36a53e9
......@@ -274,6 +274,8 @@ Script:
ok = testenv.HasExternalNetwork()
case "link":
ok = testenv.HasLink()
case "root":
ok = os.Geteuid() == 0
case "symlink":
ok = testenv.HasSymlink()
default:
......
......@@ -75,6 +75,7 @@ should only run when the condition is satisfied. The available conditions are:
- [cgo], [msan], [race] for whether cgo, msan, and the race detector can be used
- [net] for whether the external network can be used
- [link] for testenv.HasLink()
- [root] for os.Geteuid() == 0
- [symlink] for testenv.HasSymlink()
- [exec:prog] for whether prog is available for execution (found by exec.LookPath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment