diff options
author | Ricardo Martincoski <ricardo.martincoski@gmail.com> | 2017-10-05 18:42:09 -0300 |
---|---|---|
committer | Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> | 2017-10-06 18:56:49 +0200 |
commit | ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f (patch) | |
tree | f1187ecd2a501454fc53e9ae03b89e4480f1d40e /support/testing/tests/fs/test_ext.py | |
parent | 2927f412be6fd52961a2cd9aaed203d57609eef9 (diff) | |
download | buildroot-ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f.tar.gz buildroot-ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f.zip |
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 <ricardo.martincoski@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'support/testing/tests/fs/test_ext.py')
-rw-r--r-- | support/testing/tests/fs/test_ext.py | 9 |
1 files changed, 7 insertions, 2 deletions
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) - - |