Skip to content

Commit 6b1b18b

Browse files
authored
cleanups related to htmlreport test (#7387)
1 parent 372415c commit 6b1b18b

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

.github/workflows/scriptcheck.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,21 +156,20 @@ jobs:
156156
- name: test htmlreport (standalone)
157157
run: |
158158
test/tools/htmlreport/test_htmlreport.py
159-
cd test/tools/htmlreport
160-
./check.sh
161-
# Python 3.5 and 3.6 are excluded as they are not supported by setuptools-scm package for getting
162-
# package version
159+
test/tools/htmlreport/check.sh
160+
161+
# Python 3.6 is excluded as it is not supported by setuptools-scm package for getting package version
163162
- name: test htmlreport (pip)
164-
if: matrix.python-version != '3.5' && matrix.python-version != '3.6'
163+
if: matrix.python-version != '3.6'
165164
run: |
166165
python -m venv venv
167166
source venv/bin/activate
168167
python -m pip install -U pip
169168
pip install ./htmlreport/
170169
which cppcheck-htmlreport
171170
PIP_PACKAGE_TEST=1 test/tools/htmlreport/test_htmlreport.py
172-
cd test/tools/htmlreport
173-
./check.sh
171+
# TODO: does not test the pip binary
172+
test/tools/htmlreport/check.sh
174173
175174
- name: test reduce
176175
run: |

test/tools/htmlreport/check.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
#!/bin/bash -ex
22

33
# Command for checking HTML syntax with HTML Tidy, see http://www.html-tidy.org/
4-
tidy_version=$(tidy --version)
5-
6-
if [[ "$tidy_version" == *"5.6.0"* ]] ;then
7-
# newer tidy (5.6.0) command, if using this it is not necessary to ignore warnings:
8-
tidy_cmd='tidy -o /dev/null -eq --drop-empty-elements no'
9-
else
10-
# older tidy from 2009 (Ubuntu 16.04 Xenial comes with this old version):
11-
tidy_cmd='tidy -o /dev/null -eq'
12-
fi
4+
tidy_cmd='tidy -o /dev/null -eq --drop-empty-elements no'
135

146
function validate_html {
157
if [ ! -f "$1" ]; then
@@ -23,7 +15,7 @@ function validate_html {
2315
}
2416

2517
if [ -z "$PYTHON" ]; then
26-
PYTHON=python
18+
PYTHON=python3
2719
fi
2820

2921
SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})"

0 commit comments

Comments
 (0)