Add extracted tools: CitrineOS, OpenOCPP, ShapeShifter

- CitrineOS core extracted (CSMS OCPP 2.0.1)
- OpenOCPP extracted (firmware OCPP 1.6J/2.0.1)
- ShapeShifter library installed (pip install -e)
- ShapeShifter specification extracted
- EVerest extracted

TODO updated with progress
This commit is contained in:
Eric F
2026-06-08 00:38:27 -04:00
parent 468cfeaa50
commit d398a6ced2
7326 changed files with 1177561 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
if(DISABLE_EDM)
find_package(GTest REQUIRED)
else()
set(GTEST_LIBRARIES
GTest::gtest
GTest::gtest_main
)
endif()
set(TEST_TARGET_NAME ${PROJECT_NAME}_tests)
add_executable(${TEST_TARGET_NAME} libtimer_unit_test.cpp)
target_include_directories(${TEST_TARGET_NAME}
PUBLIC
${GTEST_INCLUDE_DIRS}
)
target_link_libraries(${TEST_TARGET_NAME} PRIVATE
${GTEST_LIBRARIES}
everest::timer
)
add_test(${TEST_TARGET_NAME} ${TEST_TARGET_NAME})

View File

@@ -0,0 +1,66 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest
#include <atomic>
#include <chrono>
#include <thread>
#include <gtest/gtest.h>
#include <everest/timer.hpp>
namespace libtimer {
class LibTimerUnitTest : public ::testing::Test {
protected:
void SetUp() override {
}
void TearDown() override {
}
};
TEST_F(LibTimerUnitTest, just_an_example) {
ASSERT_TRUE(1 == 1);
}
// Regression: callback re-arms its own timer; pre-fix destructor deadlocks here.
TEST_F(LibTimerUnitTest, destructor_does_not_deadlock_on_reentrant_callback) {
std::atomic<bool> finished{false};
std::atomic<int> fire_count{0};
std::thread watchdog([&finished]() {
for (int i = 0; i < 50; ++i) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
if (finished.load()) {
return;
}
}
ADD_FAILURE() << "Timer destructor deadlocked on re-entrant callback";
finished.store(true);
});
{
Everest::SteadyTimer timer;
std::atomic<bool> in_callback{false};
timer.interval(
[&timer, &fire_count, &in_callback]() {
in_callback.store(true);
fire_count.fetch_add(1);
// Sleep long enough for the main thread to enter ~Timer and start
// blocking on the mutex before this callback calls stop().
std::this_thread::sleep_for(std::chrono::milliseconds(200));
timer.stop();
in_callback.store(false);
},
std::chrono::milliseconds(1));
while (!in_callback.load()) {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
}
finished.store(true);
watchdog.join();
EXPECT_GE(fire_count.load(), 1);
}
} // namespace libtimer