mirror of https://github.com/ARMmbed/mbed-os.git
Preventing test from printing before Greentea __sync
This test was causing issues on some platforms because the serial output would get garbled and cause exceptions to occur in the testing tools. This corrects the behavior to follow the other tests. It will now defer all pritning until after the __sync event occurs.pull/3170/head
parent
8a9a246356
commit
33c8659512
|
|
@ -9,9 +9,11 @@ private:
|
|||
const int pattern;
|
||||
|
||||
public:
|
||||
Test(const char* _name) : name(_name), pattern(PATTERN_CHECK_VALUE) {
|
||||
Test(const char* _name, bool print_message=true) : name(_name), pattern(PATTERN_CHECK_VALUE) {
|
||||
if (print_message) {
|
||||
print("init");
|
||||
}
|
||||
}
|
||||
|
||||
void print(const char *message) {
|
||||
printf("%s::%s\n", name, message);
|
||||
|
|
@ -39,7 +41,7 @@ public:
|
|||
};
|
||||
|
||||
/* Check C++ startup initialisation */
|
||||
Test s("Static");
|
||||
Test s("Static", false);
|
||||
|
||||
/* EXPECTED OUTPUT:
|
||||
*******************
|
||||
|
|
@ -59,6 +61,7 @@ int main (void) {
|
|||
bool result = true;
|
||||
for (;;)
|
||||
{
|
||||
s.print("init");
|
||||
// Global stack object simple test
|
||||
s.stack_test();
|
||||
if (s.check_init() == false)
|
||||
|
|
|
|||
Loading…
Reference in New Issue