Skip to content

Commit 178bdfa

Browse files
committed
[rebaseline_tests] Return non-zero when tests are up-to-date
1 parent b1d0cd1 commit 178bdfa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
# Hack to honor changes to rebaseline_tests.py in the current PR
6363
git checkout - ./tools/maint/rebaseline_tests.py
6464
./bootstrap
65-
if ! ./tools/maint/rebaseline_tests.py --check-only; then
65+
if ./tools/maint/rebaseline_tests.py --check-only; then
6666
echo "Test expectations are out-of-date on the target branch."
6767
echo "You can run './tools/maint/rebaseline_tests.py --new-branch'"
6868
echo "and use it to create a seperate PR."
@@ -77,7 +77,7 @@ jobs:
7777
git checkout ${{ github.sha }}
7878
git rev-parse HEAD
7979
./bootstrap
80-
if ! ./tools/maint/rebaseline_tests.py --check-only --clear-cache; then
80+
if ./tools/maint/rebaseline_tests.py --check-only --clear-cache; then
8181
echo "Test expectations are out-of-date on the PR branch."
8282
echo "You can run './tools/maint/rebaseline_tests.py' to"
8383
echo "create a commit updating the expectations."

tools/maint/rebaseline_tests.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def main():
8989

9090
if not filenames:
9191
print('test expectations are up-to-date')
92-
return 0
92+
return 1
9393

9494
if args.check_only:
9595
message = f'''Test expectations are out-of-date
@@ -120,7 +120,7 @@ def main():
120120

121121
print(message)
122122
if args.check_only:
123-
return 1
123+
return 0
124124

125125
if args.new_branch:
126126
run(['git', 'checkout', '-b', 'rebaseline_tests'])

0 commit comments

Comments
 (0)