Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions tests/integration/defs/test_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
"ATTRIBUTIONS-CPP-aarch64.md",
}

# Sphinx pages that docs/source/helper.py generates at build time via its
# write_index() calls. They are gitignored (see .gitignore "docs/source/**/*.rst"),
# so a link to one is correct even though it resolves to nothing in a source
# checkout. Paths are repository-relative.
SPHINX_GENERATED_DOC_PAGES = {
Comment thread
nv-guomingz marked this conversation as resolved.
"docs/source/examples/llm_api_examples.rst",
"docs/source/examples/trtllm_serve_examples.rst",
"docs/source/examples/visual_gen_examples.rst",
}

# URLs that return 404 at HTTP level but are valid in a browser
# (e.g., GitHub Pages sites using JS redirects)
EXCEPTION_URLS = [
Expand Down Expand Up @@ -149,6 +159,13 @@ def _clean_markdown_destination(destination):
def _find_markdown_files(root_dir):
markdown_files = []
for dirpath, dirnames, filenames in os.walk(root_dir):
# Installed Python environments vendor third-party markdown whose relative
# links describe the upstream source tree, not this repository. Detect them
# by layout rather than by name, since SKIP_DIR_PREFIXES misses an
# environment created under an arbitrary name (e.g. a CI scratch dir).
if "pyvenv.cfg" in filenames or "site-packages" in dirnames:
Comment thread
nv-guomingz marked this conversation as resolved.
dirnames[:] = []
continue
Comment thread
nv-guomingz marked this conversation as resolved.
# Prune in-place so os.walk doesn't descend into skipped dirs.
dirnames[:] = [
d for d in dirnames if d not in SKIP_DIR_NAMES and not d.startswith(SKIP_DIR_PREFIXES)
Expand Down Expand Up @@ -223,6 +240,12 @@ def _check_relative_repository_link(url_info, source_file, root_dir):
candidate_paths = [local_path]
if not os.path.splitext(local_path)[1]:
candidate_paths.extend((f"{local_path}.md", f"{local_path}.rst"))

for candidate_path in candidate_paths:
Comment thread
nv-guomingz marked this conversation as resolved.
relative_path = os.path.relpath(candidate_path, root_dir)
if relative_path in SPHINX_GENERATED_DOC_PAGES:
return True, url, line_num, f"Sphinx-generated page: {relative_path}"

is_valid = any(os.path.exists(candidate_path) for candidate_path in candidate_paths)
reason = f"Repository path {'exists' if is_valid else 'not found'}: {local_path}"
return is_valid, url, line_num, reason
Expand Down
1 change: 0 additions & 1 deletion tests/integration/test_lists/waives.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ full:RTX_PRO_6000_Blackwell_Server_Edition/accuracy/test_llm_api_pytorch.py::Tes
full:sm100/unittest/bindings SKIP (Disable for Blackwell)
perf/test_perf_sanity.py::test_e2e[disagg_upload-e2e-gb300_deepseek-v4-pro-dspark_agentx_con1156_ctx2_dep8_gen1_dep8_eplb0_dspark3_ccb-NIXL] SKIP (https://nvbugs/6877254)
perf/test_visual_gen_perf_sanity.py::test_visual_gen_e2e[vg_upload-flux2_blackwell-flux2_fp8_cfg1_ulysses4_teacache_on] SKIP (https://nvbugs/6759009)
test_doc.py::test_relative_path_validity SKIP (https://nvbugs/6784181)
test_e2e.py::test_ptp_quickstart_advanced[Nemotron-Nano-9B-v2-nvfp4-NVIDIA-Nemotron-Nano-9B-v2-NVFP4] SKIP (https://nvbugs/6624972)
test_e2e.py::test_ptp_quickstart_bert[TRTLLM-BertForSequenceClassification-bert/bert-base-uncased-yelp-polarity] SKIP (https://nvbugs/6605819)
test_e2e.py::test_ptp_quickstart_bert[VANILLA-BertForSequenceClassification-bert/bert-base-uncased-yelp-polarity] SKIP (bug pending, tracked in PR 17414)
Expand Down
Loading