github.com/simpleiot/simpleiot@v0.18.3/tools/test-rules.sh (about)

     1  #!/bin/bash
     2  
     3  count=0
     4  
     5  while true; do
     6  	echo "running test ..."
     7  	go clean -testcache
     8  
     9  	if ! go test -p=1 -race ./client -v -run TestRules; then
    10  		echo "test failed at count: $count"
    11  		break
    12  	fi
    13  
    14  	if ! go test -p=1 -race ./client -v -run TestDisabled; then
    15  		echo "test failed at count: $count"
    16  		break
    17  	fi
    18  
    19  	if ! go test -p=1 -race ./client -v -run TestMultipleConditions; then
    20  		echo "test failed at count: $count"
    21  		break
    22  	fi
    23  
    24  	if ! go test -p=1 -race ./client -v -run TestActionPointKey; then
    25  		echo "test failed at count: $count"
    26  		break
    27  	fi
    28  	count=$((count + 1))
    29  	echo "count: $count"
    30  done