From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 13 Mar 2019 17:49:26 +0100 Subject: [U-Boot] [PATCH 2/5] test/py: mmc: Add 'mmc dev' test In-Reply-To: <20190313164929.32753-1-marek.vasut+renesas@gmail.com> References: <20190313164929.32753-1-marek.vasut+renesas@gmail.com> Message-ID: <20190313164929.32753-2-marek.vasut+renesas@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add separate test for 'mmc dev' subcommand. This tests whether the system can switch to a specific card. Signed-off-by: Marek Vasut Cc: Tom Rini Cc: Simon Glass --- test/py/tests/test_mmc_rd.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/py/tests/test_mmc_rd.py b/test/py/tests/test_mmc_rd.py index 40ae1a8459..1337074d3f 100644 --- a/test/py/tests/test_mmc_rd.py +++ b/test/py/tests/test_mmc_rd.py @@ -83,6 +83,27 @@ def mmc_dev(u_boot_console, is_emmc, devid, partid): good_response = 'mmc%d%s is current device' % (devid, partid_response) assert good_response in response + at pytest.mark.buildconfigspec('cmd_mmc') +def test_mmc_dev(u_boot_console, env__mmc_rd_config): + """Test the "mmc dev" command. + + Args: + u_boot_console: A U-Boot console connection. + env__mmc_rd_config: The single MMC configuration on which + to run the test. See the file-level comment above for details + of the format. + + Returns: + Nothing. + """ + + is_emmc = env__mmc_rd_config['is_emmc'] + devid = env__mmc_rd_config['devid'] + partid = env__mmc_rd_config.get('partid', 0) + + # Select MMC device + mmc_dev(u_boot_console, is_emmc, devid, partid) + @pytest.mark.buildconfigspec('cmd_mmc') def test_mmc_rd(u_boot_console, env__mmc_rd_config): """Test the "mmc read" command. -- 2.20.1