File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 23
23
24
24
set -ux
25
25
26
- FEATURES_OPTION=" --features feat_os_unix"
27
-
28
26
ME=" ${0} "
29
27
ME_dir=" $( dirname -- " $( readlink -fm -- " ${ME} " ) " ) "
30
28
REPO_main_dir=" $( dirname -- " ${ME_dir} " ) "
31
29
30
+ FEATURES_OPTION=${FEATURES_OPTION:- " --features feat_os_unix" }
31
+ COVERAGE_DIR=${COVERAGE_DIR:- " ${REPO_main_dir} /coverage" }
32
+
32
33
LLVM_BIN_PATH=" $( rustc --print sysroot) /lib/rustlib/x86_64-unknown-linux-gnu/bin"
33
34
LLVM_PROFDATA=" ${LLVM_BIN_PATH} /llvm-profdata"
34
35
35
- PROFRAW_DIR=" ${REPO_main_dir} /coverage/traces"
36
- PROFDATA_DIR=" ${REPO_main_dir} /coverage/data"
37
- REPORT_DIR=" ${REPO_main_dir} /coverage/report"
36
+ PROFRAW_DIR=" ${COVERAGE_DIR} /traces"
37
+ PROFDATA_DIR=" ${COVERAGE_DIR} /data"
38
+ REPORT_DIR=" ${COVERAGE_DIR} /report"
39
+ REPORT_PATH=" ${REPORT_DIR} /total.lcov.info"
38
40
39
41
rm -rf " ${PROFRAW_DIR} " && mkdir -p " ${PROFRAW_DIR} "
40
42
rm -rf " ${PROFDATA_DIR} " && mkdir -p " ${PROFDATA_DIR} "
@@ -76,6 +78,9 @@ grcov \
76
78
" ${PROFDATA_DIR} " \
77
79
--binary-path " ${REPO_main_dir} /target/debug/coreutils" \
78
80
--output-types lcov \
79
- --output-path " ${REPORT_DIR} /${UTIL} .lcov.info" \
81
+ --output-path " ${REPORT_DIR} /total .lcov.info" \
80
82
--llvm \
81
83
--keep-only " ${REPO_main_dir} " ' /src/*'
84
+
85
+ # Notify the report file to github
86
+ echo " report=${REPORT_PATH} " >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments