Skip to content

Commit b227425

Browse files
committedJun 6, 2018
fix sip test
only check for Python file if it is produced
1 parent 4e38d06 commit b227425

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎tests/code_layout/test_sipfiles_uptodate.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ for module in "${modules[@]}"; do
2525
echo "*** Missing header: $header for sipfile $sipfile"
2626
else
2727
outdiff=$(./scripts/sipify.pl -p python/${module}/auto_additions/${pyfile}.temp $header | diff python/$sipfile.in -)
28-
outdiff2=$(diff python/${module}/auto_additions/${pyfile} python/${module}/auto_additions/${pyfile}.temp)
2928
if [[ -n "$outdiff" ]]; then
3029
echo " *** SIP file not up to date: $sipfile"
3130
code=1
3231
fi
33-
if [[ -n "$outdiff2" ]]; then
34-
echo " *** Python addition file not up to date: $sipfile"
35-
code=1
32+
if [[ -f python/${module}/auto_additions/${pyfile}.temp ]]; then
33+
outdiff2=$(diff python/${module}/auto_additions/${pyfile} python/${module}/auto_additions/${pyfile}.temp)
34+
if [[ -n "$outdiff2" ]]; then
35+
echo " *** Python addition file not up to date: $sipfile"
36+
code=1
37+
fi
3638
fi
3739
fi
3840
done < <(

0 commit comments

Comments
 (0)
Please sign in to comment.