Skip to content
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ installer/
.venv/
.claude/
.clitests/
test-*/
test_results/
*.pid
*.log
Expand Down
33 changes: 23 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,17 +202,34 @@ PARALLEL_WIDTH ?= 2
WARMUP_FILTER = ImageWarmup

CONCURRENT_TEST_SUITES ?= \
TestCLIStop \
TestCLIRmRaceCondition \
TestCLIExportCommand
TestCLIAnonymousVolumes/ \
TestCLIExportCommand/ \
TestCLIImagesCommand/ \
TestCLINotFound/ \
TestCLIRmRaceCondition/ \
TestCLIStop/ \
TestCLIVolumes/
CONCURRENT_FILTER = $(subst $(space),|,$(strip $(CONCURRENT_TEST_SUITES)))

GLOBAL_FILTER = DemoGlobalTests
GLOBAL_TEST_SUITES ?= \
TestCLIBuilderEnvOnlySerial/ \
TestCLIBuilderLifecycleSerial/ \
TestCLIBuilderLocalOutputSerial/ \
TestCLIBuilderSerial/ \
TestCLIBuilderTarExportSerial/ \
TestCLIKernelSetSerial/ \
TestCLISystemDFSerial/ \
TestCLIVolumesSerial/
GLOBAL_FILTER = $(subst $(space),|,$(strip $(GLOBAL_TEST_SUITES)))

INTEGRATION_SWIFT_EXTRA ?=
INTEGRATION_POST_TEST ?=

PRESERVE_KERNELS ?= false
# Default scratch root under the project directory so container build can access context
# subdirectories (macOS restricts access to /var/folders from the container binary).
# Override with SCRATCH_ROOT=/your/path on the command line.
SCRATCH_ROOT ?= $(ROOT_DIR)/.test-scratch

define RUN_INTEGRATION
@echo Ensuring apiserver stopped before the CLI integration tests...
Expand All @@ -231,13 +248,14 @@ define RUN_INTEGRATION
@bin/container --debug system start --timeout 60 --enable-kernel-install $(SYSTEM_START_OPTS) && \
{ \
CLITEST_LOG_ROOT=$(LOG_ROOT) && export CLITEST_LOG_ROOT ; \
CLITEST_SCRATCH_ROOT=$(SCRATCH_ROOT) && export CLITEST_SCRATCH_ROOT ; \
CONTAINER_CLI_PATH=$(ROOT_DIR)/bin/container && export CONTAINER_CLI_PATH ; \
echo "==> Warmup pass" && \
$(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --filter "$(WARMUP_FILTER)" && \
echo "==> Concurrent pass (width=$(PARALLEL_WIDTH))" && \
$(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --experimental-maximum-parallelization-width $(PARALLEL_WIDTH) --filter "$(CONCURRENT_FILTER)" && \
echo "==> Global pass (serial)" && \
$(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --filter "$(GLOBAL_FILTER)" ; \
$(SWIFT) test $(INTEGRATION_SWIFT_EXTRA) -c $(BUILD_CONFIGURATION) $(SWIFT_CONFIGURATION) --experimental-maximum-parallelization-width 1 --filter "$(GLOBAL_FILTER)" ; \
exit_code=$$? ; \
$(INTEGRATION_POST_TEST) \
echo Ensuring apiserver stopped after the CLI integration tests ; \
Expand Down Expand Up @@ -272,15 +290,10 @@ INTEGRATION_TEST_SUITES ?= \
TestCLIPruneCommand \
TestCLIRegistry \
TestCLIStatsCommand \
TestCLIImagesCommand \
TestCLIRunBase \
TestCLIRunInitImage \
TestCLIBuildBase \
TestCLIVolumes \
TestCLIKernelSet \
TestCLIAnonymousVolumes \
TestCLINotFound \
TestCLISystemDF \
TestCLIMachineCommand \
TestCLIMachineRuntime \
TestCLINoParallelCases \
Expand Down
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ let package = Package(
.product(name: "SystemPackage", package: "swift-system"),
.product(name: "ContainerizationArchive", package: "containerization"),
.product(name: "ContainerizationExtras", package: "containerization"),
.product(name: "ContainerizationOCI", package: "containerization"),
"ContainerAPIClient",
"ContainerLog",
"ContainerPersistence",
"ContainerResource",
"Yams",
],
Expand Down
Loading