Skip to content

Commit

Permalink
Exclude TestPass|TestFail|TestRandom in RunSimTests.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
factom-clay committed Aug 27, 2018
1 parent 56ff91e commit 3260112
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions engine/runSimTest.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#/bin/sh
# set -x
# exclude TestPass|TestFail|TestRandom
pattern=$1
shift
mkdir -p test
#compile the tests
rm -rf test/*
go test -c github.com/FactomProject/factomd/engine -o test/factomd_test
#run the tests
grep -Eo " Test[^( ]+" factomd_test.go
grep -Eo " Test[^( ]+" factomd_test.go | grep "$1" | xargs -I TestMakeALeader -n1 sh -c 'mkdir -p test/TestMakeALeader; cd test/TestMakeALeader; ../factomd_test --test.v --test.timeout 600s --test.run TestMakeALeader 2>&1 | tee testlog.txt'
find . -name testlog.txt | xargs grep -EH "PASS:|FAIL:"
grep -Eo " Test[^( ]+" factomd_test.go | grep -P "$pattern" | grep -v "TestPass|TestFail|TestRandom"
grep -Eo " Test[^( ]+" factomd_test.go | grep -P "$pattern" | grep -v "TestPass|TestFail|TestRandom"| xargs -I TestMakeALeader -n1 sh -c 'mkdir -p test/TestMakeALeader; cd test/TestMakeALeader; ../factomd_test --test.v --test.timeout 600s --test.run TestMakeALeader 2>&1 | tee testlog.txt'
find . -name testlog.txt | xargs grep -EH "PASS:|FAIL:|panic"



#(echo git checkout git rev-parse HEAD; find . -name testlog.txt | xargs grep -EH "PASS:|FAIL:|panic") | mail -s "Test results `date`" `whoami`@factom.com

0 comments on commit 3260112

Please sign in to comment.