From 2aecc3b92fadae643f5c5088ce2d6ced9600398f Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Wed, 7 Jun 2023 12:40:40 +0200 Subject: [PATCH] Fix screenshot test on jdk17 Signed-off-by: tobiasKaminsky --- .github/workflows/screenShotTest.yml | 2 +- scripts/androidScreenshotTest | 1 + scripts/runCombinedTest.sh | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screenShotTest.yml b/.github/workflows/screenShotTest.yml index 6f10820b62..18e990b2d6 100644 --- a/.github/workflows/screenShotTest.yml +++ b/.github/workflows/screenShotTest.yml @@ -77,7 +77,7 @@ jobs: sdcard-path-or-size: 100M target: google_apis emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833 - script: ./gradlew uninstallAll gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=${{ matrix.color }} -Pandroid.testInstrumentationRunnerArguments.DARKMODE=${{ matrix.scheme }} + script: ./gradlew uninstallAll gplayDebugExecuteScreenshotTests -Dorg.gradle.jvmargs="--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.nio.channels=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED" -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=${{ matrix.color }} -Pandroid.testInstrumentationRunnerArguments.DARKMODE=${{ matrix.scheme }} - name: upload failing results if: ${{ failure() }} env: diff --git a/scripts/androidScreenshotTest b/scripts/androidScreenshotTest index fdf2e1eda0..81935d5660 100755 --- a/scripts/androidScreenshotTest +++ b/scripts/androidScreenshotTest @@ -74,6 +74,7 @@ if [[ $4 = "all" ]]; then scripts/runAllScreenshotCombinations "noCI" "$1" "-Pandroid.testInstrumentationRunnerArguments.class=$class$method" else ./gradlew --offline gplayDebugExecuteScreenshotTests $record \ + -Dorg.gradle.jvmargs="--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.nio.channels=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED" \ -Pscreenshot=true \ -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest \ -Pandroid.testInstrumentationRunnerArguments.class=$class$method \ diff --git a/scripts/runCombinedTest.sh b/scripts/runCombinedTest.sh index 2575bdadb5..d989ba5e6b 100755 --- a/scripts/runCombinedTest.sh +++ b/scripts/runCombinedTest.sh @@ -28,7 +28,10 @@ scripts/wait_for_server.sh "server" adb logcat -c adb logcat > logcat.txt & LOGCAT_PID=$! -./gradlew createGplayDebugCoverageReport -Pcoverage -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest +./gradlew createGplayDebugCoverageReport \ +-Pcoverage -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.utils.ScreenshotTest \ +-Dorg.gradle.jvmargs="--add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.nio.channels=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED" + stat=$? # stop saving logcat kill $LOGCAT_PID