I’m working on writing unit tests, and the executable runs as expected when run as ./out/unit_test_c
. When I run ./out/unit_test_c > out/results.txt
it hangs indefinitely. The expected execution time is ~1 sec since were just starting to write tests, but it can hang for hours. The results do need to be saved in some sort of file to be parsed later and turned into test result reports.
I tested that writing to the file is working, echo test > out/results.txt
.
I also tried using tee
but it also hung.
Other details that I don’t see as relevant but I guess might be. I’m running this from a Makefile, inside a docker running Ubuntu, the test framework is Unity by Throw the Switch.
I would expect that ./out/unit_test_c > out/results.txt
would work by putting the output of the executable to the file, but what am I doing wrong?