forked from qt-creator/qt-creator
deviceshell: Fix racecondition and long running tests
When writing to stdout and stderr from two processes, their output could become interleaved. To work around that, we write stdout and stderr to different files and later combine them together in the shell script. Since tst_deviceshell tests could run for a long time if /usr folder is too big, added a check that first tests the runtime once. Since we currently only support linux containers, limit the tests to only run if the container platform is linux as well. Change-Id: I4b313596cdf9acc839d54d7cc77c66fd53ac23bf Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -62,8 +62,11 @@ finalOutput() {
|
||||
local fileInputBuffer
|
||||
while read fileInputBuffer
|
||||
do
|
||||
if test -f "$fileInputBuffer.err"; then
|
||||
cat $fileInputBuffer.err
|
||||
fi
|
||||
cat $fileInputBuffer
|
||||
rm $fileInputBuffer
|
||||
rm -f $fileInputBuffer.err $fileInputBuffer
|
||||
done
|
||||
}
|
||||
|
||||
@@ -117,7 +120,7 @@ executeAndMark()
|
||||
|
||||
# Mark the app's output streams
|
||||
readAndMark $PID 'O' < "$stdoutenc" >> $TMPFILE &
|
||||
readAndMark $PID 'E' < "$stderrenc" >> $TMPFILE &
|
||||
readAndMark $PID 'E' < "$stderrenc" >> $TMPFILE.err &
|
||||
|
||||
# Start the app ...
|
||||
if [ -z "$INDATA" ]
|
||||
|
||||
Reference in New Issue
Block a user