[elbe-devel] [PATCH v2 05/10] test_xml: actually try to build something using the pbuilder

Torben Hohn torben.hohn at linutronix.de
Fri May 7 08:51:21 CEST 2021


docs/quickstart.txt gives libgpio as an example.

Clone it from github, and build it using pbuilder.

While at it change the code in the vincinity to f strings.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/tests/test_xml.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/elbepack/tests/test_xml.py b/elbepack/tests/test_xml.py
index 0f3069a37..b7162e5e4 100644
--- a/elbepack/tests/test_xml.py
+++ b/elbepack/tests/test_xml.py
@@ -67,16 +67,15 @@ class TestPbuilder(ElbeTestCase):
             uuid = None
 
             try:
-                system('%s pbuilder create --xmlfile "%s" --writeproject "%s"' %
-                       (elbe_exe, self.param, prj))
-
-                # TODO: checkout some source code
+                system(f'{elbe_exe} pbuilder create --xmlfile "{self.param}" \
+                                                    --writeproject "{prj}"')
+                system(f'cd "{build_dir}"; \
+                         git clone https://github.com/Linutronix/libgpio.git')
 
                 with open(prj, "r") as f:
                     uuid = f.read()
-                    system('cd "%s"; %s pbuilder build --project %s' % (build_dir,
-                                                                        elbe_exe,
-                                                                        uuid))
+                    system(f'cd "{build_dir}/libgpio"; \
+                             {elbe_exe} pbuilder build --project {uuid}')
             # pylint: disable=try-except-raise
             except:
                 raise
-- 
2.20.1



More information about the elbe-devel mailing list