Skip to content

Commit

Permalink
Make race detector build in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Jul 13, 2016
1 parent 6e45c3a commit b9791d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/serializers/graphite/graphite.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@ func (s *GraphiteSerializer) SerializeBucketName(
measurement string,
tags map[string]string,
) string {
if s.Template == "" {
s.Template = DEFAULT_TEMPLATE
template := s.Template
if template == "" {
template = DEFAULT_TEMPLATE
}
tagsCopy := make(map[string]string)
for k, v := range tags {
tagsCopy[k] = v
}

var out []string
templateParts := strings.Split(s.Template, ".")
templateParts := strings.Split(template, ".")
for _, templatePart := range templateParts {
switch templatePart {
case "measurement":
Expand Down
2 changes: 2 additions & 0 deletions scripts/circle-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ exit_if_fail telegraf -config $tmpdir/config.toml \
-test -input-filter cpu:mem

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"
if [ $? -eq 0 ]; then
Expand Down

0 comments on commit b9791d0

Please sign in to comment.