diff --git a/features/test/llvm/llvm_16.sh b/features/test/llvm/llvm_17.sh similarity index 85% rename from features/test/llvm/llvm_16.sh rename to features/test/llvm/llvm_17.sh index f030cfaf..da3494da 100644 --- a/features/test/llvm/llvm_16.sh +++ b/features/test/llvm/llvm_17.sh @@ -16,9 +16,9 @@ source dev-container-features-test-lib # The 'check' command comes from the dev-container-features-test-lib. echo "LLVM_VERSION: $LLVM_VERSION"; -check "version" bash -c "echo '$LLVM_VERSION' | grep '16'"; +check "version" bash -c "echo '$LLVM_VERSION' | grep '17'"; check "clang version" bash -c "clang --version | grep 'clang version $LLVM_VERSION'"; -check "apt repo" grep "llvm-toolchain-$(lsb_release -cs)-16 main" $(find /etc/apt -type f -name '*.list'); +check "apt repo" grep "llvm-toolchain-$(lsb_release -cs)-17 main" $(find /etc/apt -type f -name '*.list'); # Report result # If any of the checks above exited with a non-zero exit code, the test will fail. diff --git a/features/test/llvm/llvm_dev.sh b/features/test/llvm/llvm_dev.sh new file mode 100644 index 00000000..b44906cf --- /dev/null +++ b/features/test/llvm/llvm_dev.sh @@ -0,0 +1,24 @@ +#! /usr/bin/env bash + +# This test can be run with the following command (from the root of this repo) +# ``` +# npx --package=@devcontainers/cli -c 'devcontainer features test \ +# --features llvm \ +# --base-image ubuntu:22.04 .' +# ``` + +set -e + +# Optional: Import test library bundled with the devcontainer CLI +source dev-container-features-test-lib + +# Feature-specific tests +# The 'check' command comes from the dev-container-features-test-lib. + +echo "LLVM_VERSION: $LLVM_VERSION"; +check "clang version" bash -c "clang --version | grep 'clang version $LLVM_VERSION'"; +check "apt repo" grep "llvm-toolchain-$(lsb_release -cs) main" $(find /etc/apt -type f -name '*.list'); + +# Report result +# If any of the checks above exited with a non-zero exit code, the test will fail. +reportResults