Skip to content

Commit

Permalink
make script compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
SunRunAway committed Aug 6, 2019
1 parent 788e5a2 commit a31e249
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/check/check_testSuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

exitCode=0
for testSuite in $(find . -name "*_test.go" -print0 | xargs -0 grep -P "type test(.*)Suite" | awk '{print $2}'); do
# TODO: ugly regex
# TODO: check code comment
if ! find . -name "*_test.go" -print0 | xargs -0 grep -P "_ = (check\.)?(Suite|SerialSuites)\((&?${testSuite}{|new\(${testSuite}\))" > /dev/null
then
if find . -name "*_test.go" -print0 | xargs -0 grep "func (s \*${testSuite}) Test" > /dev/null
# TODO: ugly regex
# TODO: check code comment
if ! find . -name "*_test.go" -print0 | xargs -0 grep -P "_ = (check\.)?(Suite|SerialSuites)\((&?${testSuite}{|new\(${testSuite}\))" > /dev/null
then
if find . -name "*_test.go" -print0 | xargs -0 grep "func (s \*${testSuite}) Test" > /dev/null
then
echo "${testSuite} is not enabled" && exitCode=1
fi
Expand Down

0 comments on commit a31e249

Please sign in to comment.