diff --git a/tests/edit_source.py b/tests/edit_source.py new file mode 100644 index 0000000..941002b --- /dev/null +++ b/tests/edit_source.py @@ -0,0 +1,17 @@ +with open(file="coverage.xml") as file: + file_content = file.readlines() + + +for line in file_content: + try: + orig_line = file_content.index(line) + line = line.strip().split("<")[1].split(">") + if line[0] == "source": + print("FOUND") + file_content[orig_line] = "src\n" + except: + pass + + +with open(file="coverage.xml", mode="w") as file: + file.writelines(file_content) diff --git a/tests/start_tests_gitlab.sh b/tests/start_tests_gitlab.sh index 6849de3..be1096d 100755 --- a/tests/start_tests_gitlab.sh +++ b/tests/start_tests_gitlab.sh @@ -5,3 +5,4 @@ sh tests/start_tests.sh cp tests/coverage/coverage.xml ./coverage.xml cp tests/coverage/report.xml ./report.xml +python3.10 tests/edit_source.py