Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error in execution without coverage report generation, problem in using coverage report generation #304

Open
Msmevol opened this issue Sep 21, 2023 · 0 comments

Comments

@Msmevol
Copy link

Msmevol commented Sep 21, 2023

#shellspec -s /bin/bash -j 4
Running: /bin/bash [bash 4.2.37(1)-release] {--jobs 4}
.................................................

Finished in 9.77 seconds (user 4.74 seconds, sys 3.18 seconds) 49 examples, 0 failures
正常使用没有问题
#shellspec -s /bin/bash -j 4 --kcov
Running: /bin/bash [bash 4.2.37(1)-release] {--jobs 4}
...............................WWWWWWWFFF...F....

......
Code covered: 7.40%, Executed lines: 121, Instrumented lines: 1635
Aborted with status code [executor: 0] [reporter: 1] [error handler: 0]
Fatal error occurred, terminated with exit status 1.

测试函数中存在这样的语句
local realpath=realpath "/proc/$$/fd/255" 2> /dev/null
if [ "${realpath}" == "" ]; then
realpath="${G_STARTCMD}"
fi

不生成覆盖率的情况下:
+++ realpath /proc/3105/fd/255
++ local realpath= ++ '[' '' == '' ']'
++ realpath=/bin/bash
+++ basename /bin/bash
生成覆盖率的情况下
+++ realpath /proc/3760/fd/255
++ local 'realpath=/tmp/shellspec.1695279501.3544/kcov/ctr.d [specfiles]'
+++ echo kcov@/sf/vs/scripts-libs/file.sh@61@
++ '[' '/tmp/shellspec.1695279501.3544/kcov/ctr.d [specfiles]' == '' ']'
+++ echo kcov@/sf/vs/scripts-libs/file.sh@64@
++++ echo kcov@/sf/vs/scripts-libs/file.sh@64@
+++ basename '/tmp/shellspec.1695279501.3544/kcov/ctr.d [specfiles]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant