Fix detection for out of date files (#9360)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Martin Liška 2022-10-05 15:44:41 +02:00 committed by GitHub
parent 3d25662550
commit b1390c4191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -17,6 +17,8 @@ Features added
``:option:`--module[=foobar]``` or ``:option:`--module foobar```. ``:option:`--module[=foobar]``` or ``:option:`--module foobar```.
Patch by Martin Liska. Patch by Martin Liska.
* #10881: autosectionlabel: Record the generated section label to the debug log. * #10881: autosectionlabel: Record the generated section label to the debug log.
* #9360: Fix caching for now-outdated files for some builders (e.g. manpage)
when there is no change in source files. Patch by Martin Liska.
Bugs fixed Bugs fixed
---------- ----------

View File

@ -347,7 +347,7 @@ class Builder:
with progress_message(__('checking consistency')): with progress_message(__('checking consistency')):
self.env.check_consistency() self.env.check_consistency()
else: else:
if method == 'update' and not docnames: if method == 'update' and (not docnames or docnames == ['__all__']):
logger.info(bold(__('no targets are out of date.'))) logger.info(bold(__('no targets are out of date.')))
return return

View File

@ -633,7 +633,6 @@ def test_tocdepth(app, cached_etree_parse, fname, expect):
], ],
})) }))
@pytest.mark.sphinx('singlehtml', testroot='tocdepth') @pytest.mark.sphinx('singlehtml', testroot='tocdepth')
@pytest.mark.test_params(shared_result='test_build_html_tocdepth')
def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect): def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect):
app.build() app.build()
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect) check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
@ -1138,7 +1137,6 @@ def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect):
], ],
})) }))
@pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={'numfig': True}) @pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={'numfig': True})
@pytest.mark.test_params(shared_result='test_build_html_numfig_on')
def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect): def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect):
app.build() app.build()
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect) check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)

View File

@ -1604,7 +1604,7 @@ def test_latex_container(app, status, warning):
@pytest.mark.sphinx('latex', testroot='reST-code-role') @pytest.mark.sphinx('latex', testroot='reST-code-role')
def test_latex_code_role(app): def test_latex_code_role(app):
app.build() app.build(force_all=True)
content = (app.outdir / 'python.tex').read_text() content = (app.outdir / 'python.tex').read_text()
common_content = ( common_content = (

View File

@ -42,7 +42,7 @@ def test_man_pages_empty_description(app, status, warning):
@pytest.mark.sphinx('man', testroot='basic', @pytest.mark.sphinx('man', testroot='basic',
confoverrides={'man_make_section_directory': True}) confoverrides={'man_make_section_directory': True})
def test_man_make_section_directory(app, status, warning): def test_man_make_section_directory(app, status, warning):
app.build() app.build(force_all=True)
assert (app.outdir / 'man1' / 'python.1').exists() assert (app.outdir / 'man1' / 'python.1').exists()

View File

@ -60,7 +60,7 @@ def test_texinfo(app, status, warning):
@pytest.mark.sphinx('texinfo', testroot='markup-rubric') @pytest.mark.sphinx('texinfo', testroot='markup-rubric')
def test_texinfo_rubric(app, status, warning): def test_texinfo_rubric(app, status, warning):
app.build() app.build(force_all=True)
output = (app.outdir / 'python.texi').read_text(encoding='utf8') output = (app.outdir / 'python.texi').read_text(encoding='utf8')
assert '@heading This is a rubric' in output assert '@heading This is a rubric' in output