[elbe-devel] [PATCH 3/6] Call new junit API in project finetuning.

Torben Hohn torben.hohn at linutronix.de
Wed Aug 7 11:04:38 CEST 2019


On Thu, Jul 18, 2019 at 02:02:43PM +0200, dion at linutronix.de wrote:
> From: Olivier Dion <dion at linutronix.de>
> 
> Signed-off-by: Olivier Dion <dion at linutronix.de>
> ---
>  elbepack/finetuning.py | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
> index 7f20436e..375f2e99 100644
> --- a/elbepack/finetuning.py
> +++ b/elbepack/finetuning.py
> @@ -23,6 +23,7 @@ from elbepack.shellhelper import CommandError
>  from elbepack.filesystem import ImgMountFilesystem
>  from elbepack.packers import default_packer, packers
>  from elbepack.egpg import unlock_key
> +from elbepack.junit import TestSuite, TestException
>  
>  
>  class FinetuningException(Exception):
> @@ -674,6 +675,24 @@ class CopyToPartition(ImageFinetuningAction):
>              log.do(cmd)
>  
>  
> + at FinetuningAction.register("test-suites")
> +class TestSuites(FinetuningAction):
> +
> +    def execute_prj(self, log, buildenv, target, builddir):
> +
> +        tss = []
> +        output = os.path.join(builddir,
> +                              self.node.et.attrib["dst"])

please hardcode the filename to "elbe-junit.xml"

looks good otherwise.

> +
> +        for test_suite in self.node:
> +            ts = TestSuite(test_suite, target)
> +            try:
> +                tss.append(ts())
> +            except TestException as E:
> +                log.printo(str(E))
> +
> +        TestSuite.to_file(output, tss)
> +
>  def do_finetuning(xml, log, buildenv, target):
>  
>      if not xml.has('target/finetuning'):
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list