* [Buildroot] [PATCH/next] test_lxc.py: fix code style
@ 2019-11-25 20:30 Pierre-Jean Texier
2019-11-25 20:30 ` [Buildroot] [PATCH/next] basetest.py: " Pierre-Jean Texier
2019-11-25 20:50 ` [Buildroot] [PATCH/next] test_lxc.py: " Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Pierre-Jean Texier @ 2019-11-25 20:30 UTC (permalink / raw)
To: buildroot
Fix these warnings:
E122 continuation line missing indentation or outdented
E127 continuation line over-indented for visual indent
E265 block comment should start with '# '
E302 expected 2 blank lines, found 1
F401 'pexpect' imported but unused
Fixes:
- https://gitlab.com/buildroot.org/buildroot/-/jobs/360824861
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
support/testing/tests/package/test_lxc.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/support/testing/tests/package/test_lxc.py b/support/testing/tests/package/test_lxc.py
index 151bcf1..346247d 100644
--- a/support/testing/tests/package/test_lxc.py
+++ b/support/testing/tests/package/test_lxc.py
@@ -1,7 +1,7 @@
import os
import infra.basetest
-import pexpect
+
class TestLxc(infra.basetest.BRTest):
config = \
@@ -23,24 +23,24 @@ class TestLxc(infra.basetest.BRTest):
BR2_ROOTFS_OVERLAY="{}"
BR2_TARGET_ROOTFS_CPIO=y
""".format(
- infra.filepath("tests/package/test_lxc/lxc-kernel.config"),
- infra.filepath("tests/package/test_lxc/rootfs-overlay"))
+ infra.filepath("tests/package/test_lxc/lxc-kernel.config"),
+ infra.filepath("tests/package/test_lxc/rootfs-overlay"))
def run_ok(self, cmd):
self.assertRunOk(cmd, 120)
def wait_boot(self):
- #the complete boot with systemd takes more time than what the default multipler permits
+ # the complete boot with systemd takes more time than what the default multipler permits
self.emulator.timeout_multiplier *= 10
self.emulator.login()
def setup_run_test_container(self):
self.run_ok("lxc-create -n lxc_iperf3 -t none -f /usr/share/lxc/config/minimal-iperf3.conf")
self.run_ok("lxc-start -l trace -n lxc_iperf3 -o /tmp/lxc.log -L /tmp/lxc.console.log")
- #need to wait for the container to be fully started
+ # need to wait for the container to be fully started
self.run_ok("sleep 2")
self.run_ok("iperf3 -c 192.168.1.2 -t 2")
- #if the test fails, just cat /tmp/*.log
+ # if the test fails, just cat /tmp/*.log
def test_run(self):
cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
@@ -50,7 +50,7 @@ class TestLxc(infra.basetest.BRTest):
kernel_cmdline=[
"console=ttyAMA0,115200"],
options=["-initrd", cpio_file,
- "-dtb", dtb_file,
- "-M", "vexpress-a9"])
+ "-dtb", dtb_file,
+ "-M", "vexpress-a9"])
self.wait_boot()
self.setup_run_test_container()
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH/next] basetest.py: fix code style
2019-11-25 20:30 [Buildroot] [PATCH/next] test_lxc.py: fix code style Pierre-Jean Texier
@ 2019-11-25 20:30 ` Pierre-Jean Texier
2019-11-25 20:50 ` Thomas Petazzoni
2019-11-25 20:50 ` [Buildroot] [PATCH/next] test_lxc.py: " Thomas Petazzoni
1 sibling, 1 reply; 4+ messages in thread
From: Pierre-Jean Texier @ 2019-11-25 20:30 UTC (permalink / raw)
To: buildroot
Fix these warnings:
W291 trailing whitespace
Fixes:
- https://gitlab.com/buildroot.org/buildroot/-/jobs/360824861
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
support/testing/infra/basetest.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 023039f..5dc6034 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -85,7 +85,7 @@ class BRTest(BRConfigTest):
self.emulator.stop()
super(BRTest, self).tearDown()
- # Run the given 'cmd' with a 'timeout' on the target and
+ # Run the given 'cmd' with a 'timeout' on the target and
# assert that the command succeeded
def assertRunOk(self, cmd, timeout=-1):
_, exit_code = self.emulator.run(cmd, timeout)
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH/next] test_lxc.py: fix code style
2019-11-25 20:30 [Buildroot] [PATCH/next] test_lxc.py: fix code style Pierre-Jean Texier
2019-11-25 20:30 ` [Buildroot] [PATCH/next] basetest.py: " Pierre-Jean Texier
@ 2019-11-25 20:50 ` Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-11-25 20:50 UTC (permalink / raw)
To: buildroot
On Mon, 25 Nov 2019 21:30:01 +0100
Pierre-Jean Texier <pjtexier@koncepto.io> wrote:
> Fix these warnings:
>
> E122 continuation line missing indentation or outdented
> E127 continuation line over-indented for visual indent
> E265 block comment should start with '# '
> E302 expected 2 blank lines, found 1
> F401 'pexpect' imported but unused
>
> Fixes:
> - https://gitlab.com/buildroot.org/buildroot/-/jobs/360824861
>
> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> ---
> support/testing/tests/package/test_lxc.py | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
Applied to next, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-25 20:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-25 20:30 [Buildroot] [PATCH/next] test_lxc.py: fix code style Pierre-Jean Texier
2019-11-25 20:30 ` [Buildroot] [PATCH/next] basetest.py: " Pierre-Jean Texier
2019-11-25 20:50 ` Thomas Petazzoni
2019-11-25 20:50 ` [Buildroot] [PATCH/next] test_lxc.py: " Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox