You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running retdec-tests-runner.sh on macOS, it prints
Running all unit tests in retdec/install/bin ...
find: -executable: unknown primary or operator
The script then ends with return code 0 and no tests are run. This can be also seen on Travis CI (e.g. here). Since the script exits with 0, it causes the job to succeed even though it should have failed.
It is expected that the tests should run, e.g. retdec-tests-runner.sh on macOS should print
Running all unit tests in retdec/install/bin ...
retdec-tests-bin2llvmir
[ PASSED ] 437 tests.
retdec-tests-capstone2llvmir
[ PASSED ] 3069 tests.
...
Just like on Linux.
The text was updated successfully, but these errors were encountered:
On macOS, find does not support the '-executable' parameter (#238). Therefore,
on macOS, we have to use '-perm +111'. To explain, + means "any of these bits"
and 111 is the octal representation for the executable bit on owner, group, and
other. Unfortunately, we cannot use '-perm +111' on all systems because find on
Linux/MSYS2 does not support +. It supports only /, but this is not supported
by find on macOS... Hence, we need an if.
Fixed in def3bcd. Also, in d28767d, I have updated the script to exit with 1 if not tests run. This is better than exiting with 0, which was the original behavior.
Details
As the error message from the issue description suggests, on macOS, find does not support the -executable parameter. Therefore, on macOS, we have to use -perm +111. To explain, + means "any of these bits" and 111 is the octal representation for the executable bit on owner, group, and other. Unfortunately, we cannot use -perm +111 on all systems because find on Linux/MSYS2 does not support +. It supports only /, but this is not supported by find on macOS... Hence, we need an if.
When running
retdec-tests-runner.sh
on macOS, it printsThe script then ends with return code 0 and no tests are run. This can be also seen on Travis CI (e.g. here). Since the script exits with 0, it causes the job to succeed even though it should have failed.
It is expected that the tests should run, e.g.
retdec-tests-runner.sh
on macOS should printJust like on Linux.
The text was updated successfully, but these errors were encountered: