CLI autotest: Factor out common code
CLI autotest: Factor out common code

Change-Id: I75366c7326c7745d1e7a406aeab987be1cfba380
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@qt.io>

qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qt-labs/qbs,qt-labs/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qt-labs/qbs,qtproject/qt-labs-qbs