Skip to content

Commit 799ee37

Browse files
authored
Disable floret detection by default (#196)
--- Signed-off-by: Kartik Nema <kartnema@qti.qualcomm.com>
1 parent e4aa8b0 commit 799ee37

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

client/APIs/UrmAPIs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,11 @@ int8_t getProp(const char* prop, char* buffer, size_t bufferSize, const char* de
240240

241241
// read the response
242242
char resultBuf[bufferSize];
243+
memset(resultBuf, 0, sizeof(resultBuf));
243244
if(RC_IS_NOTOK(conn->readMsg(resultBuf, sizeof(resultBuf)))) {
244245
return -1;
245246
}
246247

247-
buffer[bufferSize - 1] = '\0';
248248
if(strncmp(resultBuf, "na", 2) == 0) {
249249
// Copy default value
250250
strncpy(buffer, defValue, bufferSize - 1);

contextual-classifier/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set_target_properties(ContextualClassifier PROPERTIES
2222
target_include_directories(ContextualClassifier PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
2323

2424
# floret detection and USE_FLORET macro using pkg-config
25-
option(ENABLE_FLORET "Build ML inference with floret support" ON)
25+
option(ENABLE_FLORET "Build ML inference with floret support" OFF)
2626

2727
set(FLORET_FOUND FALSE)
2828
set(FLORET_LIBRARIES "")

tests/Component/ParserTests.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -276,52 +276,52 @@ URM_TEST(PropertyParsingTests, {
276276
{
277277
std::string resultBuffer;
278278

279-
int8_t propFound = submitPropGetRequest("test.debug.enabled", resultBuffer, "false");
279+
size_t bytesWritten = submitPropGetRequest("test.debug.enabled", resultBuffer, "false");
280280

281-
E_ASSERT((propFound == true));
281+
E_ASSERT((bytesWritten > 0));
282282
E_ASSERT((strcmp(resultBuffer.c_str(), "true") == 0));
283283
}
284284

285285
{
286286
std::string resultBuffer;
287287

288-
int8_t propFound = submitPropGetRequest("test.current.worker_thread.count", resultBuffer, "false");
288+
size_t bytesWritten = submitPropGetRequest("test.current.worker_thread.count", resultBuffer, "false");
289289

290-
E_ASSERT((propFound == true));
290+
E_ASSERT((bytesWritten > 0));
291291
E_ASSERT((strcmp(resultBuffer.c_str(), "125") == 0));
292292
}
293293

294294
{
295295
std::string resultBuffer;
296296

297-
int8_t propFound = submitPropGetRequest("test.historic.worker_thread.count", resultBuffer, "5");
297+
size_t bytesWritten = submitPropGetRequest("test.historic.worker_thread.count", resultBuffer, "5");
298298

299-
E_ASSERT((propFound == false));
299+
E_ASSERT((bytesWritten == 0));
300300
E_ASSERT((strcmp(resultBuffer.c_str(), "5") == 0));
301301
}
302302

303303
{
304304
std::thread th1([&]{
305305
std::string resultBuffer;
306-
int8_t propFound = submitPropGetRequest("test.current.worker_thread.count", resultBuffer, "false");
306+
size_t bytesWritten = submitPropGetRequest("test.current.worker_thread.count", resultBuffer, "false");
307307

308-
E_ASSERT((propFound == true));
308+
E_ASSERT((bytesWritten > 0));
309309
E_ASSERT((strcmp(resultBuffer.c_str(), "125") == 0));
310310
});
311311

312312
std::thread th2([&]{
313313
std::string resultBuffer;
314-
int8_t propFound = submitPropGetRequest("test.debug.enabled", resultBuffer, "false");
314+
size_t bytesWritten = submitPropGetRequest("test.debug.enabled", resultBuffer, "false");
315315

316-
E_ASSERT((propFound == true));
316+
E_ASSERT((bytesWritten > 0));
317317
E_ASSERT((strcmp(resultBuffer.c_str(), "true") == 0));
318318
});
319319

320320
std::thread th3([&]{
321321
std::string resultBuffer;
322-
int8_t propFound = submitPropGetRequest("test.doc.build.mode.enabled", resultBuffer, "false");
322+
size_t bytesWritten = submitPropGetRequest("test.doc.build.mode.enabled", resultBuffer, "false");
323323

324-
E_ASSERT((propFound == true));
324+
E_ASSERT((bytesWritten > 0));
325325
E_ASSERT((strcmp(resultBuffer.c_str(), "false") == 0));
326326
});
327327

0 commit comments

Comments
 (0)