Skip to content
Snippets Groups Projects
common_test.go 220 B
Newer Older
Silas Davis's avatar
Silas Davis committed
package rpctest

import (
	"testing"
Silas Davis's avatar
Silas Davis committed
	"os"
Silas Davis's avatar
Silas Davis committed
)

// Needs to be in a _test.go file to be picked up
func TestMain(m *testing.M) {
Silas Davis's avatar
Silas Davis committed
	returnValue := TestWrapper(func() int {
		return m.Run()
	})
Silas Davis's avatar
Silas Davis committed

Silas Davis's avatar
Silas Davis committed
	defer os.Exit(returnValue)
Silas Davis's avatar
Silas Davis committed
}