forked from ethereum/hive
-
Notifications
You must be signed in to change notification settings - Fork 3
/
test.sh
92 lines (67 loc) · 2.2 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
#
# This is a little test-script, that can be used for a some trial runs of clients.
#
# This script runs all production-ready tests, but does so with very restrictive options,
# and should thus complete in tens of minutes
#
HIVEHOME="./"
# Store results in temp
RESULTS="/tmp/TestResults"
FLAGS="--loglevel 4"
FLAGS="$FLAGS --results-root $RESULTS "
FLAGS="$FLAGS --sim.parallelism 1 --client.checktimelimit=20s"
echo "Running the quick'n'dirty version of the Hive tests, for local development"
echo "To get the hive viewer up, you can do"
echo ""
echo " cd $HIVEHOME/hiveviewer && ln -s /tmp/TestResults/ Results && python -m SimpleHTTPServer"
echo ""
echo "And then visit http://localhost:8000/ with your browser. "
echo "Log-files and stuff is availalbe in $RESULTS."
echo ""
echo ""
function run {
echo "$HIVEHOME> $1"
(cd $HIVEHOME && $1)
}
function testconsensus {
client=$1
echo "$(date) Starting hive consensus simulation [$client]"
run "./hive --sim ethereum/consensus --client $client --sim.loglevel 6 --sim.testlimit 2 $FLAGS"
}
function testgraphql {
echo "$(date) Starting graphql simulation [$1]"
run "./hive --sim ethereum/graphql --client $1 $FLAGS"
}
function testsync {
echo "$(date) Starting hive sync simulation [$1]"
run "./hive --sim ethereum/sync --client=$1 $FLAGS"
}
function testdevp2p {
echo "$(date) Starting p2p simulation [$1]"
run "./hive --sim devp2p --client $1 $FLAGS"
}
mkdir $RESULTS
# Sync are quick tests
#
# These can succsessfully sync with themselves
#testsync go-ethereum_latest
# These two are failing - even against themselves
testsync besu_latest # fails
testsync nethermind_latest # fails
#testsync besu_latest,nethermind_latest
#testsync go-ethereum_latest go-ethereum_stable
#testsync go-ethereum_latest nethermind_latest
#testsync go-ethereum_latest besu_latest
# GraphQL implemented only in besu and geth
#
testgraphql go-ethereum_latest
testgraphql besu_latest
# The devp2p tests are pretty quick -- a few minutes
#testdevp2p go-ethereum_latest
#testdevp2p nethermind_latest
#testdevp2p besu_latest
# These take an extremely long time to run
#testconsensus go-ethereum_latest
#testconsensus nethermind_latest
#testconsensus besu_latest