coverage: replace source absolute path with '.'

This commit is contained in:
Alexander Tomokhov 2024-04-03 19:43:31 +04:00
parent 34e1f55a7c
commit e60f907720
1 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,7 @@
rclone
redis
restic
sonar-scanner-cli
self.packages.${system}.pytest-vm
# FIXME consider loading this explicitly only after ArchLinux issue is solved
self.checks.x86_64-linux.default.driverInteractive
@ -151,6 +152,7 @@
start_all()
machine.succeed("cd ${vmtest-src-dir} && coverage run --data-file=/tmp/.coverage -m pytest -p no:cacheprovider -v >&2")
machine.succeed("cd ${vmtest-src-dir} && coverage xml --data-file=/tmp/.coverage -o /tmp/coverage.xml >&2")
machine.succeed("sed 's/<source>${pkgs.lib.strings.escapeShellArg self.outPath}<\/source>/<source>.<\/source>/g' /tmp/coverage.xml")
machine.copy_from_vm("/tmp/coverage.xml", ".")
machine.succeed("coverage report --rcfile=.coveragerc --data-file=/tmp/.coverage >&2")
'';