Skip to content
Snippets Groups Projects

QDS-11960 Implement initial tests

Merged Burak Hançerli requested to merge QDS-11960/implement-tests into master
9 files
+ 389
32
Compare changes
  • Side-by-side
  • Inline
Files
9
+ 28
1
@@ -20,8 +20,35 @@ test-x86_64:
- cd ${QDS_CI_ARTIFACTS_PATH}/android/x86_64/test || exit 1
- mkdir -p ${QDS_CI_JOB_TEST_RESULTS_PATH}
- adb install -r -g android-build-release.apk
- adb shell am start -e applicationArguments "'-o output.txt,txt -o output.xml,xml -o output.junitxml,junitxml'" -n io.qt.qtuiviewer.test/org.qtproject.qt.android.bindings.QtActivity
- adb shell "run-as io.qt.qtuiviewer.test rm -rf /data/data/io.qt.qtuiviewer.test/files/output.junitxml"
- adb shell am start -e applicationArguments "'-o output.junitxml,junitxml'" -n io.qt.qtuiviewer.test/org.qtproject.qt.android.bindings.QtActivity
- |
counter=0
while [ -z "$(adb shell pidof -s io.qt.qtuiviewer.test)" ]; do
echo "Waiting for test to start"
sleep 0.1
counter=$((counter+1))
if [ $counter -gt 60 ]; then
echo "Test did not start in time"
exit 1
fi
done
- PID_OF_TEST=$(adb shell pidof -s io.qt.qtuiviewer.test)
- 'echo "PID of test: ${PID_OF_TEST}"'
- |
counter=0
while [ -n "$(adb shell pidof -s io.qt.qtuiviewer.test)" ]; do
echo "Waiting for test to finish"
sleep 0.1
counter=$((counter+1))
if [ $counter -gt 60 ]; then
echo "Test did not finish in time"
exit 1
fi
done
- adb logcat -d --pid=${PID_OF_TEST} > ${QDS_CI_JOB_TEST_RESULTS_PATH}/logcat.txt
- adb shell "run-as io.qt.qtuiviewer.test cat /data/data/io.qt.qtuiviewer.test/files/output.junitxml" > output.junit.xml
- adb uninstall io.qt.qtuiviewer.test
- mv output.junit.xml ${QDS_CI_JOB_TEST_RESULTS_PATH}/test.junit.xml
artifacts:
paths:
Loading