Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/scriptcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,20 @@ 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
python -m pip install -U pip
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: |
Expand Down
12 changes: 2 additions & 10 deletions test/tools/htmlreport/check.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,7 +15,7 @@ function validate_html {
}

if [ -z "$PYTHON" ]; then
PYTHON=python
PYTHON=python3
fi

SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})"
Expand Down
Loading