mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
update gitlab-ci
This commit is contained in:
parent
992bf4b1b5
commit
1406e11b6a
7 changed files with 21 additions and 20 deletions
Binary file not shown.
|
|
@ -42,7 +42,8 @@ for file in classNames:
|
|||
testName = testTd.text
|
||||
testTd.decompose()
|
||||
testState = test.find("td")["class"][0]
|
||||
testTime = float(test.find("td").text.split("(")[1].split("s")[0])
|
||||
testTime = test.find("td").text.split("(")[1].split("s")[0].split("m")
|
||||
testTime = float(testTime[0]) if len(testTime) < 2 else int(testTime[0])*60 + float(testTime[1])
|
||||
Tests[fileName][testName] = [testState,testTime,None,None]
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -19,13 +19,12 @@ job-android-uitests:
|
|||
|
||||
stage: uitests
|
||||
tags: [ "macos-xcode13" ]
|
||||
allow_failure: true
|
||||
|
||||
dependencies:
|
||||
- job-android
|
||||
|
||||
before_script:
|
||||
- git submodule update --init --recursive
|
||||
- git submodule update --init
|
||||
- mkdir logs && mkdir reports && mkdir apks
|
||||
|
||||
#define adb tcp port
|
||||
|
|
@ -39,19 +38,19 @@ job-android-uitests:
|
|||
|
||||
#launch emulator
|
||||
- ${ANDROID_HOME}/platform-tools/adb start-server
|
||||
- ${ANDROID_HOME}/emulator/emulator -avd $emulator_name -port $emulator_adb_port -no-window -no-audio >> logs/emulator.log 2>&1 &
|
||||
- ${ANDROID_HOME}/emulator/emulator -avd $emulator_name -port $emulator_adb_port -no-audio >> logs/emulator.log 2>&1 &
|
||||
- .gitlab-ci-files/wait-for-android-emulator -d emulator-$emulator_adb_port -m start
|
||||
|
||||
- ${ANDROID_HOME}/platform-tools/adb -s emulator-$emulator_adb_port logcat -d > logs/logcats.log
|
||||
|
||||
script:
|
||||
- set +e
|
||||
|
||||
#launch uitest suites
|
||||
- export JAVA_HOME=`/usr/libexec/java_home -v 11`
|
||||
- export ANDROID_SERIAL=emulator-$emulator_adb_port
|
||||
- export JAVA_HOME=$(/usr/libexec/java_home -v 11)
|
||||
- export ANDROID_SERIAL=emulator-$emulator_adb_port
|
||||
- ${ANDROID_HOME}/platform-tools/adb -s emulator-$emulator_adb_port logcat -c
|
||||
- ./gradlew -Pandroid.testInstrumentationRunnerArguments.class=org.linphone.testsuites.CallTestSuite -PscreportWindowed=false connectedAndroidTest --continue 2>&1 | tee logs/build.log
|
||||
- BUILD_RESULT=$?
|
||||
- ${ANDROID_HOME}/platform-tools/adb -s emulator-$emulator_adb_port logcat -d > logs/logcats.log
|
||||
|
||||
#kill emultator (twice in case a confirm dialog popup appears)
|
||||
- ${ANDROID_HOME}/platform-tools/adb -s emulator-$emulator_adb_port emu kill
|
||||
|
|
@ -62,12 +61,13 @@ job-android-uitests:
|
|||
- ${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager --verbose delete avd --name $emulator_name >> logs/emulator.log
|
||||
- if ${ANDROID_HOME}/platform-tools/adb devices | grep -q "emulator-"; then ${ANDROID_HOME}/platform-tools/adb kill-server; fi
|
||||
|
||||
- if [ $BUILD_RESULT -eq 0 ] && ! grep -q "BUILD FAILED" logs/build.log && [ ! -d app/build/reports/androidTests/connected/failures ]; then exit 0; else exit 1; fi
|
||||
- if grep -q "BUILD FAILED" logs/build.log || [ -d app/build/reports/androidTests/connected/failures ]; then exit 1; else exit 0; fi
|
||||
|
||||
after_script:
|
||||
#artifacts preparation
|
||||
- mv app/build/outputs/apk/debug/linphone-android-debug-*.apk ./apks/debug
|
||||
- mv app/build/outputs/apk/release/linphone-android-release-*.apk ./apks/release
|
||||
- mkdir apks/debug && apks/release
|
||||
- mv app/build/outputs/apk/debug/linphone-android-debug-*.apk apks/debug
|
||||
- mv app/build/outputs/apk/release/linphone-android-release-*.apk apks/release
|
||||
- mv app/build/reports/androidTests/connected/* reports
|
||||
- .gitlab-ci-files/html2xml-report -p reports
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ job-android-upload:
|
|||
stage: deploy
|
||||
tags: [ "deploy" ]
|
||||
|
||||
#only:
|
||||
#- schedules
|
||||
only:
|
||||
- schedules
|
||||
dependencies:
|
||||
- job-android
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ case "${mode}" in
|
|||
if [[ "$bootanim" =~ "device '$device' not found" || "$bootanim" =~ "device offline" || "$bootanim" =~ "running" ]]; then
|
||||
let "failcounter += 1"
|
||||
if [[ $failcounter = 1 ]]; then
|
||||
echo -n "Waiting for $device to start"; else
|
||||
echo -n "Waiting for $device to start."; else
|
||||
echo -n "."
|
||||
fi
|
||||
if [[ $failcounter -gt timeout_in_sec ]]; then
|
||||
|
|
@ -44,7 +44,7 @@ case "${mode}" in
|
|||
while $adb devices | grep -q "$device"; do
|
||||
let "failcounter += 1"
|
||||
if [[ $failcounter = 1 ]]; then
|
||||
echo -n "Waiting for $device to stop"; else
|
||||
echo -n "Waiting for $device to stop."; else
|
||||
echo -n "."
|
||||
fi
|
||||
sleep 1
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
include:
|
||||
- '.gitlab-ci-files/job-android.yml'
|
||||
- '.gitlab-ci-files/job-uitests.yml'
|
||||
- '.gitlab-ci-files/job-upload.yml'
|
||||
- '.gitlab-ci-files/job-uitests.yml'
|
||||
|
||||
|
||||
stages:
|
||||
- build
|
||||
- uitests
|
||||
- deploy
|
||||
- build
|
||||
- deploy
|
||||
- uitests
|
||||
|
|
|
|||
2
screport
2
screport
|
|
@ -1 +1 @@
|
|||
Subproject commit 5f86189ee90245627a396656312f08b2c7c688b2
|
||||
Subproject commit bfa29033d1ebb70ab53792e7f1c44a0a4d0ec434
|
||||
Loading…
Add table
Reference in a new issue