-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Run unit tests #476
base: master
Are you sure you want to change the base?
[CI] Run unit tests #476
Changes from all commits
64632ad
5aab324
9c599db
64b649b
1a89222
4f11e2b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Unit Tests | ||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
name: Unit Tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v1.0.0 | ||
- | ||
name: Install dependencies | ||
run: make arm_sdk_install gtest_install | ||
- | ||
name: Run all unit tests | ||
run: make all_ut_run |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ EXTRAINCDIRS += $(TOP)/ | |
EXTRAINCDIRS += $(HERE)/ | ||
|
||
|
||
CFLAGS += -O0 | ||
CFLAGS += -O1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gcc/ld doesn't like the inline functions on utils_math.c
|
||
|
||
# Set compiler-specific flags | ||
GCC_CXXFLAGS = -fsingle-precision-constant | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,15 +296,15 @@ TEST_F(Saturate2dVector, ValsOnEdgeOfRange) { | |
ret = utils_saturate_vector_2d(&inputVal_x, &inputVal_y, inputVal_max); | ||
EXPECT_FLOAT_EQ(1, inputVal_x); | ||
EXPECT_FLOAT_EQ(1, inputVal_y); | ||
/* EXPECT_EQ(false, ret); <-- Do not test, since this is on the edge and we don't need to know if it's explicitly inside or outside*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why this was in place.. Let me know if there is a reason why we can't assert the results There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @FabioBatSilva technically you've combined a few separate changes in one PR? |
||
EXPECT_EQ(false, ret); | ||
|
||
inputVal_x = .1; | ||
inputVal_y = .1; | ||
inputVal_max = sqrt(.2); | ||
ret = utils_saturate_vector_2d(&inputVal_x, &inputVal_y, inputVal_max); | ||
EXPECT_FLOAT_EQ(.1, inputVal_x); | ||
EXPECT_FLOAT_EQ(.1, inputVal_y); | ||
/* EXPECT_EQ(false, ret); <-- Do not test, since this is on the edge and we don't need to know if it's explicitly inside or outside*/ | ||
EXPECT_EQ(false, ret); | ||
} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will ignore the double-promotion warnings on gtest.