Fix STC for new intent CLI output format
Change-Id: I5892d8000f4f0a6bfdd1f22598b790966cb04a73
diff --git a/tools/test/bin/onos-check-intent b/tools/test/bin/onos-check-intent
index 0cc6c90..38b8aea 100755
--- a/tools/test/bin/onos-check-intent
+++ b/tools/test/bin/onos-check-intent
@@ -25,13 +25,13 @@
echo "Attempt #$i"
onos $target "onos:intents" | tee $aux
if [ -z "$numIntentsExpected" ]; then
- ( cat $aux | grep "key=$2" | grep "state=$3" ) && cat $aux && exit 0
+ ( cat $aux | egrep "Key.*$2" && cat $aux | egrep "State.*$3" ) && cat $aux && exit 0
else
# exit 0 only if expected number of intents (with required key)
# are present and all intents match state (if expected no. of intents > 0)
- numIntents=`grep "key=$2" $aux | wc -l`
+ numIntents=`egrep "Key.*$2" $aux | wc -l`
numIntentsOfState=0
- [ $numIntentsExpected -gt 0 ] && numIntentsOfState=`grep "key=$2" $aux | grep "state=$3" | wc -l`
+ [ $numIntentsExpected -gt 0 ] && numIntentsOfState=`egrep "Key.*$2" $aux | egrep "State.*$3" | wc -l`
[ $numIntents -eq $numIntentsOfState ] \
&& [ $numIntents -eq $numIntentsExpected ] \
&& cat $aux && exit 0