Skip to content

Commit 264f641

Browse files
Merge pull request #484 from martin-belanger/coverage-fixes
coverage: minor fixes
2 parents 570bafc + cbe6de1 commit 264f641

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

coverage.sh.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22

3-
PRIMARY_GRP=$( id -ng )
4-
PRIMARY_USR=$( id -nu )
3+
PRIMARY_USR=$( [ -n "${SUDO_USER}" ] && echo "${SUDO_USER}" || id -nu )
4+
PRIMARY_GRP=$( id -ng "${PRIMARY_USR}" )
55
PYTHON_PATH=.:./subprojects/nvme-cli/libnvme
66
AVAHI_PUBLISHER=mdns_publisher.service
7-
SCRATCH_FILE=/tmp/stas-coverage-out.txt
7+
SCRATCH_FILE=$(mktemp /tmp/stas-coverage-out.XXXXXX)
88

99
file=/tmp/stafd.conf.XXXXXX
1010
stafd_conf_fname=$(mktemp $file)
@@ -200,6 +200,7 @@ postrun_cleanup() {
200200
log "Remove ${stafd_conf_fname} and ${stacd_conf_fname}"
201201
rm "${stafd_conf_fname}"
202202
rm "${stacd_conf_fname}"
203+
rm -f "${SCRATCH_FILE}"
203204
printf "\n"
204205

205206
for file in staf stac; do

0 commit comments

Comments
 (0)