Skip to content

Commit da0f074

Browse files
committed
PR comments
1 parent f3e2c98 commit da0f074

File tree

7 files changed

+16
-20
lines changed

7 files changed

+16
-20
lines changed

.github/scripts/run-cpp-test.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ npm start &
7676
mock_pid=$!
7777
echo "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+
7986
sleep 1
8087
try=0
8188
maxTries=10
@@ -88,9 +95,11 @@ done
8895

8996
echo "Starting cpp_test with -mock and -auto flags"
9097
cd "$(dirname "$testExe")"
98+
99+
# Capture exit code without triggering set -e
100+
set +e
91101
"./$(basename "$testExe")" -mock -auto
92102
exitCode=$?
93-
94-
kill-rec $mock_pid
103+
set -e
95104

96105
exit $exitCode

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ params=
2424
buildType="Debug"
2525
cleanFirst=false
2626

27-
while [ ! -z $1 ]; do
27+
while [ -n "${1:-}" ]; do
2828
case $1 in
2929
--clean) cleanFirst=true;;
3030
--release) buildType="Release";;

test/api_test_app/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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}/../..)
132132
endif ()
133133

134134
target_include_directories(${API_TEST_APP}

test/api_test_app/cpp/chooseInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
#pragma once
2020

2121
#include "fireboltDemoBase.h"
22+
#include <limits>
2223

2324
class ChooseInterface : public FireboltDemoBase
2425
{
2526
public:
2627
ChooseInterface();
2728
~ChooseInterface();
28-
// std::vector<std::string> methods() const { return names_; }
2929

3030
void runOption(const int index);
3131
void autoRun();

test/api_test_app/cpp/deviceDemo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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))

test/api_test_app/cpp/presentationDemo.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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
};

test/api_test_app/cpp/texttospeechDemo.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff 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; };

0 commit comments

Comments
 (0)