@@ -61,6 +61,33 @@ var gubernator = flag.Bool("gubernator", false, "If true, output Gubernator link
varginkgoFlags=flag.String("ginkgo-flags","","Passed to ginkgo to specify additional flags such as --skip=.")
varsystemSpecName=flag.String("system-spec-name","","The name of the system spec used for validating the image in the node conformance test. The specs are at test/e2e_node/system/specs/. If unspecified, the default built-in spec (system.DefaultSpec) will be used.")
// envs is the type used to collect all node envs. The key is the env name,
// and the value is the env value
typeenvsmap[string]string
// String function of flag.Value
func(e*envs)String()string{
returnfmt.Sprint(*e)
}
// Set function of flag.Value
func(e*envs)Set(valuestring)error{
kv:=strings.SplitN(value,"=",2)
iflen(kv)!=2{
returnfmt.Errorf("invalid env string")
}
emap:=*e
emap[kv[0]]=kv[1]
returnnil
}
// nodeEnvs is the node envs from the flag `node-env`.
varnodeEnvs=make(envs)
funcinit(){
flag.Var(&nodeEnvs,"node-env","An environment variable passed to instance as metadata, e.g. when '--node-env=PATH=/usr/bin' is specified, there will be an extra instance metadata 'PATH=/usr/bin'.")