Commit c4d260e5 authored by Steffen Müthing's avatar Steffen Müthing

[!35] Fix placement of JUnit reports

Merge branch 'feature/fix-junit-report-path' into 'master'

ref:docker/ci Right now, they end up in an inconvenient location under the
build directory, wherever that might be. This patch moves them into
junit/path/to/repo/cmake.xml, which should also simplify supermodule setups
that want to test multiple modules.

See merge request [docker/ci!35]

parents cc81f07d 81a898b3
......@@ -18,6 +18,8 @@ import shutil
import subprocess
import sys
import xml.etree.ElementTree as et
from pathlib import Path
import os
class CTestParser:
......@@ -46,8 +48,15 @@ class CTestParser:
print(" ", line)
def __init__(self):
def __init__(self,junitpath=None):
self.inputpath = self.findCTestOutput()
if junitpath is None:
buildroot = Path(os.environ["CI_PROJECT_DIR"])
junitdir = buildroot / "junit" / os.environ["CI_PROJECT_PATH_SLUG"]
self.junitpath = junitdir / "cmake.xml"
self.junitpath = Path(junitpath)
self.tests = 0
self.passed = 0
self.failures = 0
......@@ -126,7 +135,7 @@ class CTestParser:
with open("Testing/cmake.xml", "wb") as fh:
with"wb") as fh:
return self.errors + self.failures
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment