File tree Expand file tree Collapse file tree 2 files changed +16
-46
lines changed Expand file tree Collapse file tree 2 files changed +16
-46
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/sh
2
2
3
- ganache-cli -i test > /dev/null &
4
- ganache_pid=$!
3
+ function restart_ganache() {
4
+ echo " Restart ganache-cli..."
5
+ if [ $ganache_pid ]
6
+ then
7
+ echo " kill old ganache..."
8
+ kill -9 $ganache_pid
9
+ fi
5
10
6
- sleep 5
11
+ ganache-cli -i test > /dev/null &
12
+ ganache_pid=$!
7
13
8
- echo " truffle test Bank... "
9
- truffle test test/testComplexBank.js test/token/ * test/testOracle.js --network testBank
14
+ sleep 5
15
+ }
10
16
11
- kill -9 $ganache_pid
17
+ restart_ganache
12
18
13
- ganache-cli -i test > /dev/null &
14
- ganache_pid= $!
19
+ echo " truffle test Bank... "
20
+ truffle test test/testComplexBank.js test/token/ * test/testOracle.js --network testBank
15
21
16
- sleep 5 > /dev/null
22
+ restart_ganache
17
23
18
24
echo " truffle test Exchanger..."
19
25
truffle test test/testLoans.js test/testComplexExchanger.js test/testDeposit.js --network testExchanger
20
26
21
- kill -9 $ganache_pid > /dev/null
22
-
23
- ganache-cli -i test > /dev/null &
24
- ganache_pid=$!
25
-
26
- sleep 5 > /dev/null
27
+ restart_ganache
27
28
28
29
echo " truffle test DAO..."
29
30
truffle test test/testAssociation.js --network testDAO
You can’t perform that action at this time.
0 commit comments