Force stdin, stdout and stderr to be totally unbuffered 95/19795/3
authorCédric Ollivier <cedric.ollivier@orange.com>
Mon, 29 Aug 2016 19:57:03 +0000 (21:57 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 30 Aug 2016 09:14:33 +0000 (11:14 +0200)
commitd32ff56af10bcc15163d573a64970013242c689c
tree2332430ef084d45f1c09a16746af3913abf723e2
parent1f388ff6f5c28252ef99a631b7b290f60a6a9291
Force stdin, stdout and stderr to be totally unbuffered

It protects against mixed logs as lots of python scripts directly call
print which doesn't flush stdout as opposed to log.info(). This
requirement is induced by subprocess.Popen() initiated by run_tests.py.

The following programs could switch to logging instead of print [1]

[1] $ find . -name "*.py" |xargs grep -v ^[[:space:]]*# \
        |grep \ print\  |cut -d: -f 1 |sort -u
./testcases/Controllers/ODL/OpenDaylightTesting.py
./testcases/Controllers/ONOS/Sfc/Sfc_fun.py
./testcases/Controllers/ONOS/Sfc/Sfc.py
./testcases/Controllers/ONOS/Teston/adapters/client.py
./testcases/Controllers/ONOS/Teston/adapters/connection.py
./testcases/Controllers/ONOS/Teston/adapters/environment.py
./testcases/Controllers/ONOS/Teston/adapters/foundation.py
./testcases/OpenStack/vPing/vping_util.py
./testcases/security_scan/connect.py
./utils/functest_utils.py
./utils/functest_vacation.py
./utils/openstack_clean.py

JIRA: FUNCTEST-441

Change-Id: I7e9a888507f10352be7e85abd7f27dba4b1a7b53
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
ci/exec_test.sh