From ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f Mon Sep 17 00:00:00 2001 From: Ricardo Martincoski Date: Thu, 5 Oct 2017 18:42:09 -0300 Subject: support/testing: fix code style Fix the trivial warnings from flake8: - remove modules imported but unused; - use 2 lines before class or module level method; - remove blank line at end of file. Signed-off-by: Ricardo Martincoski Acked-by: "Yann E. MORIN" Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- support/testing/tests/fs/test_ext.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'support/testing/tests/fs/test_ext.py') diff --git a/support/testing/tests/fs/test_ext.py b/support/testing/tests/fs/test_ext.py index 49bce45dc8..f5f9e9fdf1 100644 --- a/support/testing/tests/fs/test_ext.py +++ b/support/testing/tests/fs/test_ext.py @@ -12,6 +12,7 @@ RESBLKCNT_PROP = "Reserved block count" CHECK_FS_TYPE_CMD = "mount | grep '/dev/root on / type {}'" + def dumpe2fs_run(builddir, image): cmd = ["host/sbin/dumpe2fs", os.path.join("images", image)] ret = subprocess.check_output(cmd, @@ -20,12 +21,14 @@ def dumpe2fs_run(builddir, image): env={"LANG": "C"}) return ret.strip().splitlines() + def dumpe2fs_getprop(out, prop): for line in out: fields = line.split(": ") if fields[0] == prop: return fields[1].strip() + def boot_img_and_check_fs_type(emulator, builddir, fs_type): img = os.path.join(builddir, "images", "rootfs.{}".format(fs_type)) emulator.boot(arch="armv7", @@ -37,6 +40,7 @@ def boot_img_and_check_fs_type(emulator, builddir, fs_type): _, exit_code = emulator.run(CHECK_FS_TYPE_CMD.format(fs_type)) return exit_code + class TestExt2(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ @@ -55,6 +59,7 @@ class TestExt2(infra.basetest.BRTest): self.builddir, "ext2") self.assertEqual(exit_code, 0) + class TestExt2r1(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ @@ -74,6 +79,7 @@ class TestExt2r1(infra.basetest.BRTest): self.builddir, "ext2") self.assertEqual(exit_code, 0) + class TestExt3(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ @@ -92,6 +98,7 @@ class TestExt3(infra.basetest.BRTest): self.builddir, "ext3") self.assertEqual(exit_code, 0) + class TestExt4(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ @@ -116,5 +123,3 @@ class TestExt4(infra.basetest.BRTest): exit_code = boot_img_and_check_fs_type(self.emulator, self.builddir, "ext4") self.assertEqual(exit_code, 0) - - -- cgit v1.2.3