Skip to content
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/wc-integration-test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ jobs:
persist-credentials: false
- run: echo "arch=$(echo "${RUNNER_ARCH}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
id: runner-arch
- run: |
set -Eeuo pipefail
bats --formatter junit "${TEST_FILE}" | tee "test-report-${IMAGE_BASENAME}-${RUNNER_ARCH}.xml"
- run: bats --formatter junit "${TEST_FILE}" | tee "test-report-${IMAGE_BASENAME}-${RUNNER_ARCH}.xml"
env:
IMAGE_BASENAME: ${{ inputs.image-basename }}
TEST_FILE: ${{ inputs.test-file }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/wc-integration-test-podman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ jobs:
id: runner-arch
- name: Run integration tests using Podman
run: |
set -Eeuo pipefail

podman run --rm \
--network=host \
-v "${WORKSPACE}:${WORKSPACE}" \
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"devDependencies": {
"@playwright/test": "^1.58.2",
"@types/node": "^25.3.5",
"@types/node": "^25.5.0",
"dotenv": "^17.3.1",
"nodemon": "^3.1.14",
"otpauth": "^9.5.0",
Expand Down
28 changes: 13 additions & 15 deletions test/cpp/integration-tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ teardown() {

for TOOL in clang clang++ clang-cl clang-format clang-tidy; do
INSTALLED_VERSION=$($TOOL --version | to_semver)
assert_equal_print "$EXPECTED_VERSION" "$INSTALLED_VERSION" "Tool '${TOOL}' version"
assert_equal $INSTALLED_VERSION $EXPECTED_VERSION
done
}

Expand All @@ -44,31 +44,38 @@ teardown() {

for TOOL in cc gcc c++ g++ gcov; do
INSTALLED_VERSION=$($TOOL --version | to_semver)
assert_equal_print "$EXPECTED_VERSION" "$INSTALLED_VERSION" "Tool '${TOOL}' version"
assert_equal "$INSTALLED_VERSION" "$EXPECTED_VERSION"
done
}

# bats test_tags=Compatibility,Version,HostGCCArmGCC
@test "host and embedded gcc toolchain versions should be the same major and minor version" {
EXPECTED_MAJOR_MINOR_VERSION=$(get_expected_semver_for g++ | cut -d. -f1,2)
INSTALLED_MAJOR_MINOR_VERSION=$(arm-none-eabi-gcc -dumpfullversion | cut -d. -f1,2)
assert_equal_print "$EXPECTED_MAJOR_MINOR_VERSION" "$INSTALLED_MAJOR_MINOR_VERSION" "Host and ARM GCC major and minor version"
assert_equal "$INSTALLED_MAJOR_MINOR_VERSION" "$EXPECTED_MAJOR_MINOR_VERSION"
}

# bats test_tags=Compatibility,Version,Tools
@test "supporting tool versions should be aligned with expected versions" {
for TOOL in gdb gdb-multiarch git ninja; do
for TOOL in gdb gdb-multiarch; do
EXPECTED_VERSION=$(get_expected_version_for ${TOOL})
INSTALLED_VERSION=$(${TOOL} --version | grep -o '[0-9]\+\.[0-9]\+' | head -n1)

assert_equal "$INSTALLED_VERSION" "$EXPECTED_VERSION"
done

for TOOL in git ninja; do
EXPECTED_VERSION=$(get_expected_semver_for ${TOOL})
INSTALLED_VERSION=$(${TOOL} --version | to_semver)

assert_equal_print "$EXPECTED_VERSION" "$INSTALLED_VERSION" "Tool '${TOOL}' version"
assert_equal "$INSTALLED_VERSION" "$EXPECTED_VERSION"
done

for TOOL in cmake conan; do
EXPECTED_VERSION=$(cat ${BATS_TEST_DIRNAME}/../../.devcontainer/cpp/requirements.in | grep ${TOOL} | to_semver)
INSTALLED_VERSION=$(${TOOL} --version | to_semver)

assert_equal_print "$EXPECTED_VERSION" "$INSTALLED_VERSION" "Tool '${TOOL}' version"
assert_equal "$INSTALLED_VERSION" "$EXPECTED_VERSION"
done
}

Expand Down Expand Up @@ -300,12 +307,3 @@ function install_win_sdk_when_ci_set() {
install_win_sdk
fi
}

function assert_equal_print() {
local EXPECTED=${1:?}
local ACTUAL=${2:?}
local MESSAGE=${3:-"Expecting values to be equal"}

echo "# ${MESSAGE} expected(${EXPECTED}) actual(${ACTUAL})" >&3
assert_equal ${ACTUAL} ${EXPECTED}
}
Loading