support/testing: check ubi image before booting
authorRicardo Martincoski <ricardo.martincoski@gmail.com>
Thu, 8 Aug 2019 23:10:11 +0000 (20:10 -0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 11 Aug 2019 20:11:53 +0000 (22:11 +0200)
Do the same as other fs tests and minimally check the ubi image before
booting.
The call to 'file' was already there, but the output wasn't tested for
some unknown reason. Add the assert for the output of the command.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/testing/tests/fs/test_ubi.py

index 015d82f769a7ebfce5c3948a9f73491f1c4a272d..e024d417df20d04245535f04c6be2032e75a8741 100644 (file)
@@ -25,6 +25,7 @@ class TestUbi(infra.basetest.BRTest):
                                       cwd=self.builddir,
                                       env={"LANG": "C"})
         out = out.splitlines()
+        self.assertIn("UBI image, version 1", out[0])
 
         subprocess.call(["truncate", "-s 128M", img])