Make race detector build in CI
This commit is contained in:
parent
69ab8a645c
commit
7c9b312cee
|
@ -55,8 +55,9 @@ func (s *GraphiteSerializer) SerializeBucketName(
|
||||||
measurement string,
|
measurement string,
|
||||||
tags map[string]string,
|
tags map[string]string,
|
||||||
) string {
|
) string {
|
||||||
if s.Template == "" {
|
template := s.Template
|
||||||
s.Template = DEFAULT_TEMPLATE
|
if template == "" {
|
||||||
|
template = DEFAULT_TEMPLATE
|
||||||
}
|
}
|
||||||
tagsCopy := make(map[string]string)
|
tagsCopy := make(map[string]string)
|
||||||
for k, v := range tags {
|
for k, v := range tags {
|
||||||
|
@ -64,7 +65,7 @@ func (s *GraphiteSerializer) SerializeBucketName(
|
||||||
}
|
}
|
||||||
|
|
||||||
var out []string
|
var out []string
|
||||||
templateParts := strings.Split(s.Template, ".")
|
templateParts := strings.Split(template, ".")
|
||||||
for _, templatePart := range templateParts {
|
for _, templatePart := range templateParts {
|
||||||
switch templatePart {
|
switch templatePart {
|
||||||
case "measurement":
|
case "measurement":
|
||||||
|
|
|
@ -69,6 +69,8 @@ exit_if_fail telegraf -config $tmpdir/config.toml \
|
||||||
-test -input-filter cpu:mem
|
-test -input-filter cpu:mem
|
||||||
|
|
||||||
cat $GOPATH/bin/telegraf | gzip > $CIRCLE_ARTIFACTS/telegraf.gz
|
cat $GOPATH/bin/telegraf | gzip > $CIRCLE_ARTIFACTS/telegraf.gz
|
||||||
|
go build -o telegraf-race -race -ldflags "-X main.version=${VERSION}-RACE" cmd/telegraf/telegraf.go
|
||||||
|
cat telegraf-race | gzip > $CIRCLE_ARTIFACTS/telegraf-race.gz
|
||||||
|
|
||||||
eval "git describe --exact-match HEAD"
|
eval "git describe --exact-match HEAD"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
|
Loading…
Reference in New Issue