diff mbox series

[v3,2/5] testing/infra/basetest: support br2-external

Message ID 20190128232209.17485-3-aduskett@gmail.com
State Accepted
Headers show
Series OpenJDK: new package and tests | expand

Commit Message

Adam Duskett Jan. 28, 2019, 11:22 p.m. UTC
From: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>

Some upcoming test cases can use one or more br2-external trees as fixtures
that provide packages used only in runtime tests.

Add support for br2-external into the BRTest class. Any test case can
then provide a list of paths for being used as br2-external trees during
the build of the image to test.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Daniel J. Leach <dleach@belcan.com>
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
Changes v1 -> v3:
  - Added this patch to the series.

 support/testing/infra/basetest.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Matt Weber Jan. 29, 2019, 3:47 p.m. UTC | #1
All,

On Mon, Jan 28, 2019 at 5:22 PM <aduskett@gmail.com> wrote:
>
> From: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
>
> Some upcoming test cases can use one or more br2-external trees as fixtures
> that provide packages used only in runtime tests.
>
> Add support for br2-external into the BRTest class. Any test case can
> then provide a list of paths for being used as br2-external trees during
> the build of the image to test.

Both this patch and http://patchwork.ozlabs.org/patch/1032309/ would
be nice to have merged as they allow more complex test scenarios to be
built for runtime testing. The patches are independent of the couple
patchsets that have used them.

Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Thomas Petazzoni Jan. 29, 2019, 9:57 p.m. UTC | #2
Hello,

On Mon, 28 Jan 2019 18:22:06 -0500
aduskett@gmail.com wrote:


>          if not self.b.is_finished():
>              self.show_msg("Building")
> -            self.b.configure()
> +            self.b.configure(["BR2_EXTERNAL={}".format(":".join(self.br2_external))])

I made things explicit by using named arguments, i.e
make_extra_opts=...

Applied to master with this change. Thanks!

Thomas
diff mbox series

Patch

diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 5014fefafa..84139438bc 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -30,6 +30,7 @@  MINIMAL_CONFIG = \
 
 class BRTest(unittest.TestCase):
     config = None
+    br2_external = list()
     downloaddir = None
     outputdir = None
     logtofile = True
@@ -58,7 +59,7 @@  class BRTest(unittest.TestCase):
 
         if not self.b.is_finished():
             self.show_msg("Building")
-            self.b.configure()
+            self.b.configure(["BR2_EXTERNAL={}".format(":".join(self.br2_external))])
             self.b.build()
             self.show_msg("Building done")