Skip to content

Commit 1ac5920

Browse files
committed
Merge branch 'update-tags-for-release' of https://github.com/sajeevrajput/edge-ai-libraries into update-tags-for-release
2 parents 9bcea69 + 287f196 commit 1ac5920

7 files changed

Lines changed: 59 additions & 15 deletions

File tree

.github/workflows/dls-coverity.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,13 @@ jobs:
122122
tar czf coverity-output.tgz -C build cov-int
123123
124124
- name: Upload to Coverity Scan
125+
env:
126+
GIT_BRANCH: ${{ github.ref_name }}
125127
run: |
126128
cd libraries/dl-streamer
127129
curl --form token=${{ secrets.DLS_COVERITY_TOKEN }} \
128130
--form email=${{ secrets.DLS_COVERITY_EMAIL }} \
129131
--form file=@coverity-output.tgz \
130-
--form version="`date +%Y%m%d%H%M%S`" \
131-
--form description="GitHub Action upload" \
132+
--form version="$GIT_BRANCH-`date +%Y%m%d%H%M%S`" \
133+
--form description="GA scan $GIT_BRANCH-`date +%Y%m%d%H%M%S`" \
132134
https://scan.coverity.com/builds?project=${{ secrets.DLS_COVERITY_PROJECT }}

libraries/dl-streamer/include/dlstreamer/gst/videoanalytics/tensor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ class Tensor {
695695
}
696696

697697
// find or create skeleton metadata
698-
GstAnalyticsKeypointSkeletonMtd skeleton_mtd;
698+
GstAnalyticsKeypointSkeletonMtd skeleton_mtd = {0, nullptr};
699699
if (skeletons.size() > 0) {
700700
bool found = false;
701701
gpointer state = NULL;

libraries/dl-streamer/src/gst/elements/gvafpscounter/named_pipe.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (C) 2021-2022 Intel Corporation
2+
* Copyright (C) 2021-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
******************************************************************************/
@@ -117,7 +117,10 @@ NamedPipe::~NamedPipe() {
117117
if (remove(_pipeName.c_str()))
118118
throw std::runtime_error("Failed to remove pipe " + _pipeName);
119119
}
120+
} catch (const std::exception& e) {
121+
fprintf(stderr, "Error in NamedPipe destructor: %s\n", e.what());
120122
} catch (...) {
123+
fprintf(stderr, "Unknown error in NamedPipe destructor\n");
121124
}
122125
}
123126

@@ -130,8 +133,11 @@ int NamedPipe::write(const void *buf, std::size_t count) {
130133
}
131134

132135
void NamedPipe::close() {
133-
if (::close(_pipeDescriptor))
134-
throw std::runtime_error("Failed to close a pipe.");
136+
if (isDescriptorValid(_pipeDescriptor)) {
137+
if (::close(_pipeDescriptor) != 0)
138+
throw std::runtime_error("Failed to close a pipe.");
139+
_pipeDescriptor = -1;
140+
}
135141
}
136142

137143
std::string NamedPipe::getName() const {

libraries/dl-streamer/src/monolithic/gst/elements/gvawatermark3d/gvawatermark3d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static void draw_3d_box(cv::Mat &img, const std::vector<float> &translation, con
135135

136136
// Draw all box edges in green
137137
int box_idxs[] = {0, 1, 2, 3, 7, 6, 5, 4, 7, 3, 0, 4, 5, 1, 2, 6};
138-
for (int i = 0; i < 16; ++i) {
138+
for (int i = 0; i < 15; ++i) {
139139
if (box_idxs[i] < 0 || box_idxs[i] >= 8 || box_idxs[i + 1] < 0 || box_idxs[i + 1] >= 8)
140140
continue;
141141
cv::line(img, corners2d[box_idxs[i]], corners2d[box_idxs[i + 1]], color_box, 2, cv::LINE_AA);

libraries/dl-streamer/tests/unit_tests/check/components/preprocessing/main_test.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,19 @@
1111

1212
GTEST_API_ int main(int argc, char **argv) {
1313
std::cout << "Running Components::CommonPreprocessingTest from " << __FILE__ << std::endl;
14-
testing::InitGoogleTest(&argc, argv);
15-
gst_check_init(&argc, &argv);
16-
return RUN_ALL_TESTS();
14+
try {
15+
testing::InitGoogleTest(&argc, argv);
16+
gst_check_init(&argc, &argv);
17+
return RUN_ALL_TESTS();
18+
} catch (const std::exception &e) {
19+
std::cerr << "Caught std::exception in " << __FILE__ << " at line " << __LINE__ << " in function "
20+
<< __FUNCTION__ << std::endl;
21+
std::cerr << "Context: Failed during GoogleTest initialization: " << e.what() << std::endl;
22+
return 1;
23+
} catch (...) {
24+
std::cerr << "Caught unknown exception in " << __FILE__ << " at line " << __LINE__ << " in function "
25+
<< __FUNCTION__ << std::endl;
26+
std::cerr << "Context: Failed during GoogleTest initialization with unknown exception type" << std::endl;
27+
return 1;
28+
}
1729
}

libraries/dl-streamer/tests/unit_tests/check/components/symlink/symlink.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,18 @@ TEST(symlink_test, labels_file) {
121121

122122
int main(int argc, char *argv[]) {
123123
std::cout << "Running Components::symlink_test from " << __FILE__ << std::endl;
124-
::testing::InitGoogleTest(&argc, argv);
125-
return RUN_ALL_TESTS();
124+
try {
125+
testing::InitGoogleTest(&argc, argv);
126+
return RUN_ALL_TESTS();
127+
} catch (const std::exception &e) {
128+
std::cerr << "Caught std::exception in " << __FILE__ << " at line " << __LINE__ << " in function "
129+
<< __FUNCTION__ << std::endl;
130+
std::cerr << "Context: Failed during GoogleTest initialization: " << e.what() << std::endl;
131+
return 1;
132+
} catch (...) {
133+
std::cerr << "Caught unknown exception in " << __FILE__ << " at line " << __LINE__ << " in function "
134+
<< __FUNCTION__ << std::endl;
135+
std::cerr << "Context: Failed during GoogleTest initialization with unknown exception type" << std::endl;
136+
return 1;
137+
}
126138
}

libraries/dl-streamer/tests/unit_tests/check/components/va-api-pre-proc/gtest_main.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,20 @@
1010

1111
GTEST_API_ int main(int argc, char **argv) {
1212
std::cout << "Running Components::VAAPIPreProc Test from " << __FILE__ << std::endl;
13-
testing::InitGoogleTest(&argc, argv);
14-
// gst_check_init(&argc, &argv);
13+
try {
14+
testing::InitGoogleTest(&argc, argv);
15+
// gst_check_init(&argc, &argv);
1516

16-
return RUN_ALL_TESTS();
17+
return RUN_ALL_TESTS();
18+
} catch (const std::exception &e) {
19+
std::cerr << "Caught std::exception in " << __FILE__ << " at line " << __LINE__ << " in function "
20+
<< __FUNCTION__ << std::endl;
21+
std::cerr << "Context: Failed during GoogleTest initialization: " << e.what() << std::endl;
22+
return 1;
23+
} catch (...) {
24+
std::cerr << "Caught unknown exception in " << __FILE__ << " at line " << __LINE__ << " in function "
25+
<< __FUNCTION__ << std::endl;
26+
std::cerr << "Context: Failed during GoogleTest initialization with unknown exception type" << std::endl;
27+
return 1;
28+
}
1729
}

0 commit comments

Comments
 (0)