mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-23 06:24:44 -04:00
local: fix mac issues in bazel (#1893)
This commit is contained in:
parent
7c345f4503
commit
e0fe8e6ca0
13 changed files with 84 additions and 16 deletions
|
@ -9,7 +9,7 @@ def go_test(ld = None, count = 3, **kwargs):
|
|||
|
||||
It adds the following:
|
||||
- Sets test count to 3.
|
||||
- Sets race detector to on by default.
|
||||
- Sets race detector to on by default (except Mac OS)
|
||||
- Optionally sets the interpreter path to ld.
|
||||
|
||||
Args:
|
||||
|
@ -23,7 +23,16 @@ def go_test(ld = None, count = 3, **kwargs):
|
|||
kwargs["args"].append("--test.count={}".format(count))
|
||||
|
||||
# enable race detector by default
|
||||
kwargs.setdefault("race", "on")
|
||||
race_value = select({
|
||||
"@platforms//os:macos": "off",
|
||||
"//conditions:default": "on",
|
||||
})
|
||||
pure_value = select({
|
||||
"@platforms//os:macos": "on",
|
||||
"//conditions:default": "off",
|
||||
})
|
||||
kwargs.setdefault("race", race_value)
|
||||
kwargs.setdefault("pure", pure_value)
|
||||
|
||||
# set gc_linkopts to set the interpreter path to ld.
|
||||
kwargs.setdefault("gc_linkopts", [])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue