Skip to content

Commit 7db39a9

Browse files
authored
Proper use of subprocess.check_call in third_party/proton/test/test_cmd.py (triton-lang#5588)
Relates to triton-lang#5537 --------- Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 7cc6799 commit 7db39a9

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

third_party/proton/test/test_cmd.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
def test_help():
99
# Only check if the viewer can be invoked
10-
ret = subprocess.check_call(["proton", "-h"], stdout=subprocess.DEVNULL)
11-
assert ret == 0
10+
subprocess.check_call(["proton", "-h"], stdout=subprocess.DEVNULL)
1211

1312

1413
def is_hip():
@@ -22,14 +21,13 @@ def test_exec(mode, tmp_path: pathlib.Path):
2221
temp_file = tmp_path / "test_exec.hatchet"
2322
name = str(temp_file.with_suffix(""))
2423
if mode == "script":
25-
ret = subprocess.check_call(["proton", "-n", name, helper_file, "test"], stdout=subprocess.DEVNULL)
24+
subprocess.check_call(["proton", "-n", name, helper_file, "test"], stdout=subprocess.DEVNULL)
2625
elif mode == "python":
27-
ret = subprocess.check_call(["python3", "-m", "triton.profiler.proton", "-n", name, helper_file, "test"],
28-
stdout=subprocess.DEVNULL)
26+
subprocess.check_call(["python3", "-m", "triton.profiler.proton", "-n", name, helper_file, "test"],
27+
stdout=subprocess.DEVNULL)
2928
elif mode == "pytest":
30-
ret = subprocess.check_call(["proton", "-n", name, "pytest", "-k", "test_main", helper_file],
31-
stdout=subprocess.DEVNULL)
32-
assert ret == 0
29+
subprocess.check_call(["proton", "-n", name, "pytest", "-k", "test_main", helper_file],
30+
stdout=subprocess.DEVNULL)
3331
with temp_file.open() as f:
3432
data = json.load(f, )
3533
kernels = data[0]["children"]

0 commit comments

Comments
 (0)