Make the test phase dash compatible (#26)
Some checks failed
Build / build-mac (push) Has been cancelled
Build / build-linux (push) Has been cancelled
Build / build-win (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled

In Makefile.am test phase substitutes
`[[`` with POSIX shell `test`` command.
This commit is contained in:
Zelin2001 2025-08-21 00:27:33 +08:00 • committed by GitHub
parent 09897fcdb3
commit 4c504ab325
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -512,7 +512,7 @@ endif
echo RUN > bench/disk1/RUN-CHMOD
if HAVE_POSIX
# Doesn't run this test as root because the root user override permissions
if [[ $$EUID -ne 0 ]]; then \
if test "$$EUID" -ne 0; then \
$(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/RUN-CHMOD" --test-expect-failure sync; \
fi
endif
@ -532,7 +532,7 @@ endif
echo HASH > bench/disk1/HASH-CHMOD
if HAVE_POSIX
# Doesn't run this test as root because the root user override permissions
if [[ $$EUID -ne 0 ]]; then \
if test "$$EUID" -ne 0; then \
$(FAILENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) --test-run "chmod a-r bench/disk1/HASH-CHMOD" --test-expect-failure -h sync; \
fi
endif