From b2274258a4240abe1335a038bb70f66a9aadabbc Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Tue, 5 Jun 2018 20:42:46 -0400 Subject: [PATCH] fix sip test only check for Python file if it is produced --- tests/code_layout/test_sipfiles_uptodate.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/code_layout/test_sipfiles_uptodate.sh b/tests/code_layout/test_sipfiles_uptodate.sh index 2a57d001936..bdd08e08049 100755 --- a/tests/code_layout/test_sipfiles_uptodate.sh +++ b/tests/code_layout/test_sipfiles_uptodate.sh @@ -25,14 +25,16 @@ for module in "${modules[@]}"; do echo "*** Missing header: $header for sipfile $sipfile" else outdiff=$(./scripts/sipify.pl -p python/${module}/auto_additions/${pyfile}.temp $header | diff python/$sipfile.in -) - outdiff2=$(diff python/${module}/auto_additions/${pyfile} python/${module}/auto_additions/${pyfile}.temp) if [[ -n "$outdiff" ]]; then echo " *** SIP file not up to date: $sipfile" code=1 fi - if [[ -n "$outdiff2" ]]; then - echo " *** Python addition file not up to date: $sipfile" - code=1 + if [[ -f python/${module}/auto_additions/${pyfile}.temp ]]; then + outdiff2=$(diff python/${module}/auto_additions/${pyfile} python/${module}/auto_additions/${pyfile}.temp) + if [[ -n "$outdiff2" ]]; then + echo " *** Python addition file not up to date: $sipfile" + code=1 + fi fi fi done < <(