[v5,03/10] testing/infra/basetest: support br2-external

Message ID 20180512025833.22998-4-ricardo.martincoski@gmail.com
State New
Headers show
Series
  • tests for git download infra v5
Related show

Commit Message

Ricardo Martincoski May 12, 2018, 2:58 a.m.
From: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>

This change will be needed when adding a common class to test the git
download infra.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
Changes v4 -> v5:
  - no changes

Changes v3 -> v4:
  - allow the use of multiple br2-external trees, simplifying the code

Changes v2 -> v3:
  - new patch
  - search for "support for BR2_EXTERNAL directly in BRTest" in
    http://patchwork.ozlabs.org/patch/806161/
---
 support/testing/infra/basetest.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index 4773312585..67076701e7 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -29,6 +29,7 @@  MINIMAL_CONFIG = \
 
 class BRTest(unittest.TestCase):
     config = None
+    br2_external = list()
     downloaddir = None
     outputdir = None
     logtofile = True
@@ -55,7 +56,7 @@  class BRTest(unittest.TestCase):
             self.b.delete()
 
         if not self.b.is_finished():
-            self.b.configure()
+            self.b.configure(["BR2_EXTERNAL={}".format(":".join(self.br2_external))])
 
     def tearDown(self):
         self.show_msg("Cleaning up")