Skip to content

Commit aa96dd0

Browse files
committed
Merge pull request #1542 from bettio/add-test-fflush
test: add extra fflush() Make sure everything is flushed before and after running a test, so we make sure output will never be mixed up. These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 18f961b + 542604c commit aa96dd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,9 @@ int test_module_execution(bool beam, struct Test *test)
640640
return 0;
641641
}
642642
fprintf(stderr, "%s:\r", test->test_module);
643+
fflush(NULL);
643644
int result = beam ? test_beam(test) : test_atom(test);
645+
fflush(NULL);
644646
if (result) {
645647
fprintf(stderr, "\x1b[2K\x1b[1;31m%s:\x1b[34GFAILED\x1b[0m\n", test->test_module);
646648
return 1;

0 commit comments

Comments
 (0)