diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-01-10 07:48:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 14:48:34 +0200 |
commit | c18a9715b83ef94a56c064edee511162998001cc (patch) | |
tree | 886b73902c9c9767b987b88d74b1429013ab7930 /run_unittests.py | |
parent | 832bcac0a793d63f4bf093c12580b4a605155476 (diff) | |
download | meson-c18a9715b83ef94a56c064edee511162998001cc.zip meson-c18a9715b83ef94a56c064edee511162998001cc.tar.gz meson-c18a9715b83ef94a56c064edee511162998001cc.tar.bz2 |
Hotdoc: use template for Commands.md instead of generating the entire file (#8154)
* doc: fix hotdoc misuse for dynamically generated content
hotdoc has a native include feature for including files inline. Use this
to generate one file for each dynamically generated code block, and
include that file in Commands.md; see:
https://hotdoc.github.io/syntax-extensions.html#smart-file-inclusion-syntax
This permits us to move back to using the in-tree version of the hotdoc
*.md sources, thus fixing the incorrect inclusion of "builddir/" in the
"Edit on github" links which resulted from using copies as the source.
Fixes #8061
* doc: call the dummy file a "stamp" as it is a better known term
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/run_unittests.py b/run_unittests.py index 1ff54eb..d6afaff 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4915,7 +4915,7 @@ class AllPlatformTests(BasePlatformTests): # The docs directory is not in release tarballs. if not os.path.isdir('docs'): raise unittest.SkipTest('Doc directory does not exist.') - doc_path = 'docs/markdown_dynamic/Commands.md' + doc_path = 'docs/markdown/Commands.md' md = None with open(doc_path, encoding='utf-8') as f: @@ -4944,13 +4944,9 @@ class AllPlatformTests(BasePlatformTests): def get_data_pattern(command): return re.compile( - r'^```[\r\n]' - r'{{ cmd_help\[\'' + command + r'\'\]\[\'usage\'\] }}[\r\n]' - r'^```[\r\n]' + r'{{ ' + command + r'_usage.inc }}[\r\n]' r'.*?' - r'^```[\r\n]' - r'{{ cmd_help\[\'' + command + r'\'\]\[\'arguments\'\] }}[\r\n]' - r'^```', + r'{{ ' + command + r'_arguments.inc }}[\r\n]', flags = re.MULTILINE|re.DOTALL) for command in md_commands: @@ -7533,7 +7529,7 @@ class LinuxCrossArmTests(BaseLinuxCrossTests): '-Dbuild.pkg_config_path=' + os.path.join(testdir, 'build_extra_path'), '-Dpkg_config_path=' + os.path.join(testdir, 'host_extra_path'), ]) - + def test_run_native_test(self): ''' https://github.com/mesonbuild/meson/issues/7997 |