From 8d727d546a89dc8ef0dd743969702036b7e66a1c Mon Sep 17 00:00:00 2001 From: firewave Date: Thu, 20 Mar 2025 10:13:06 +0100 Subject: [PATCH] cleanups related to htmlreport test --- .github/workflows/scriptcheck.yml | 13 ++++++------- test/tools/htmlreport/check.sh | 12 ++---------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/scriptcheck.yml b/.github/workflows/scriptcheck.yml index 002dd6ed76a..b4336b44525 100644 --- a/.github/workflows/scriptcheck.yml +++ b/.github/workflows/scriptcheck.yml @@ -156,12 +156,11 @@ jobs: - name: test htmlreport (standalone) run: | test/tools/htmlreport/test_htmlreport.py - cd test/tools/htmlreport - ./check.sh - # Python 3.5 and 3.6 are excluded as they are not supported by setuptools-scm package for getting - # package version + test/tools/htmlreport/check.sh + + # Python 3.6 is excluded as it is not supported by setuptools-scm package for getting package version - name: test htmlreport (pip) - if: matrix.python-version != '3.5' && matrix.python-version != '3.6' + if: matrix.python-version != '3.6' run: | python -m venv venv source venv/bin/activate @@ -169,8 +168,8 @@ jobs: pip install ./htmlreport/ which cppcheck-htmlreport PIP_PACKAGE_TEST=1 test/tools/htmlreport/test_htmlreport.py - cd test/tools/htmlreport - ./check.sh + # TODO: does not test the pip binary + test/tools/htmlreport/check.sh - name: test reduce run: | diff --git a/test/tools/htmlreport/check.sh b/test/tools/htmlreport/check.sh index dc9d9970cd6..5704525c212 100755 --- a/test/tools/htmlreport/check.sh +++ b/test/tools/htmlreport/check.sh @@ -1,15 +1,7 @@ #!/bin/bash -ex # Command for checking HTML syntax with HTML Tidy, see http://www.html-tidy.org/ -tidy_version=$(tidy --version) - -if [[ "$tidy_version" == *"5.6.0"* ]] ;then - # newer tidy (5.6.0) command, if using this it is not necessary to ignore warnings: - tidy_cmd='tidy -o /dev/null -eq --drop-empty-elements no' -else - # older tidy from 2009 (Ubuntu 16.04 Xenial comes with this old version): - tidy_cmd='tidy -o /dev/null -eq' -fi +tidy_cmd='tidy -o /dev/null -eq --drop-empty-elements no' function validate_html { if [ ! -f "$1" ]; then @@ -23,7 +15,7 @@ function validate_html { } if [ -z "$PYTHON" ]; then - PYTHON=python + PYTHON=python3 fi SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})"