main_test.go 427 B

12345678910111213141516171819202122
  1. // Copyright 2013 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package e2e
  5. import (
  6. "os"
  7. "runtime"
  8. "testing"
  9. "github.com/coreos/etcd/pkg/testutil"
  10. )
  11. func TestMain(m *testing.M) {
  12. os.Setenv("ETCD_UNSUPPORTED_ARCH", runtime.GOARCH)
  13. v := m.Run()
  14. if v == 0 && testutil.CheckLeakedGoroutine() {
  15. os.Exit(1)
  16. }
  17. os.Exit(v)
  18. }