aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fuse_integration/posix_Makefile43
1 files changed, 33 insertions, 10 deletions
diff --git a/test/fuse_integration/posix_Makefile b/test/fuse_integration/posix_Makefile
index 7b74c984e..c2fece071 100644
--- a/test/fuse_integration/posix_Makefile
+++ b/test/fuse_integration/posix_Makefile
@@ -72,14 +72,25 @@ setup-reports:
setup-external-tools: setup-reports
@echo "$(BLUE)🛠️ Setting up external POSIX test tools...$(RESET)"
- @$(MAKE) setup-pjdfstest
- @$(MAKE) setup-nfstest
- @$(MAKE) setup-fio
+ @$(MAKE) setup-pjdfstest || echo "$(YELLOW)[WARNING] pjdfstest setup failed - continuing without it$(RESET)"
+ @$(MAKE) setup-nfstest || echo "$(YELLOW)[WARNING] nfstest setup failed - continuing without it$(RESET)"
+ @$(MAKE) setup-fio || echo "$(YELLOW)[WARNING] FIO setup failed - continuing without it$(RESET)"
# External tools setup
setup-pjdfstest:
@if [ ! -d "$(EXTERNAL_TOOLS_DIR)/pjdfstest" ]; then \
echo "$(BLUE)[SETUP] Setting up pjdfstest...$(RESET)"; \
+ if ! command -v autoreconf >/dev/null 2>&1; then \
+ echo "$(YELLOW)[WARNING] autoreconf not found - installing build-essential...$(RESET)"; \
+ if command -v apt-get >/dev/null 2>&1; then \
+ sudo apt-get update && sudo apt-get install -y build-essential autoconf automake libtool; \
+ elif command -v yum >/dev/null 2>&1; then \
+ sudo yum install -y gcc make autoconf automake libtool; \
+ else \
+ echo "$(YELLOW)[WARNING] Please install build tools manually$(RESET)"; \
+ exit 1; \
+ fi; \
+ fi; \
cd $(EXTERNAL_TOOLS_DIR) && \
git clone https://github.com/pjd/pjdfstest.git && \
cd pjdfstest && \
@@ -125,16 +136,22 @@ test-posix-extended: check-prereqs setup-reports
ifneq ($(TEST_MOUNT_POINT),)
@echo "$(BLUE)Using external mount point: $(TEST_MOUNT_POINT)$(RESET)"
endif
- @$(GO_TEST_PREFIX) go test -v -timeout $(TEST_TIMEOUT) -run TestPOSIXExtended $(POSIX_EXTENDED_TESTS) 2>&1 | \
+ @$(GO_TEST_PREFIX) go test -v -timeout $(TEST_TIMEOUT) -run TestPOSIXExtended . 2>&1 | \
tee $(REPORT_DIR)/posix_extended_results.log
-test-posix-external: check-prereqs setup-reports setup-external-tools
+test-posix-external: check-prereqs setup-reports
@echo "$(CYAN)[TEST] Running external POSIX test suite integration...$(RESET)"
ifneq ($(TEST_MOUNT_POINT),)
@echo "$(BLUE)Using external mount point: $(TEST_MOUNT_POINT)$(RESET)"
endif
- @$(GO_TEST_PREFIX) go test -v -timeout $(TEST_TIMEOUT) -run TestExternalPOSIXSuites $(POSIX_EXTERNAL_TESTS) 2>&1 | \
- tee $(REPORT_DIR)/posix_external_results.log
+ @if [ -d "$(EXTERNAL_TOOLS_DIR)/pjdfstest" ] || command -v nfstest_posix >/dev/null 2>&1; then \
+ echo "$(GREEN)[OK] External tools available - running external tests$(RESET)"; \
+ $(GO_TEST_PREFIX) go test -v -timeout $(TEST_TIMEOUT) -run TestExternalPOSIXSuites . 2>&1 | \
+ tee $(REPORT_DIR)/posix_external_results.log; \
+ else \
+ echo "$(YELLOW)[WARNING] External tools not available - skipping external tests$(RESET)"; \
+ echo "External tests skipped - tools not available" > $(REPORT_DIR)/posix_external_results.log; \
+ fi
# Comprehensive test suites
test-posix-full: test-posix-basic test-posix-extended test-posix-external
@@ -155,9 +172,15 @@ test-posix-stress: check-prereqs setup-reports
ifneq ($(TEST_MOUNT_POINT),)
@echo "$(BLUE)Using external mount point: $(TEST_MOUNT_POINT)$(RESET)"
endif
- @$(GO_TEST_PREFIX) go test -v -timeout $(TEST_TIMEOUT) \
- -run "TestExternalPOSIXSuites/CustomPOSIXTests" \
- $(POSIX_EXTERNAL_TESTS) 2>&1 | tee $(REPORT_DIR)/posix_stress_results.log
+ @if [ -d "$(EXTERNAL_TOOLS_DIR)/pjdfstest" ] || command -v nfstest_posix >/dev/null 2>&1; then \
+ echo "$(GREEN)[OK] External tools available - running stress tests$(RESET)"; \
+ $(GO_TEST_PREFIX) go test -v -timeout $(TEST_TIMEOUT) \
+ -run "TestExternalPOSIXSuites/CustomPOSIXTests" \
+ . 2>&1 | tee $(REPORT_DIR)/posix_stress_results.log; \
+ else \
+ echo "$(YELLOW)[WARNING] External tools not available - skipping stress tests$(RESET)"; \
+ echo "Stress tests skipped - tools not available" > $(REPORT_DIR)/posix_stress_results.log; \
+ fi
# Performance and benchmarks
benchmark-posix: check-prereqs setup-reports