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
Brian Daniels 2016-10-31 14:52:06 -05:00
parent 8a9a246356
commit 33c8659512
1 changed files with 6 additions and 3 deletions

View File

@ -9,8 +9,10 @@ private:
const int pattern;
public:
Test(const char* _name) : name(_name), pattern(PATTERN_CHECK_VALUE) {
print("init");
Test(const char* _name, bool print_message=true) : name(_name), pattern(PATTERN_CHECK_VALUE) {
if (print_message) {
print("init");
}
}
void print(const char *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)