]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
test/py: Add basic mii and mdio tests
authorMichal Simek <michal.simek@xilinx.com>
Fri, 6 May 2016 11:30:48 +0000 (13:30 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 2 Feb 2021 12:49:32 +0000 (13:49 +0100)
Add simple mii and mdio testing functions.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

test/py/tests/test_mdio.py [new file with mode: 0644]
test/py/tests/test_mii.py [new file with mode: 0644]

diff --git a/test/py/tests/test_mdio.py b/test/py/tests/test_mdio.py
new file mode 100644 (file)
index 0000000..3154162
--- /dev/null
@@ -0,0 +1,12 @@
+# Copyright (c) 2016, Xilinx Inc. Michal Simek
+#
+# SPDX-License-Identifier: GPL-2.0
+
+import pytest
+
+@pytest.mark.buildconfigspec("cmd_mii")
+@pytest.mark.buildconfigspec("phylib")
+def test_mdio_list(u_boot_console):
+    expected_response = "<-->"
+    response = u_boot_console.run_command("mdio list")
+    assert(expected_response in response)
diff --git a/test/py/tests/test_mii.py b/test/py/tests/test_mii.py
new file mode 100644 (file)
index 0000000..7df5563
--- /dev/null
@@ -0,0 +1,19 @@
+# Copyright (c) 2016, Xilinx Inc. Michal Simek
+#
+# SPDX-License-Identifier: GPL-2.0
+
+import pytest
+
+@pytest.mark.xfail
+@pytest.mark.buildconfigspec("cmd_mii")
+def test_mii_info(u_boot_console):
+    expected_response = "PHY"
+    response = u_boot_console.run_command("mii info")
+    assert(expected_response in response)
+
+@pytest.mark.xfail
+@pytest.mark.buildconfigspec("cmd_mii")
+def test_mii_list(u_boot_console):
+    expected_response = "Current device"
+    response = u_boot_console.run_command("mii device")
+    assert(expected_response in response)