When running the bats-mock tests, two of the mock_create tests fail:
not ok 1 mock_create creates a program
# (in test file test/mock_create.bats, line 12)
# `[[ -x "${output}" ]]' failed
ok 2 mock_create names the program uniquely
not ok 3 mock_create creates a program in BATS_TMPDIR
# (in test file test/mock_create.bats, line 27)
# `[[ "$(dirname ${output})" = "${BATS_TMPDIR}" ]]' failed
...
The problem occurs when TMPDIR is unset (and thus /tmp is used) or if TMPDIR is set, and in either case the directory to which it refers contains directories that find cannot access.
When running the bats-mock tests, two of the mock_create tests fail:
build_test_fail.log
Experimentation has found that if TMPDIR is set to a directory without any inaccessible directories, e.g.:
Then the tests pass:
build_test_pass.log
The problem occurs when
TMPDIR
is unset (and thus/tmp
is used) or ifTMPDIR
is set, and in either case the directory to which it refers contains directories thatfind
cannot access.