Skip to content
Draft
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
27 changes: 22 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,29 @@ test-functional:
done

# Calls live services, so it needs AWS credentials.
# Each project tests its own service, so projects run at once. -k runs every project
# even after one fails; make still exits non-zero if any failed.
INTEGRATION_JOBS ?= 4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is log output handled by parallelization? CI logs need to be readable

INTEGRATION_PROJECTS := $(filter-out $(INTEGRATION_SKIP),$(patsubst %/tests/integration,%,$(wildcard $(addsuffix /tests/integration,$(PROJECTS)))))
# Keeps each project's output together; needs GNU make 4.0 or later.
OUTPUT_SYNC := $(if $(filter output-sync,$(.FEATURES)),--output-sync=target)

test-integration:
@set -e; for p in $(filter-out $(INTEGRATION_SKIP),$(PROJECTS)); do \
[ -d $$p/tests/integration ] || continue; \
echo "== $$p"; \
$(UV_RUN) $$p --group test --all-extras pytest $$p/tests/integration; \
done
@start=$$(date +%s); \
$(MAKE) --no-print-directory -k -j$(INTEGRATION_JOBS) $(OUTPUT_SYNC) $(addprefix integration/,$(INTEGRATION_PROJECTS)); \
status=$$?; \
echo "== test-integration finished in $$(( $$(date +%s) - start ))s (exit $$status)"; \
exit $$status

integration/%: FORCE
@start=$$(date +%s); \
echo "== $*"; \
$(UV_RUN) $* --group test --all-extras pytest $*/tests/integration --durations=5; \
status=$$?; \
echo "== $* finished in $$(( $$(date +%s) - start ))s (exit $$status)"; \
exit $$status

FORCE:

# Regenerate every client from codegen/aws-models with codegen built from the
# smithy-python commit in codegen/smithy-python.toml. Each client is cleared first,
Expand Down