Skip to content

Commit

Permalink
test macos
Browse files Browse the repository at this point in the history
  • Loading branch information
blamacaz committed Oct 2, 2024
1 parent 6e031b7 commit 8c167b5
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 53 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ if(BUILD_TESTS)
message("Build tests")
enable_testing()
add_subdirectory("test/Iris.Tests")
add_subdirectory("test/AddressSanitizer.Tests")
endif()

# ---------------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/CDLuminance.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace iris
/// <param name="flashThreshold"></param>
CDLuminance(EA::EACC::Utils::FrameConverter* converter, const short& fps, const cv::Size& frameSize, FlashParams* params);
void SetCurrentFrame(const IrisFrame& irisFrame) override;
void SetCurrentFrame(cv::Mat* bgrFrame);
void SetCurrentFrame (cv::Mat* bgrFrame) override;

~CDLuminance();
protected:
Expand Down
2 changes: 1 addition & 1 deletion src/RelativeLuminance.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace iris


void SetCurrentFrame(const IrisFrame& irisFrame) override;
void SetCurrentFrame(cv::Mat* bgrFrame);
void SetCurrentFrame(cv::Mat* bgrFrame) override;

~RelativeLuminance();
protected:
Expand Down
7 changes: 5 additions & 2 deletions src/TransitionTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ namespace iris
{

public:


virtual ~TransitionTracker() {};

inline bool getLumPassWithWarning() { return m_luminanceResults.passWithWarning; };
inline bool getRedPassWithWarning() { return m_redResults.passWithWarning; };
Expand Down Expand Up @@ -52,9 +53,11 @@ namespace iris
/// If AnalysisByTime is enabled, add the first frame to the FrameTimeStamps structs
/// </summary>
/// <param name="data">data to persist</param>
virtual void SetFirstFrame(FrameData& data) {return;}
virtual void SetFirstFrame(FrameData& data) {}
protected:

TransitionTracker() {};

struct Counter
{
std::vector<int> count; //transition count that surpass the luminance/red threshold from the last second
Expand Down
1 change: 1 addition & 0 deletions src/TransitionTrackerByFPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace iris
{
TransitionTrackerByFPS::TransitionTrackerByFPS(unsigned int fps, TransitionTrackerParams* params)
: TransitionTracker()
{
m_params = params;
m_luminanceTransitionCount.count.reserve(fps); m_luminanceTransitionCount.count.emplace_back(0);
Expand Down
7 changes: 4 additions & 3 deletions src/TransitionTrackerByTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace iris
{
TransitionTrackerByTime::TransitionTrackerByTime(unsigned int starterFpsReserve, TransitionTrackerParams* params)
TransitionTrackerByTime::TransitionTrackerByTime(unsigned int starterFpsReserve, TransitionTrackerParams* params)
: TransitionTracker()
{
m_params = params;
m_luminanceTransitionCount.count.reserve(starterFpsReserve); m_luminanceTransitionCount.count.emplace_back(0);
Expand Down Expand Up @@ -39,13 +40,13 @@ namespace iris
m_fourSecondTimeStamps.GetFrameNumToRemove(data.TimeStampVal);

//update transition lists as 1s has passed
for (m_oneSecondFramesToRemove; m_oneSecondFramesToRemove > 0; m_oneSecondFramesToRemove--)
for (; m_oneSecondFramesToRemove > 0; m_oneSecondFramesToRemove--)
{
m_luminanceTransitionCount.updatePassed();
m_redTransitionCount.updatePassed();
}
//update extended failure as 5s have passed
for (m_fiveSecondFramesToRemove; m_fiveSecondFramesToRemove > 0; m_fiveSecondFramesToRemove--)
for (; m_fiveSecondFramesToRemove > 0; m_fiveSecondFramesToRemove--)
{
m_luminanceExtendedCount.updatePassed();
m_redExtendedCount.updatePassed();
Expand Down
20 changes: 0 additions & 20 deletions test/AddressSanitizer.Tests/CMakeLists.txt

This file was deleted.

7 changes: 0 additions & 7 deletions test/AddressSanitizer.Tests/include/AddressSanitizerTest.h

This file was deleted.

14 changes: 0 additions & 14 deletions test/AddressSanitizer.Tests/src/AddressSanitizerTest.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion test/Iris.Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ option(ASAN_ENABLED "Build this target with AddressSanitizer" ON)


if(ASAN_ENABLED)
if(NOT MSVC)
if(NOT MSVC AND NOT APPLE)
target_compile_options(${PROJECT_NAME} PUBLIC -fsanitize=address -fno-omit-frame-pointer)
target_link_options(${PROJECT_NAME} PUBLIC -fsanitize=address)
endif()
Expand Down
4 changes: 1 addition & 3 deletions test/Iris.Tests/src/FlashDetectionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ namespace iris::Tests

TEST_F(FlashDetectionTests, RELATIVE_LUMINANCE)
{

configuration.SetLuminanceType(Configuration::LuminanceType::RELATIVE);
configuration.Init();



cv::Size size(100, 100);

cv::Mat blackFrame(size, CV_8UC3, black); //lum = 0f
Expand Down

0 comments on commit 8c167b5

Please sign in to comment.