mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-16 23:19:31 +00:00
This is a patch for the testing process that remove dependency on bash shell. Closes: https://bugs.gentoo.org/927538 Signed-off-by: Li Ze-Lin <lizl2023@ion.ac.cn> Part-of: https://github.com/gentoo/gentoo/pull/43379 Closes: https://github.com/gentoo/gentoo/pull/43379 Signed-off-by: Sam James <sam@gentoo.org>
23 lines
859 B
Diff
23 lines
859 B
Diff
Replace conditional expression with `test`
|
|
to ensure compatibility with different shell environments.
|
|
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -512,7 +512,7 @@
|
|
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 @@
|
|
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
|