File tree Expand file tree Collapse file tree 3 files changed +8
-171
lines changed Expand file tree Collapse file tree 3 files changed +8
-171
lines changed Original file line number Diff line number Diff line change 3030 - name : Demo output on openconfig/public
3131 continue-on-error : true
3232 run : |
33- OCDIR=~/tmp/public pytests/pattern_test.sh
33+ OCDIR=~/tmp/public find "$OCDIR/regexp-tests" -name "*.yang" -print0 | xargs -0 pytests/pattern_test.sh
3434
3535 posix-pattern :
3636 name : posix-pattern statement
6060 - name : Demo output on openconfig/public
6161 continue-on-error : true
6262 run : |
63- go run gotests/main.go -model-root ~/tmp/public testdata/regexp-test.yang
63+ find "$OCDIR/regexp-tests" -name "*.yang" -print0 | xargs -0 go run gotests/main.go -model-root ~/tmp/public
Original file line number Diff line number Diff line change @@ -6,11 +6,16 @@ if [ -z $OCDIR ]; then
66 echo " \$ OCDIR not given, using default: $OCDIR "
77fi
88
9+ if [ $# -eq 0 ]; then
10+ echo " No regex test files supplied as an argument."
11+ exit 1
12+ fi
13+
914TEST_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
1015REPO_DIR=" $TEST_DIR /.."
1116
1217tmpstderr=$( mktemp)
13- pyang -p $OCDIR -p " $REPO_DIR /testdata " -- msg-template=" | {line} | {msg} |" --plugindir " $REPO_DIR /pytests/plugins" --check-patterns " $REPO_DIR /testdata/regexp-test.yang " 2> $tmpstderr
18+ pyang -p $OCDIR -- msg-template=" | {line} | {msg} |" --plugindir " $REPO_DIR /pytests/plugins" --check-patterns $@ 2> $tmpstderr
1419retcode=$?
1520if [ $retcode -ne 0 ]; then
1621 >&2 echo " | Line # | typedef | error |"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments