Skip to content

Commit f1505af

Browse files
committed
Save copies of support files so we can view gold files properly
1 parent 54d8366 commit f1505af

13 files changed

+919
-4
lines changed

MANIFEST.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ include tox_wheels.ini
2828
include .editorconfig
2929
include .readthedocs.yml
3030

31-
recursive-include ci *.*
31+
recursive-include ci *
3232
exclude ci/*.token
3333

3434
recursive-include coverage/fullcoverage *.py
3535
recursive-include coverage/ctracer *.c *.h
3636

3737
recursive-include doc *.py *.pip *.rst *.txt *.png
38-
recursive-include doc/_static *.*
38+
recursive-include doc/_static *
3939
prune doc/_build
4040

4141
recursive-include requirements *.pip
4242

4343
recursive-include tests *.py *.tok
44-
recursive-include tests/gold *.*
45-
recursive-include tests js/*.* qunit/*.*
44+
recursive-include tests/gold *
45+
recursive-include tests js/* qunit/*
4646
prune tests/eggsrc/build
4747

4848
global-exclude *.py[co]

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ clean:
2828
-rm -rf .tox_kits
2929
-rm -rf .cache .pytest_cache .hypothesis
3030
-rm -rf $$TMPDIR/coverage_test
31+
-make -C tests/gold/html clean
3132

3233
sterile: clean
3334
-rm -rf .tox*

tests/gold/README.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2+
.. For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
3+
4+
Gold files
5+
==========
6+
7+
These are files used in comparisons for some of the tests. Code to support
8+
these comparisons is in tests/goldtest.py.
9+
10+
If gold tests are failing, it can useful to set the COVERAGE_KEEP_TMP
11+
environment variable. If set, the test working directories at
12+
$TMPDIR/coverage_test are kept after the tests are run, so that you can
13+
manually inspect the differences.
14+
15+
The saved HTML files in the html directories can't be viewed properly without
16+
the supporting CSS and Javascript files. But we don't want to save copies of
17+
those files in every subdirectory. There's a Makefile in the html directory
18+
for working with the saved copies of the support files.

tests/gold/html/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2+
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
3+
4+
help:
5+
@echo "Available targets:"
6+
@grep '^[a-zA-Z]' $(MAKEFILE_LIST) | sort | awk -F ':.*?## ' 'NF==2 {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
7+
8+
complete: ## Copy support files into directories so the HTML can be viewed properly.
9+
@for sub in *; do \
10+
if [[ -f $$sub/index.html ]]; then \
11+
echo Copying into $$sub ; \
12+
cp -n support/* $$sub ; \
13+
fi ; \
14+
done ; \
15+
true # because the for loop exits with 1 for some reason.
16+
17+
clean: ## Remove the effects of this Makefile.
18+
git clean -fq .
19+
20+
update-support: ## Copy latest support files here for posterity.
21+
cp ../../../coverage/htmlfiles/*.{css,js,png} support

0 commit comments

Comments
 (0)