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

Function test_determine_docker_images

tests/python/ci/test_ci.py:1286–1321  ·  view source on GitHub ↗

Test script to decide whether to use tlcpack or tlcpackstaging for images

(tmpdir_factory, images, expected)

Source from the content-addressed store, hash-verified

1284 ),
1285)
1286def test_determine_docker_images(tmpdir_factory, images, expected):
1287 """Test script to decide whether to use tlcpack or tlcpackstaging for images"""
1288 script = JENKINS_SCRIPT_ROOT / "determine_docker_images.py"
1289
1290 git_dir = tmpdir_factory.mktemp("tmp_git_dir")
1291
1292 docker_data = {
1293 "repositories/tlcpack/ci-arm/tags/abc-abc-123": {},
1294 "repositories/tlcpack/ci-lint/tags/abc-abc-234": {},
1295 }
1296
1297 images_data = {
1298 "ci_arm": "tlcpack/ci-arm:abc-abc-123",
1299 "ci_lint": "tlcpack/ci-lint:abc-abc-234",
1300 "ci_arm2": "tlcpack/ci-arm2:abc-abc-123",
1301 }
1302
1303 run_script(
1304 [
1305 script,
1306 "--testing-docker-data",
1307 json.dumps(docker_data),
1308 "--testing-images-data",
1309 json.dumps(images_data),
1310 "--base-dir",
1311 git_dir,
1312 ]
1313 + images,
1314 cwd=git_dir,
1315 )
1316
1317 for expected_filename, expected_image in expected.items():
1318 with open(Path(git_dir) / expected_filename) as f:
1319 actual_image = f.read()
1320
1321 assert actual_image == expected_image
1322
1323
1324@parameterize_named(

Callers

nothing calls this directly

Calls 3

run_scriptFunction · 0.85
readMethod · 0.65
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…