support/testing: revert the last change of check_network()
authorRomain Naour <romain.naour@gmail.com>
Tue, 24 Aug 2021 17:11:44 +0000 (19:11 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 24 Aug 2021 21:54:53 +0000 (23:54 +0200)
check_network() must check the error code of the command
used to check the network configuration with the value
passed as argument "exitCode".

But this argument is ignored since this commit [1].

Revert the last change of check_network().

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/1522848308
https://gitlab.com/kubu93/buildroot/-/jobs/1522848306

[1] afc1ed4d5152e0f6e724e6986a1d12c8001b94fe

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/testing/tests/init/base.py

index 6a85b8778397783c67d4ebaee164c7fb45d82620..7f12186b73716ee3596355e39cedeab3fe9e40b9 100644 (file)
@@ -42,4 +42,5 @@ class InitSystemBase(infra.basetest.BRTest):
 
     def check_network(self, interface, exitCode=0):
         cmd = "ip addr show {} |grep inet".format(interface)
-        self.assertRunOk(cmd)
+        _, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, exitCode)