MCPcopy Create free account
hub / github.com/apache/tvm / test_skip_globs

Function test_skip_globs

tests/python/ci/test_ci.py:762–783  ·  view source on GitHub ↗

Test that CI is skipped if only certain files are edited

(tmpdir_factory, files, should_skip)

Source from the content-addressed store, hash-verified

760 yaml_and_readme=dict(files=[".asf.yaml", "docs/README.md"], should_skip=True),
761)
762def test_skip_globs(tmpdir_factory, files, should_skip):
763 """
764 Test that CI is skipped if only certain files are edited
765 """
766 script = JENKINS_SCRIPT_ROOT / "git_skip_ci_globs.py"
767
768 git = TempGit(tmpdir_factory.mktemp("tmp_git_dir"))
769
770 proc = run_script(
771 [
772 script,
773 "--files",
774 ",".join(files),
775 ],
776 check=False,
777 cwd=git.cwd,
778 )
779
780 if should_skip:
781 assert proc.returncode == 0
782 else:
783 assert proc.returncode == 1
784
785
786def all_time_keys(time):

Callers

nothing calls this directly

Calls 3

TempGitClass · 0.85
run_scriptFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…