On 08/09/2018 01:40 PM, Alan Martinovic wrote:
> Hi,
> 
> I'm running a long test as a standalone script which prints statuses to 
> sdtout.
> I've noticed that avocado doesn't print the output out before the test 
> finishes
> completely.
> 
> As if it isn't "flushing lines" (probably not the correct term, but it
> explains the behavior :) )
> 
> Is this a known issue/expected behavior or something to do with my 
> environment?
> 
> 
> Be Well,
> Alan
> 

Hi Alan,

IIUC, you're running what Avocado calls a SIMPLE test (an executable,
that returns zero/non-zero), right?

I created a sample script to test the behavior you describe:

---

#!/bin/sh
for i in $(seq 1 30); do
   echo "Step $i";
   sleep 1;
done;

---

And ran:

$ avocado --show=test run /tmp/script.sh

I get one line per second printed, which is the expected behavior (line
buffered output).

The same happens when the test output is sent to the log files.  Can you
describe the behavior of your test?  Does it print multiple lines?  Or a
continuous stream of characters that are not separated by newlines?

Regards!

-- 
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]
[  7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3  ]

Reply via email to