1
0
forked from fsfw/fsfw

all cstdout uses wrapped in preprocessor defines

This commit is contained in:
2021-01-03 13:58:18 +01:00
parent 61fc6cac97
commit c19e628d79
96 changed files with 715 additions and 14 deletions

View File

@ -13,13 +13,17 @@ InternalUnitTester::InternalUnitTester() {}
InternalUnitTester::~InternalUnitTester() {}
ReturnValue_t InternalUnitTester::performTests() {
#if CPP_OSTREAM_ENABLED == 1
sif::info << "Running internal unit tests.." << std::endl;
#endif
testserialize::test_serialization();
testmq::testMq();
testsemaph::testBinSemaph();
testsemaph::testCountingSemaph();
testmutex::testMutex();
#if CPP_OSTREAM_ENABLED == 1
sif::info << "Internal unit tests finished." << std::endl;
#endif
return RETURN_OK;
}

View File

@ -1,7 +1,9 @@
#include "UnittDefinitions.h"
ReturnValue_t unitt::put_error(std::string errorId) {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "Unit Tester error: Failed at test ID "
<< errorId << "\n" << std::flush;
#endif
return HasReturnvaluesIF::RETURN_FAILED;
}

View File

@ -94,8 +94,10 @@ void testsemaph::testBinSemaphoreImplementation(SemaphoreIF* binSemaph,
result = binSemaph->acquire(SemaphoreIF::TimeoutType::WAITING, 10);
//dur_millis_t time = stopwatch.stop();
// if(abs(time - 10) > 2) {
#if CPP_OSTREAM_ENABLED == 1
// sif::error << "UnitTester: Semaphore timeout measured incorrect."
// << std::endl;
#endif
// unitt::put_error(id);
// }
}

View File

@ -15,8 +15,10 @@ ReturnValue_t pst::pollingSequenceInitDefault(
return HasReturnvaluesIF::RETURN_OK;
}
else {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!"
<< std::endl;
#endif
return HasReturnvaluesIF::RETURN_FAILED;
}
}

View File

@ -5,7 +5,9 @@ StorageManagerIF* tglob::getIpcStoreHandle() {
if(objectManager != nullptr) {
return objectManager->get<StorageManagerIF>(objects::IPC_STORE);
} else {
#if CPP_OSTREAM_ENABLED == 1
sif::error << "Global object manager uninitialized" << std::endl;
#endif
return nullptr;
}
}