Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
c941a39b
Commit
c941a39b
authored
Jun 11, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup logging
parent
8507c867
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
12 deletions
+15
-12
main.go
cmd/ethtest/main.go
+2
-1
block_test_util.go
tests/block_test_util.go
+3
-3
init.go
tests/init.go
+1
-1
state_test_util.go
tests/state_test_util.go
+3
-2
transaction_test_util.go
tests/transaction_test_util.go
+3
-2
vm_test_util.go
tests/vm_test_util.go
+3
-3
No files found.
cmd/ethtest/main.go
View file @
c941a39b
...
...
@@ -29,7 +29,8 @@ import (
)
func
main
()
{
// helper.Logger.SetLogLevel(5)
glog
.
SetToStderr
(
true
)
// vm.Debug = true
if
len
(
os
.
Args
)
<
2
{
...
...
tests/block_test_util.go
View file @
c941a39b
...
...
@@ -19,6 +19,7 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/rlp"
)
...
...
@@ -99,15 +100,14 @@ func RunBlockTest(filepath string) error {
for
name
,
test
:=
range
bt
{
// if the test should be skipped, return
if
skipTest
[
name
]
{
fmt
.
Println
(
"Skipping state
test"
,
name
)
glog
.
Infoln
(
"Skipping block
test"
,
name
)
return
nil
}
// test the block
if
err
:=
testBlock
(
test
);
err
!=
nil
{
return
err
}
fmt
.
Println
(
"Block test passed: "
,
name
)
glog
.
Infoln
(
"Block test passed: "
,
name
)
}
return
nil
}
...
...
tests/init.go
View file @
c941a39b
...
...
@@ -17,7 +17,7 @@ var (
transactionTestDir
=
filepath
.
Join
(
baseDir
,
"TransactionTests"
)
vmTestDir
=
filepath
.
Join
(
baseDir
,
"VMTests"
)
blockSkipTests
=
[]
string
{}
blockSkipTests
=
[]
string
{
"SimpleTx3"
}
transSkipTests
=
[]
string
{
"TransactionWithHihghNonce256"
}
stateSkipTests
=
[]
string
{
"mload32bitBound_return"
,
"mload32bitBound_return2"
}
vmSkipTests
=
[]
string
{}
...
...
tests/state_test_util.go
View file @
c941a39b
...
...
@@ -12,6 +12,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"
)
func
RunStateTest
(
p
string
)
error
{
...
...
@@ -25,7 +26,7 @@ func RunStateTest(p string) error {
for
name
,
test
:=
range
tests
{
if
skipTest
[
name
]
{
fmt
.
Print
ln
(
"Skipping state test"
,
name
)
glog
.
Info
ln
(
"Skipping state test"
,
name
)
return
nil
}
db
,
_
:=
ethdb
.
NewMemDatabase
()
...
...
@@ -105,7 +106,7 @@ func RunStateTest(p string) error {
}
}
fmt
.
Print
ln
(
"State test passed: "
,
name
)
glog
.
Info
ln
(
"State test passed: "
,
name
)
//fmt.Println(string(statedb.Dump()))
}
return
nil
...
...
tests/transaction_test_util.go
View file @
c941a39b
...
...
@@ -8,6 +8,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/rlp"
)
...
...
@@ -44,14 +45,14 @@ func RunTransactionTests(file string) error {
for
name
,
test
:=
range
bt
{
// if the test should be skipped, return
if
skipTest
[
name
]
{
fmt
.
Println
(
"Skipping state
test"
,
name
)
glog
.
Infoln
(
"Skipping transaction
test"
,
name
)
return
nil
}
// test the block
if
err
:=
runTest
(
test
);
err
!=
nil
{
return
err
}
fmt
.
Print
ln
(
"Transaction test passed: "
,
name
)
glog
.
Info
ln
(
"Transaction test passed: "
,
name
)
}
return
nil
...
...
tests/vm_test_util.go
View file @
c941a39b
...
...
@@ -10,6 +10,7 @@ import (
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/logger/glog"
)
func
RunVmTest
(
p
string
)
error
{
...
...
@@ -26,7 +27,7 @@ func RunVmTest(p string) error {
for
name
,
test
:=
range
tests
{
if
skipTest
[
name
]
{
fmt
.
Println
(
"Skipping state
test"
,
name
)
glog
.
Infoln
(
"Skipping VM
test"
,
name
)
return
nil
}
db
,
_
:=
ethdb
.
NewMemDatabase
()
...
...
@@ -102,8 +103,7 @@ func RunVmTest(p string) error {
}
}
fmt
.
Println
(
"VM test passed: "
,
name
)
glog
.
Infoln
(
"VM test passed: "
,
name
)
//fmt.Println(string(statedb.Dump()))
}
return
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment