Replies: 3 comments
-
Are you running the test on your Mac Terminal directly without ssh shell or docker? |
Beta Was this translation helpful? Give feedback.
0 replies
-
It seems that MacOS does not have the file. You can do as follows (see #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
void __coverage__(int line, int col) {
char exe[1024];
#ifdef __APPLE__
uint32_t size;
_NSGetExecutablePath(exe, &size);
#else
int ret = readlink("/proc/self/exe", exe, sizeof(exe) - 1);
if (ret == -1) {
fprintf(stderr, "Error: Cannot find /proc/self/exe\n");
exit(1);
}
exe[ret] = 0;
#endif
...
} However, please notice that
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Running it on Mac gave some linker errors as well. So I did not pursue it any further. Thank you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I run the tests, I am getting an error saying
"Error: Cannot find /proc/self/exe"
I am working on MacOS 10.14
Any solution to this?
Beta Was this translation helpful? Give feedback.
All reactions