Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Demo output on openconfig/public
continue-on-error: true
run: |
OCDIR=~/tmp/public pytests/pattern_test.sh
OCDIR=~/tmp/public find "$OCDIR/regexp-tests" -name "*.yang" -print0 | xargs -0 pytests/pattern_test.sh

posix-pattern:
name: posix-pattern statement
Expand Down Expand Up @@ -60,4 +60,4 @@ jobs:
- name: Demo output on openconfig/public
continue-on-error: true
run: |
go run gotests/main.go -model-root ~/tmp/public testdata/regexp-test.yang
find "$OCDIR/regexp-tests" -name "*.yang" -print0 | xargs -0 go run gotests/main.go -model-root ~/tmp/public
7 changes: 6 additions & 1 deletion pytests/pattern_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ if [ -z $OCDIR ]; then
echo "\$OCDIR not given, using default: $OCDIR"
fi

if [ $# -eq 0 ]; then
echo "No regex test files supplied as an argument."
exit 1
fi

TEST_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
REPO_DIR="$TEST_DIR/.."

tmpstderr=$(mktemp)
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
pyang -p $OCDIR --msg-template="| {line} | {msg} |" --plugindir "$REPO_DIR/pytests/plugins" --check-patterns $@ 2> $tmpstderr
retcode=$?
if [ $retcode -ne 0 ]; then
>&2 echo "| Line # | typedef | error |"
Expand Down
168 changes: 0 additions & 168 deletions testdata/regexp-test.yang

This file was deleted.