diff options
Diffstat (limited to 'util/presubmit_check.sh')
-rwxr-xr-x | util/presubmit_check.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/util/presubmit_check.sh b/util/presubmit_check.sh index b6ffa80a35..08b548b631 100755 --- a/util/presubmit_check.sh +++ b/util/presubmit_check.sh @@ -5,7 +5,7 @@ # found in the LICENSE file. # Verify there is no CPRINTS("....\n", ...) statements added to the code. -upstream_branch="$(git rev-parse --abbrev-ref --symbolic-full-name @{u} \ +upstream_branch="$(git rev-parse --abbrev-ref --symbolic-full-name @\{u\} \ 2>/dev/null)" if [[ -z ${upstream_branch} ]]; then echo "Current branch does not have an upstream branch" >&2 @@ -27,3 +27,10 @@ if git diff --no-ext-diff "${upstream_branch}" HEAD | echo "error: 'test_' prefix missing from test function name" >&2 exit 1 fi + +# Validate testcase.yaml files +if ! git diff --no-ext-diff --name-only "${upstream_branch}" HEAD | + util/zephyr_check_testcase_yaml.py - ; then + echo "Errors detected while validating testcase.yaml files" + exit 1 +fi |