|
|
@@ -1,6 +1,7 @@
|
|
|
from __future__ import annotations
|
|
|
|
|
|
import sys
|
|
|
+from pathlib import Path
|
|
|
from unittest import mock
|
|
|
|
|
|
from tools import fw_cli
|
|
|
@@ -18,7 +19,7 @@ def test_fw_test_6400_uses_current_v1_runner() -> None:
|
|
|
|
|
|
argv = current_runner.call_args.args[0]
|
|
|
assert argv[:2] == ["/test/python", "-B"]
|
|
|
- assert argv[-2].endswith("tools/run_6400_v1.py")
|
|
|
+ assert Path(argv[-2]).name == "run_6400_v1.py"
|
|
|
assert argv[-1] == expected_action
|
|
|
assert current_runner.call_args.kwargs["env"]["PYTHONDONTWRITEBYTECODE"] == "1"
|
|
|
|
|
|
@@ -37,6 +38,7 @@ def test_fw_test_all_continues_after_6400_failure() -> None:
|
|
|
mock.patch("tools.fw_cli._generate_one"),
|
|
|
mock.patch("tools.fw_cli._run_6400_verify", return_value=7),
|
|
|
mock.patch("tools.fw_cli._run_mrdimm_matrix", return_value=0) as mrdimm,
|
|
|
+ mock.patch.object(fw_cli.sys, "platform", "linux"),
|
|
|
):
|
|
|
assert fw_cli.main(["test", "all"]) == 7
|
|
|
|