From a2048773e74a960112a46d96e9f09c304431cb77 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 12 Aug 2024 20:11:19 +1000 Subject: [PATCH] Fix test --- scripts/sipify.py | 6 +++--- tests/code_layout/sipify/test_sipfiles.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/sipify.py b/scripts/sipify.py index ad93ff808f6..6f4ea5c83a2 100755 --- a/scripts/sipify.py +++ b/scripts/sipify.py @@ -2174,9 +2174,9 @@ if args.sip_output: f.write(''.join(output)) f.write(''.join(sip_header_footer())) else: - print(''.join(sip_header_footer())) - print(''.join(output)) - print(''.join(sip_header_footer())) + print(''.join(sip_header_footer()) + + ''.join(output) + + ''.join(sip_header_footer()).rstrip()) if args.python_output and output_python: with open(args.python_output, 'w') as f: diff --git a/tests/code_layout/sipify/test_sipfiles.sh b/tests/code_layout/sipify/test_sipfiles.sh index c6ef19bdb35..6fa98921ab4 100755 --- a/tests/code_layout/sipify/test_sipfiles.sh +++ b/tests/code_layout/sipify/test_sipfiles.sh @@ -20,7 +20,7 @@ code=0 for root_dir in python python/PyQt6; do if [[ $root_dir == "python/PyQt6" ]]; then - IS_QT6="--qt6" + IS_QT6="-qt6" fi for module in "${modules[@]}"; do @@ -30,7 +30,7 @@ for root_dir in python python/PyQt6; do if [ ! -f $header ]; then echo "*** Missing header: $header for sipfile $sipfile" else - outdiff=$(./scripts/sipify.pl $IS_QT6 -p $root_dir/${module}/auto_additions/${pyfile}.temp $header | diff $root_dir/$sipfile.in -) + outdiff=$(./scripts/sipify.py $IS_QT6 -python_output $root_dir/${module}/auto_additions/${pyfile}.temp $header | diff $root_dir/$sipfile.in -) if [[ -n "$outdiff" ]]; then echo " *** SIP file not up to date: $root_dir/$sipfile" echo " $outdiff "