]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
do not start with a newline when creating the xml 278/head
authorAlfredo Deza <adeza@redhat.com>
Wed, 6 Jan 2016 19:18:49 +0000 (14:18 -0500)
committerAlfredo Deza <adeza@redhat.com>
Wed, 6 Jan 2016 19:18:49 +0000 (14:18 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-pr-commits/build/build

index 7c737334e864b4f060094ba055992e7fae27f523..8213bfc54d933c8ee74490da26bee4d37d8b8279 100644 (file)
@@ -25,10 +25,9 @@ def produce_junit(**kw):
     time = kw.get('time', 0)
     tests = kw.get('tests', [])
     failures = kw.get('failures', [])
-    total_tests = len(tests)
+    total_tests = len(tests) or 1
     total_failures = len(failures)
-    template = """
-<?xml version="1.0" encoding="utf-8"?>
+    template = """<?xml version="1.0" encoding="utf-8"?>
 <testsuite errors="0" failures="{total_failures}" name="Signed-off-by" skips="0" tests="{total_tests}" time="0">
 </testsuite>
     """.format(total_failures=total_failures, total_tests=total_tests)