aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-23 22:49:05 +0800
committerGitHub <noreply@github.com>2017-02-23 22:49:05 +0800
commit357732a8404c9fe4d02f041d20a0d05381a3e6d1 (patch)
treeedaf8a63eb7f7434cd9b9cbd764b3c4c3d76191e /tests
parent29fac7de448c85049a97cbec3dc0819122bd2cb0 (diff)
parentf89dd627760b43bd405cb3db1e5efdb100835db5 (diff)
downloaddexon-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar
dexon-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.gz
dexon-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.bz2
dexon-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.lz
dexon-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.xz
dexon-357732a8404c9fe4d02f041d20a0d05381a3e6d1.tar.zst
dexon-357732a8404c9fe4d02f041d20a0d05381a3e6d1.zip
Merge pull request #3696 from karalabe/contextual-logger
Contextual logger
Diffstat (limited to 'tests')
-rw-r--r--tests/block_test_util.go6
-rw-r--r--tests/state_test_util.go6
-rw-r--r--tests/transaction_test_util.go10
-rw-r--r--tests/util.go4
-rw-r--r--tests/vm_test_util.go6
5 files changed, 16 insertions, 16 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go
index 9199be774..06792cac1 100644
--- a/tests/block_test_util.go
+++ b/tests/block_test_util.go
@@ -34,7 +34,7 @@ import (
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/event"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
)
@@ -146,14 +146,14 @@ func runBlockTests(homesteadBlock, daoForkBlock, gasPriceFork *big.Int, bt map[s
for name, test := range bt {
if skipTest[name] /*|| name != "CallingCanonicalContractFromFork_CALLCODE"*/ {
- glog.Infoln("Skipping block test", name)
+ log.Info(fmt.Sprint("Skipping block test", name))
continue
}
// test the block
if err := runBlockTest(homesteadBlock, daoForkBlock, gasPriceFork, test); err != nil {
return fmt.Errorf("%s: %v", name, err)
}
- glog.Infoln("Block test passed: ", name)
+ log.Info(fmt.Sprint("Block test passed: ", name))
}
return nil
diff --git a/tests/state_test_util.go b/tests/state_test_util.go
index a2a048205..064bf4588 100644
--- a/tests/state_test_util.go
+++ b/tests/state_test_util.go
@@ -30,7 +30,7 @@ import (
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
)
@@ -109,7 +109,7 @@ func runStateTests(chainConfig *params.ChainConfig, tests map[string]VmTest, ski
for name, test := range tests {
if skipTest[name] /*|| name != "JUMPDEST_Attack"*/ {
- glog.Infoln("Skipping state test", name)
+ log.Info(fmt.Sprint("Skipping state test", name))
continue
}
@@ -118,7 +118,7 @@ func runStateTests(chainConfig *params.ChainConfig, tests map[string]VmTest, ski
return fmt.Errorf("%s: %s\n", name, err.Error())
}
- //glog.Infoln("State test passed: ", name)
+ //log.Info(fmt.Sprint("State test passed: ", name))
//fmt.Println(string(statedb.Dump()))
}
return nil
diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go
index 678513e11..d26725867 100644
--- a/tests/transaction_test_util.go
+++ b/tests/transaction_test_util.go
@@ -25,7 +25,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
)
@@ -64,14 +64,14 @@ func RunTransactionTestsWithReader(config *params.ChainConfig, r io.Reader, skip
for name, test := range bt {
// if the test should be skipped, return
if skipTest[name] {
- glog.Infoln("Skipping transaction test", name)
+ log.Info(fmt.Sprint("Skipping transaction test", name))
return nil
}
// test the block
if err := runTransactionTest(config, test); err != nil {
return err
}
- glog.Infoln("Transaction test passed: ", name)
+ log.Info(fmt.Sprint("Transaction test passed: ", name))
}
return nil
@@ -98,7 +98,7 @@ func runTransactionTests(config *params.ChainConfig, tests map[string]Transactio
for name, test := range tests {
// if the test should be skipped, return
if skipTest[name] {
- glog.Infoln("Skipping transaction test", name)
+ log.Info(fmt.Sprint("Skipping transaction test", name))
return nil
}
@@ -106,7 +106,7 @@ func runTransactionTests(config *params.ChainConfig, tests map[string]Transactio
if err := runTransactionTest(config, test); err != nil {
return fmt.Errorf("%s: %v", name, err)
}
- glog.Infoln("Transaction test passed: ", name)
+ log.Info(fmt.Sprint("Transaction test passed: ", name))
}
return nil
diff --git a/tests/util.go b/tests/util.go
index 134d5b4f8..c96c2e06d 100644
--- a/tests/util.go
+++ b/tests/util.go
@@ -30,7 +30,7 @@ import (
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
)
@@ -40,7 +40,7 @@ var (
)
func init() {
- glog.SetV(0)
+ log.Root().SetHandler(log.LvlFilterHandler(log.LvlCrit, log.StreamHandler(os.Stderr, log.TerminalFormat())))
if os.Getenv("JITVM") == "true" {
ForceJit = true
EnableJit = true
diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go
index 3b7ba9b31..4bf2dbfe9 100644
--- a/tests/vm_test_util.go
+++ b/tests/vm_test_util.go
@@ -29,7 +29,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/ethdb"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
)
@@ -130,7 +130,7 @@ func runVmTests(tests map[string]VmTest, skipTests []string) error {
for name, test := range tests {
if skipTest[name] /*|| name != "exp0"*/ {
- glog.Infoln("Skipping VM test", name)
+ log.Info(fmt.Sprint("Skipping VM test", name))
continue
}
@@ -138,7 +138,7 @@ func runVmTests(tests map[string]VmTest, skipTests []string) error {
return fmt.Errorf("%s %s", name, err.Error())
}
- glog.Infoln("VM test passed: ", name)
+ log.Info(fmt.Sprint("VM test passed: ", name))
//fmt.Println(string(statedb.Dump()))
}
return nil