diff options
Diffstat (limited to 'tests/helper/init.go')
-rw-r--r-- | tests/helper/init.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/helper/init.go b/tests/helper/init.go new file mode 100644 index 000000000..578314e20 --- /dev/null +++ b/tests/helper/init.go @@ -0,0 +1,20 @@ +package helper + +import ( + "log" + "os" + + "github.com/ethereum/go-ethereum/ethutil" + logpkg "github.com/ethereum/go-ethereum/logger" +) + +var Logger logpkg.LogSystem +var Log = logpkg.NewLogger("TEST") + +func init() { + Logger = logpkg.NewStdLogSystem(os.Stdout, log.LstdFlags, logpkg.InfoLevel) + logpkg.AddLogSystem(Logger) + + ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "") + ethutil.Config.Db, _ = NewMemDatabase() +} |