Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,30 @@ MVN := mvn
# ---------------------------------------------------------------------------
# Targets
# ---------------------------------------------------------------------------
.PHONY: help setup compile test package clean
# Integration test class patterns for -Dtest (simple class name globs, not ANT paths)
INTEGRATION_TESTS = Real*Test,AzureIntegrationTest,AzureOAuthTokenTest

.PHONY: help setup compile test test-cloud test-all package clean

help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'

setup: ## Install/verify development dependencies (Java 11, Maven, Rust, protoc)
./scripts/setup.sh

compile: ## Compile sources (Java + Rust native via cargo)
$(MVN) clean compile

test: ## Run JUnit 5 tests
test: ## Run unit tests (excludes cloud/Docker integration tests)
$(MVN) test

test-cloud: ## Run cloud/Docker integration tests only (requires credentials/Docker)
$(MVN) test -Dtest="$(INTEGRATION_TESTS)" -DfailIfNoTests=false

test-all: ## Run all tests (unit + cloud/Docker integration)
$(MVN) test -Pintegration-tests

package: ## Build JAR, skip tests (mvn clean package -DskipTests)
$(MVN) clean package -DskipTests

Expand Down
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@
<forkCount>1</forkCount>
<!-- Set test execution order to be predictable -->
<runOrder>filesystem</runOrder>
<!-- Exclude cloud/Docker integration tests by default.
Run with: mvn test -Pintegration-tests -->
<excludes>
<exclude>**/Real*Test.java</exclude>
<exclude>**/AzureIntegrationTest.java</exclude>
<exclude>**/AzureOAuthTokenTest.java</exclude>
</excludes>
<!-- Enable native access for JNI operations (Java 17+ only; see jdk17plus profile) -->
<argLine>${surefire.argLine}</argLine>
</configuration>
Expand Down Expand Up @@ -562,6 +569,23 @@
</build>
</profile>

<!-- Integration tests profile - includes cloud/Docker tests excluded by default.
Activate with: mvn test -Pintegration-tests -->
<profile>
<id>integration-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes combine.self="override" />
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- Enable native access flag only on Java 17+ (flag does not exist on Java 11) -->
<profile>
<id>jdk17plus-native-access</id>
Expand Down