From 477bdf50a2aa39a4066cc98f246320b7cbf5942d Mon Sep 17 00:00:00 2001 From: zoff99 Date: Fri, 19 Apr 2024 21:59:06 +0200 Subject: [PATCH] linux avd test --- .github/workflows/bobtests_linux.yml | 182 +++++++++++++-------------- 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/.github/workflows/bobtests_linux.yml b/.github/workflows/bobtests_linux.yml index 4c7fd4619..01fb96759 100644 --- a/.github/workflows/bobtests_linux.yml +++ b/.github/workflows/bobtests_linux.yml @@ -21,7 +21,7 @@ jobs: contents: write if: ${{ true }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: install deps run: | @@ -31,102 +31,102 @@ jobs: imagemagick \ ca-certificates - - name: Install Java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: | - 11 + - name: Install Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: | + 11 - - name: Enable KVM group perms - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm + - name: Enable KVM group perms + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - - name: test java1 - run: | - pwd - type java - echo "===========1=========" - java -version || exit 0 - echo "===========2=========" + - name: test java1 + run: | + pwd + type java + echo "===========1=========" + java -version || exit 0 + echo "===========2=========" - - name: download tester - shell: bash - run: | - curl -L https://github.com/zoff99/java_tox_tester/archive/refs/heads/master.zip -o master.zip - unzip master.zip - ls -al java_tox_tester-master/ - java -version - javac -version + - name: download tester + shell: bash + run: | + curl -L https://github.com/zoff99/java_tox_tester/archive/refs/heads/master.zip -o master.zip + unzip master.zip + ls -al java_tox_tester-master/ + java -version + javac -version - - name: start tester - shell: bash - run: | - cd java_tox_tester-master/ ; ls -al ; ./do_wait_for_app.sh & + - name: start tester + shell: bash + run: | + cd java_tox_tester-master/ ; ls -al ; ./do_wait_for_app.sh & - - name: android test - timeout-minutes: 120 - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 29 - ndk: 21.0.6113669 - cmake: 3.10.2.4988404 - disable-animations: true - disable-spellchecker: true - script: | - rm -f /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/witness.gradle - sed -i -e 's#a.getWindow().addFlags#//a.getWindow().addFlagsXXYY#' /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/CallingActivity.java - printf 'dependencyVerification {\nverify = [\n]\n}\n' > /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/witness.gradle - java -version - cd android-refimpl-app ; ./gradlew assemble - cliclick -m verbose m:12,34 - adb logcat -c || echo "NOERR" - adb logcat > /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/logcat.txt & - echo 'sleep 100' > /Users/runner/a.sh - echo 'sleep 40' >> /Users/runner/a.sh - echo 'sleep 10' >> /Users/runner/a.sh - echo 'sleep 10' >> /Users/runner/a.sh - echo 'sleep 10' >> /Users/runner/a.sh - echo 'adb pull "/storage/emulated/0/screen4.png" /Users/runner/screen_adb_04.png' >> /Users/runner/a.sh - cat /Users/runner/a.sh - ls -al /Users/runner/a.sh - chmod u+rx /Users/runner/a.sh - bash /Users/runner/a.sh & - cd android-refimpl-app ; ./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.zoffcc.applications.trifa.JavaFriendTester || echo "NOERR" - pwd - adb pull /sdcard/googletest/test_outputfiles . - ls -al /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/ - echo "---------------" - ls -al /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/*.png + - name: android test + timeout-minutes: 120 + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 29 + ndk: 21.0.6113669 + cmake: 3.10.2.4988404 + disable-animations: true + disable-spellchecker: true + script: | + rm -f /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/witness.gradle + sed -i -e 's#a.getWindow().addFlags#//a.getWindow().addFlagsXXYY#' /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/CallingActivity.java + printf 'dependencyVerification {\nverify = [\n]\n}\n' > /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/app/witness.gradle + java -version + cd android-refimpl-app ; ./gradlew assemble + cliclick -m verbose m:12,34 + adb logcat -c || echo "NOERR" + adb logcat > /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/logcat.txt & + echo 'sleep 100' > /Users/runner/a.sh + echo 'sleep 40' >> /Users/runner/a.sh + echo 'sleep 10' >> /Users/runner/a.sh + echo 'sleep 10' >> /Users/runner/a.sh + echo 'sleep 10' >> /Users/runner/a.sh + echo 'adb pull "/storage/emulated/0/screen4.png" /Users/runner/screen_adb_04.png' >> /Users/runner/a.sh + cat /Users/runner/a.sh + ls -al /Users/runner/a.sh + chmod u+rx /Users/runner/a.sh + bash /Users/runner/a.sh & + cd android-refimpl-app ; ./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.zoffcc.applications.trifa.JavaFriendTester || echo "NOERR" + pwd + adb pull /sdcard/googletest/test_outputfiles . + ls -al /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/ + echo "---------------" + ls -al /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/*.png - - name: put datetime on screenshots - run: | - cd /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/ - git rev-parse --short HEAD - c="$(git rev-parse --short HEAD)" - cd /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/ - ls -al - d="$(date '+%Y-%m-%d %H:%M:%S')" - convert test_004b.png -gravity SouthEast -pointsize 62 -fill white -annotate +30+30 "$d ($c)" test_004b_time.png - convert test_099.png -gravity SouthEast -pointsize 62 -fill white -annotate +30+30 "$d ($c)" test_099_time.png - mv test_004b_time.png test_004b.png - mv test_099_time.png test_099.png + - name: put datetime on screenshots + run: | + cd /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/ + git rev-parse --short HEAD + c="$(git rev-parse --short HEAD)" + cd /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/ + ls -al + d="$(date '+%Y-%m-%d %H:%M:%S')" + convert test_004b.png -gravity SouthEast -pointsize 62 -fill white -annotate +30+30 "$d ($c)" test_004b_time.png + convert test_099.png -gravity SouthEast -pointsize 62 -fill white -annotate +30+30 "$d ($c)" test_099_time.png + mv test_004b_time.png test_004b.png + mv test_099_time.png test_099.png - - name: upload screenshots - uses: actions/upload-artifact@v4 - with: - name: macscreen - path: | - /Users/runner/screen*.png - /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/*.png + - name: upload screenshots + uses: actions/upload-artifact@v4 + with: + name: macscreen + path: | + /Users/runner/screen*.png + /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/*.png - - name: upload logcat output - continue-on-error: true - uses: actions/upload-artifact@v4 - with: - name: logcat - path: | - /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/logcat.txt + - name: upload logcat output + continue-on-error: true + uses: actions/upload-artifact@v4 + with: + name: logcat + path: | + /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/logcat.txt