diff options
| author | Ricardo Martincoski <ricardo.martincoski@gmail.com> | 2017-10-05 18:42:08 -0300 |
|---|---|---|
| committer | Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> | 2017-10-06 18:56:06 +0200 |
| commit | 2927f412be6fd52961a2cd9aaed203d57609eef9 (patch) | |
| tree | 4ff3318bea2484a6850854aaa48a62c40bf69b0a /support/testing/tests/core | |
| parent | 4a1d220d9eeebd8394a190c4d82a00139c4baa51 (diff) | |
| download | buildroot-2927f412be6fd52961a2cd9aaed203d57609eef9.tar.gz buildroot-2927f412be6fd52961a2cd9aaed203d57609eef9.zip | |
support/testing: standardize defconfig fragments style
Change all defconfig fragments to take advantage of
"cf3cd4388a support/tests: allow properly indented config fragment".
Make each defconfig fragment:
- start after a backslash;
- be declared as a multi-line string literal;
- be indented one level more than the variable that contains it.
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/core')
| -rw-r--r-- | support/testing/tests/core/test_post_scripts.py | 18 | ||||
| -rw-r--r-- | support/testing/tests/core/test_rootfs_overlay.py | 7 | ||||
| -rw-r--r-- | support/testing/tests/core/test_timezone.py | 44 |
3 files changed, 36 insertions, 33 deletions
diff --git a/support/testing/tests/core/test_post_scripts.py b/support/testing/tests/core/test_post_scripts.py index d2a0be15bf..7ca9b9d836 100644 --- a/support/testing/tests/core/test_post_scripts.py +++ b/support/testing/tests/core/test_post_scripts.py @@ -5,15 +5,15 @@ import infra.basetest class TestPostScripts(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ -""" -BR2_INIT_NONE=y -BR2_SYSTEM_BIN_SH_NONE=y -# BR2_PACKAGE_BUSYBOX is not set -BR2_ROOTFS_POST_BUILD_SCRIPT="{}" -BR2_ROOTFS_POST_IMAGE_SCRIPT="{}" -BR2_ROOTFS_POST_SCRIPT_ARGS="foobar baz" -""".format(infra.filepath("tests/core/post-build.sh"), - infra.filepath("tests/core/post-image.sh")) + """ + BR2_INIT_NONE=y + BR2_SYSTEM_BIN_SH_NONE=y + # BR2_PACKAGE_BUSYBOX is not set + BR2_ROOTFS_POST_BUILD_SCRIPT="{}" + BR2_ROOTFS_POST_IMAGE_SCRIPT="{}" + BR2_ROOTFS_POST_SCRIPT_ARGS="foobar baz" + """.format(infra.filepath("tests/core/post-build.sh"), + infra.filepath("tests/core/post-image.sh")) def check_post_log_file(self, path, what): lines = {} diff --git a/support/testing/tests/core/test_rootfs_overlay.py b/support/testing/tests/core/test_rootfs_overlay.py index 42d890ba20..22ef9722d6 100644 --- a/support/testing/tests/core/test_rootfs_overlay.py +++ b/support/testing/tests/core/test_rootfs_overlay.py @@ -9,11 +9,12 @@ def compare_file(file1, file2): class TestRootfsOverlay(infra.basetest.BRTest): rootfs_overlay_path = infra.filepath("tests/core/rootfs-overlay") - rootfs_overlay = "BR2_ROOTFS_OVERLAY=\"{0}1 {0}2\"".format(rootfs_overlay_path) config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ - infra.basetest.MINIMAL_CONFIG + \ - rootfs_overlay + infra.basetest.MINIMAL_CONFIG + \ + """ + BR2_ROOTFS_OVERLAY="{0}1 {0}2" + """.format(rootfs_overlay_path) def test_run(self): target_file = os.path.join(self.builddir, "target", "test-file1") diff --git a/support/testing/tests/core/test_timezone.py b/support/testing/tests/core/test_timezone.py index 9776b4bcee..f4ba5039ca 100644 --- a/support/testing/tests/core/test_timezone.py +++ b/support/testing/tests/core/test_timezone.py @@ -10,11 +10,11 @@ def boot_armv5_cpio(emulator, builddir): class TestNoTimezone(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ - """ -# BR2_TARGET_TZ_INFO is not set -BR2_TARGET_ROOTFS_CPIO=y -# BR2_TARGET_ROOTFS_TAR is not set -""" + """ + # BR2_TARGET_TZ_INFO is not set + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ def test_run(self): boot_armv5_cpio(self.emulator, self.builddir) @@ -24,13 +24,14 @@ BR2_TARGET_ROOTFS_CPIO=y self.assertEqual(tz[0].strip(), "UTC") class TestGlibcAllTimezone(infra.basetest.BRTest): - config = """ -BR2_arm=y -BR2_TOOLCHAIN_EXTERNAL=y -BR2_TARGET_TZ_INFO=y -BR2_TARGET_ROOTFS_CPIO=y -# BR2_TARGET_ROOTFS_TAR is not set -""" + config = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_TZ_INFO=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ def test_run(self): boot_armv5_cpio(self.emulator, self.builddir) @@ -44,15 +45,16 @@ BR2_TARGET_ROOTFS_CPIO=y self.assertEqual(tz[0].strip(), "CET") class TestGlibcNonDefaultLimitedTimezone(infra.basetest.BRTest): - config = """ -BR2_arm=y -BR2_TOOLCHAIN_EXTERNAL=y -BR2_TARGET_TZ_INFO=y -BR2_TARGET_TZ_ZONELIST="northamerica" -BR2_TARGET_LOCALTIME="America/New_York" -BR2_TARGET_ROOTFS_CPIO=y -# BR2_TARGET_ROOTFS_TAR is not set -""" + config = \ + """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_TZ_INFO=y + BR2_TARGET_TZ_ZONELIST="northamerica" + BR2_TARGET_LOCALTIME="America/New_York" + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ def test_run(self): boot_armv5_cpio(self.emulator, self.builddir) |

