Skip to content

Commit 3c4dbd6

Browse files
committed
Create links to different UMF source code directories
Signed-off-by: Lukasz Dorau <[email protected]>
1 parent dc11d4e commit 3c4dbd6

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

scripts/coverage/merge_coverage_files.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,35 @@
66
[ "$1" != "" ] && PREFIX="$1" || PREFIX="exports-coverage"
77
[ "$2" != "" ] && OUTPUT_NAME="$2" || OUTPUT_NAME="total_coverage"
88

9+
GROUP=$(groups | cut -d' ' -f1)
10+
11+
# The source code of UMF is located in /home/runner/work/unified-memory-framework/unified-memory-framework.
12+
UMF_DIR=/home/runner/work/unified-memory-framework/unified-memory-framework
13+
14+
# Create required links:
15+
# LINKS="
16+
# /home/testuser
17+
# /home/test-user/actions-runner/_work/unified-memory-framework/unified-memory-framework
18+
# /home/test-user/shared-action-runner/_work/unified-memory-framework/unified-memory-framework
19+
# /home/test-user/shared-actions-runner/_work/unified-memory-framework/unified-memory-framework
20+
# /opt/actions-runner/_work/unified-memory-framework/unified-memory-framework"
21+
cat ./path-* | sort | uniq
22+
LINKS=$(cat ./path-* | sort | uniq | xargs)
23+
24+
for link in $LINKS; do
25+
[ -e $link ] && continue # continue if already exists
26+
sudo mkdir -p $link # create all subdirectories
27+
sudo rm -r $link # remove the last directory
28+
sudo ln -s $UMF_DIR $link # create the link
29+
sudo chown $USER:$GROUP $link # set permissions
30+
ls -al $link # check the link
31+
done
32+
933
OPTS=""
1034
for file in $(ls -1 ${PREFIX}-*); do
1135
OPTS="$OPTS -a $file"
1236
done
1337

14-
set -ex
38+
set -x
1539

1640
lcov -o $OUTPUT_NAME $OPTS

0 commit comments

Comments
 (0)