diff --git a/scripts/dev_cli.sh b/scripts/dev_cli.sh index 310826858..4c11bc038 100755 --- a/scripts/dev_cli.sh +++ b/scripts/dev_cli.sh @@ -158,12 +158,13 @@ cmd_help() { echo "" echo " tests [--unit|--cargo|--all] [--libc musl|gnu] [-- []]" echo " Run the Cloud Hypervisor tests." - echo " --unit Run the unit tests." - echo " --cargo Run the cargo tests." - echo " --integration Run the integration tests." - echo " --integration-sgx Run the SGX integration tests." - echo " --libc Select the C library Cloud Hypervisor will be built against. Default is gnu" - echo " --all Run all tests." + echo " --unit Run the unit tests." + echo " --cargo Run the cargo tests." + echo " --integration Run the integration tests." + echo " --integration-sgx Run the SGX integration tests." + echo " --integration-windows Run the Windows guest integration tests." + echo " --libc Select the C library Cloud Hypervisor will be built against. Default is gnu" + echo " --all Run all tests." echo "" echo " build-container [--type]" echo " Build the Cloud Hypervisor container." @@ -248,6 +249,7 @@ cmd_tests() { cargo=false integration=false integration_sgx=false + integration_windows=false libc="gnu" while [ $# -gt 0 ]; do @@ -257,6 +259,7 @@ cmd_tests() { "--cargo") { cargo=true; } ;; "--integration") { integration=true; } ;; "--integration-sgx") { integration_sgx=true; } ;; + "--integration-windows") { integration_windows=true; } ;; "--libc") shift [[ "$1" =~ ^(musl|gnu)$ ]] || \ @@ -344,6 +347,24 @@ cmd_tests() { ./scripts/run_integration_tests_sgx.sh "$@" || fix_dir_perms $? || exit $? fi + if [ "$integration_windows" = true ] ; then + say "Running integration tests for $target..." + $DOCKER_RUNTIME run \ + --workdir "$CTR_CLH_ROOT_DIR" \ + --rm \ + --privileged \ + --security-opt seccomp=unconfined \ + --ipc=host \ + --net="$CTR_CLH_NET" \ + --mount type=tmpfs,destination=/tmp \ + --volume /dev:/dev \ + --volume "$CLH_ROOT_DIR:$CTR_CLH_ROOT_DIR" \ + --volume "$CLH_INTEGRATION_WORKLOADS:$CTR_CLH_INTEGRATION_WORKLOADS" \ + --env USER="root" \ + --env CH_LIBC="${libc}" \ + "$CTR_IMAGE" \ + ./scripts/run_integration_tests_windows.sh "$@" || fix_dir_perms $? || exit $? + fi fix_dir_perms $? }