@@ -9,7 +9,9 @@ RIE_MAX_CONCURRENCY ?= 4
99OUTPUT_DIR ?= /tmp/var-task
1010EXAMPLES ?=
1111
12- .PHONY : pr-check integration-tests check-event-features fmt build-examples test-rie test-rie-lmi nuke
12+ .PHONY : help pr-check integration-tests check-event-features fmt build-examples test-rie test-rie-lmi nuke test-dockerized
13+
14+ .DEFAULT_GOAL := help
1315
1416define uppercase
1517$(shell sed -r 's/(^|-) (\w)/\U\2/g' <<< $(1 ) )
@@ -119,13 +121,55 @@ fmt:
119121build-examples :
120122 ./scripts/build-examples.sh
121123
124+ test-dockerized :
125+ @echo " Running dockerized tests locally..."
126+ @echo " Building Docker image..."
127+ docker build . -t local/test -f Dockerfile.rie
128+ @echo " Setting up containerized test runner..."
129+ @if [ ! -d " .test-runner" ]; then \
130+ echo " Cloning containerized-test-runner-for-aws-lambda..." ; \
131+ git clone --quiet https://github.com/aws/containerized-test-runner-for-aws-lambda.git .test-runner; \
132+ fi
133+ @echo " Building test runner Docker image..."
134+ @docker build -t test-runner:local -f Dockerfile.test-runner .
135+ @echo " Running tests in Docker..."
136+ @echo " Running actual tests..."
137+ @docker run --rm \
138+ -e DOCKER_API_VERSION=1.44 \
139+ -v /var/run/docker.sock:/var/run/docker.sock \
140+ -v " $( CURDIR) /tests/dockerized:/tests:ro" \
141+ test-runner:local \
142+ --test-image local/test \
143+ --debug \
144+ /tests/* .json
145+
122146test-rie :
123147 ./scripts/test-rie.sh
124148
125149nuke :
126150 docker kill $$(docker ps -q )
127151
128-
129152# Run RIE in Lambda Managed Instance (LMI) mode with concurrent polling.
130153test-rie-lmi :
131154 RIE_MAX_CONCURRENCY=$(RIE_MAX_CONCURRENCY ) ./scripts/test-rie.sh $(EXAMPLE )
155+
156+ help : # # Show this help message
157+ @echo ' Usage: make [target]'
158+ @echo ' '
159+ @echo ' Available targets:'
160+ @echo ' pr-check Run pre-commit checks (fmt, clippy, tests)'
161+ @echo ' integration-tests Build and run AWS integration tests'
162+ @echo ' check-event-features Test individual event features'
163+ @echo ' fmt Format code with cargo fmt'
164+ @echo ' build-examples Build example Lambda functions'
165+ @echo ' Usage: EXAMPLES="basic-lambda" make build-examples'
166+ @echo ' test-rie Test Lambda with Runtime Interface Emulator'
167+ @echo ' test-rie-lmi Test RIE in Lambda Managed Instance mode'
168+ @echo ' Usage: RIE_MAX_CONCURRENCY=4 make test-rie-lmi'
169+ @echo ' test-dockerized Run dockerized test harness'
170+ @echo ' nuke Kill all running Docker containers'
171+ @echo ' '
172+ @echo ' Environment variables:'
173+ @echo ' EXAMPLES Space-separated list of examples to build'
174+ @echo ' OUTPUT_DIR Directory for built binaries (default: /tmp/var-task)'
175+ @echo ' RIE_MAX_CONCURRENCY Max concurrent Lambda invocations for LMI mode'
0 commit comments