File tree Expand file tree Collapse file tree 7 files changed +16
-20
lines changed
Expand file tree Collapse file tree 7 files changed +16
-20
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,13 @@ npm start &
7676mock_pid=$!
7777echo " Mock started at pid: $mock_pid "
7878
79+ # Setup cleanup trap to ensure mock server is always stopped
80+ cleanup () {
81+ echo " Cleaning up mock server (pid: $mock_pid )"
82+ kill-rec $mock_pid 2> /dev/null || true
83+ }
84+ trap cleanup EXIT
85+
7986sleep 1
8087try=0
8188maxTries=10
8895
8996echo " Starting cpp_test with -mock and -auto flags"
9097cd " $( dirname " $testExe " ) "
98+
99+ # Capture exit code without triggering set -e
100+ set +e
91101" ./$( basename " $testExe " ) " -mock -auto
92102exitCode=$?
93-
94- kill-rec $mock_pid
103+ set -e
95104
96105exit $exitCode
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ params=
2424buildType=" Debug"
2525cleanFirst=false
2626
27- while [ ! -z $1 ]; do
27+ while [ -n " ${1 :- } " ]; do
2828 case $1 in
2929 --clean) cleanFirst=true;;
3030 --release) buildType=" Release" ;;
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ else()
128128 ${CURL_TARGET}
129129 ${THREADS_TARGET}
130130 )
131- set (SOURCE_ROOT ${CMAKE_SOURCE_DIR} /../..)
131+ set (SOURCE_ROOT ${CMAKE_SOURCE_DIR} /../..)
132132endif ()
133133
134134target_include_directories (${API_TEST_APP}
Original file line number Diff line number Diff line change 1919#pragma once
2020
2121#include " fireboltDemoBase.h"
22+ #include < limits>
2223
2324class ChooseInterface : public FireboltDemoBase
2425{
2526public:
2627 ChooseInterface ();
2728 ~ChooseInterface ();
28- // std::vector<std::string> methods() const { return names_; }
2929
3030 void runOption (const int index);
3131 void autoRun ();
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ void DeviceDemo::runOption(const int index)
3838
3939 std::cout << " Running Device method: " << key << std::endl;
4040
41- if (key == " Device.class " )
41+ if (key == " Device.deviceClass " )
4242 {
4343 Result<DeviceClass> r = Firebolt::IFireboltAccessor::Instance ().DeviceInterface ().deviceClass ();
4444 if (validateResult (r))
Original file line number Diff line number Diff line change @@ -28,7 +28,4 @@ class PresentationDemo : public FireboltDemoBase
2828 PresentationDemo ();
2929 ~PresentationDemo () = default ;
3030 void runOption (const int index);
31-
32- private:
33- // void triggerPresentationStateChange();
3431};
Original file line number Diff line number Diff line change @@ -104,17 +104,7 @@ void TextToSpeechDemo::runOption(const int index)
104104 std::cout << " Current state for speech ID '" << speechId << " ': " << (int )state << std::endl;
105105 }
106106 }
107- else if (key == " TextToSpeech.speechRate" )
108- {
109- SpeechId speechId = chooseSpeechIdFromConsole ();
110- Result<SpeechStateResponse> r = IFireboltAccessor::Instance ().TextToSpeechInterface ().getSpeechState (speechId);
111- if (validateResult (r))
112- {
113- const auto & ttsStatus = r.value ().ttsStatus ;
114- std::cout << " Current TTS status for speech ID '" << speechId << " ': " << ttsStatus << std::endl;
115- }
116- }
117- else if (key == " TextToSpeech.subscribeOnWillSpeak" )
107+ else if (key == " TextToSpeech.onWillSpeak" )
118108 {
119109 auto callback = [&](const TextToSpeech::SpeechIdEvent& event)
120110 { std::cout << " Will Speak notification received for Speech ID: " << event.speechId << std::endl; };
You can’t perform that action at this time.
0 commit comments