From 05a5073d90538073dc5c78e3ce2f31e1edc1c181 Mon Sep 17 00:00:00 2001 From: "Timmer, Daan" Date: Fri, 30 Jan 2026 11:59:50 +0000 Subject: [PATCH] feat: update amp-cucumber-cpp-runner to messages branch --- .devcontainer/devcontainer.json | 5 ++++- .github/workflows/ci.yml | 2 +- .vscode/settings.json | 21 ++++++++++++++++++++ CMakeLists.txt | 4 ++-- integration_test/runner/Hooks.cpp | 28 +++++++++++++-------------- integration_test/runner/StepsGpio.cpp | 15 +++++++++----- integration_test/runner/StepsUart.cpp | 2 +- 7 files changed, 53 insertions(+), 24 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6f0e5d7f3..430ee5df0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,7 +10,10 @@ "postCreateCommand": "git submodule update --init --recursive", "customizations": { "vscode": { - "extensions": ["ms-vscode.vscode-serial-monitor"] + "extensions": [ + "ms-vscode.vscode-serial-monitor", + "alexkrechik.cucumberautocomplete" + ] } } } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34665d298..d319ba0d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,7 +179,7 @@ jobs: - run: mv hal_st-*-Linux/* install/ - run: ls install/bin - run: install/bin/integration_test.flasher tcp://localhost:1234/target/echo/programmer integration_test.tested.bin - - run: install/bin/integration_test.runner run --feature integration_test/runner/features --report console --target tcp://localhost:1234/target/echo/programmer + - run: install/bin/integration_test.runner --format pretty --target tcp://localhost:1234/target/echo/programmer -- integration_test/runner/features - if: always() run: docker logs flex_container - name: Remove flex container diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..4c657eb00 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,21 @@ +{ + "cucumberautocomplete.steps": [ + "integration_test/runner/*.cpp" + ], + "cucumberautocomplete.stepsInvariants": true, + "cucumberautocomplete.gherkinDefinitionPart": "(GIVEN|WHEN|THEN|STEP)\\(", + "cucumberautocomplete.customParameters": [ + { + "parameter": "R\"(", + "value": "\"" + }, + { + "parameter": ")\"", + "value": "\"" + }, + { + "parameter": "{PinState}", + "value": "(high|low)" + } + ] +} diff --git a/CMakeLists.txt b/CMakeLists.txt index eada4f539..7d51030e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,9 +34,9 @@ if (HALST_STANDALONE) FetchContent_Declare( cucumber-cpp-runner GIT_REPOSITORY https://github.com/philips-software/amp-cucumber-cpp-runner.git - GIT_TAG 1c7fcde3dd140ce3f9c7327e66e2a73344625328 # unreleased + GIT_TAG 7aecccc930d650154ca877b1edaa0760f4ead9b7 # unreleased ) - + set(CCR_FETCH_DEPS On) FetchContent_MakeAvailable(cucumber-cpp-runner) endif() endif() diff --git a/integration_test/runner/Hooks.cpp b/integration_test/runner/Hooks.cpp index 1c951a88c..19d00bbb1 100644 --- a/integration_test/runner/Hooks.cpp +++ b/integration_test/runner/Hooks.cpp @@ -1,4 +1,4 @@ -#include "cucumber_cpp/library/Hooks.hpp" +#include "cucumber_cpp/CucumberCpp.hpp" #include "generated/echo/Testing.pb.hpp" #include "generated/echo/TracingTesting.pb.hpp" #include "hal/generic/TimerServiceGeneric.hpp" @@ -24,9 +24,9 @@ HOOK_BEFORE_ALL() services::GlobalTracer().Trace() << "Opening ECHO connection to: " << target; context.SetShared(application::OpenEcho(target, context.Get())); - //auto tracingEcho = application::OpenTracingEcho(target, context.Get(), services::GlobalTracer()); - //context.SetShared(tracingEcho.first); - //context.SetShared(tracingEcho.second); + // auto tracingEcho = application::OpenTracingEcho(target, context.Get(), services::GlobalTracer()); + // context.SetShared(tracingEcho.first); + // context.SetShared(tracingEcho.second); services::GlobalTracer().Trace() << "Established ECHO connection"; } @@ -41,16 +41,16 @@ HOOK_BEFORE_ALL() context.Emplace(context.Get()); context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); - //context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); + // context.Emplace(context.Get()); } HOOK_BEFORE_SCENARIO() diff --git a/integration_test/runner/StepsGpio.cpp b/integration_test/runner/StepsGpio.cpp index f4865e8fa..9f157cddf 100644 --- a/integration_test/runner/StepsGpio.cpp +++ b/integration_test/runner/StepsGpio.cpp @@ -1,4 +1,4 @@ -#include "cucumber_cpp/library/Steps.hpp" +#include "cucumber_cpp/CucumberCpp.hpp" #include "generated/echo/Testing.pb.hpp" #include "infra/timer/Waiting.hpp" #include "integration_test/logic/Tested.hpp" @@ -40,6 +40,11 @@ namespace bool testerGpio = false; bool testedGpio = false; }; + + PARAMETER(std::string, "PinState", "(high|low)") + { + return group.value.value(); + } } STEP("gpio peripherals are enabled") @@ -77,7 +82,7 @@ STEP("gpio peripherals are enabled") context.Emplace(context.Get()); } -STEP("the tester sets its output pin (high|low)", (std::string state)) +STEP("the tester sets its output pin {PinState}", (std::string state)) { context.EmplaceAt("state", ConvertPinState(state)); @@ -91,7 +96,7 @@ STEP("the tester sets its output pin (high|low)", (std::string state)) })); } -STEP("the tester sees a (high|low) value", (std::string state)) +STEP("the tester sees a {PinState} value", (std::string state)) { context.EmplaceAt("state", ConvertPinState(state)); @@ -101,7 +106,7 @@ STEP("the tester sees a (high|low) value", (std::string state)) })); } -STEP("the tested sets its output pin (high|low)", (std::string state)) +STEP("the tested sets its output pin {PinState}", (std::string state)) { context.EmplaceAt("state", ConvertPinState(state)); @@ -115,7 +120,7 @@ STEP("the tested sets its output pin (high|low)", (std::string state)) })); } -STEP("the tested sees a (high|low) value", (std::string state)) +STEP("the tested sees a {PinState} value", (std::string state)) { context.EmplaceAt("state", ConvertPinState(state)); diff --git a/integration_test/runner/StepsUart.cpp b/integration_test/runner/StepsUart.cpp index a736428c7..eecce52eb 100644 --- a/integration_test/runner/StepsUart.cpp +++ b/integration_test/runner/StepsUart.cpp @@ -1,4 +1,4 @@ -#include "cucumber_cpp/library/Steps.hpp" +#include "cucumber_cpp/CucumberCpp.hpp" #include "generated/echo/Testing.pb.hpp" #include "infra/timer/Waiting.hpp" #include "integration_test/logic/Tested.hpp"