summaryrefslogtreecommitdiff
path: root/tests/gold
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-10-14 09:07:46 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-10-14 09:27:24 -0400
commit4de5710540d6a0a5a94992e8413aba6e2d7d7f03 (patch)
tree7f1b810871a12ceb1a3a8be00ae27a07bba5c94a /tests/gold
parent42182f91c75ed8afdfc08812f60494958ef18d1e (diff)
downloadpython-coveragepy-git-4de5710540d6a0a5a94992e8413aba6e2d7d7f03.tar.gz
More convenient gold file structure
Diffstat (limited to 'tests/gold')
-rw-r--r--tests/gold/README.rst9
-rw-r--r--tests/gold/html/Makefile6
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/gold/README.rst b/tests/gold/README.rst
index 5d946fe1..85f6931a 100644
--- a/tests/gold/README.rst
+++ b/tests/gold/README.rst
@@ -12,7 +12,16 @@ environment variable. If set, the test working directories at
$TMPDIR/coverage_test are kept after the tests are run, so that you can
manually inspect the differences.
+Do this to clean the output directories and run only the failed tests while
+keeping the output::
+
+ make clean; COVERAGE_KEEP_TMP=1 tox -e py37 -- --lf
+
The saved HTML files in the html directories can't be viewed properly without
the supporting CSS and Javascript files. But we don't want to save copies of
those files in every subdirectory. There's a Makefile in the html directory
for working with the saved copies of the support files.
+
+If the output files are correct, you can update the gold files with "make
+update-gold". If there are version-specific gold files (for example,
+bom/2/\*), you'll need to update them manually.
diff --git a/tests/gold/html/Makefile b/tests/gold/html/Makefile
index ef870fc9..fa98714e 100644
--- a/tests/gold/html/Makefile
+++ b/tests/gold/html/Makefile
@@ -17,5 +17,11 @@ complete: ## Copy support files into directories so the HTML can be viewed prop
clean: ## Remove the effects of this Makefile.
git clean -fq .
+update-gold: ## Copy output files from latest tests to gold files.
+ @for sub in $$TMPDIR/coverage_test/*HtmlGoldTests*/out; do \
+ rsync --verbose --existing --recursive $$sub/ . ; \
+ done ; \
+ true
+
update-support: ## Copy latest support files here for posterity.
cp ../../../coverage/htmlfiles/*.{css,js,png} support