From: Michal Simek Date: Fri, 6 May 2016 11:30:48 +0000 (+0200) Subject: test/py: Add basic mii and mdio tests X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4233738ffb45524525bb71f71af21abcce2721ce;p=thirdparty%2Fu-boot.git test/py: Add basic mii and mdio tests Add simple mii and mdio testing functions. Signed-off-by: Michal Simek --- diff --git a/test/py/tests/test_mdio.py b/test/py/tests/test_mdio.py new file mode 100644 index 00000000000..493157aa73b --- /dev/null +++ b/test/py/tests/test_mdio.py @@ -0,0 +1,11 @@ +# Copyright (c) 2016, Xilinx Inc. Michal Simek +# +# SPDX-License-Identifier: GPL-2.0 + +import pytest + +@pytest.mark.buildconfigspec("cmd_mdio") +def test_mii_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 index 00000000000..718dda0f194 --- /dev/null +++ b/test/py/tests/test_mii.py @@ -0,0 +1,17 @@ +# Copyright (c) 2016, Xilinx Inc. Michal Simek +# +# SPDX-License-Identifier: GPL-2.0 + +import pytest + +@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.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)