From 36fb8b056ccabcf131144fdac796a6348dade4d6 Mon Sep 17 00:00:00 2001 From: qiaoyuang Date: Wed, 4 Dec 2024 22:16:50 +0000 Subject: [PATCH 1/2] Update the Android instrumented tests --- .github/workflows/build.yml | 14 +++++++------- CHANGELOG.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3105435..883fb10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,24 +76,24 @@ jobs: if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 34 + api-level: 35 target: google_apis arch: x86_64 profile: pixel_6 - emulator-build: 12265550 + emulator-build: 12694320 force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: echo "Generated AVD snapshot for caching." - - name: Run Android 14 Instrumented Tests + - name: Run Android 15 Instrumented Tests uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 34 + api-level: 35 target: google_apis arch: x86_64 profile: pixel_6 - emulator-build: 12265550 + emulator-build: 12694320 force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true @@ -239,7 +239,7 @@ jobs: target: default arch: x86_64 profile: pixel_2 - emulator-build: 12265550 + emulator-build: 12694320 force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true @@ -252,7 +252,7 @@ jobs: target: default arch: x86_64 profile: pixel_2 - emulator-build: 12265550 + emulator-build: 12694320 force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f2a24b..846737e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ ### All -* Update `Kotlin`'s version to `2.1.00` +* Update `Kotlin`'s version to `2.1.0` ### sqllin-dsl From 4523e53c3efa78492a13a7b0012d98e78b0f389b Mon Sep 17 00:00:00 2001 From: qiaoyuang Date: Thu, 5 Dec 2024 09:44:02 +0000 Subject: [PATCH 2/2] Optimize the unit tests --- .../kotlin/com/ctrip/sqllin/dsl/PlatformApple.kt | 2 +- .../kotlin/com/ctrip/sqllin/dsl/PlatformLinux.kt | 2 +- .../kotlin/com/ctrip/sqllin/dsl/PlatformMingw.kt | 2 +- .../kotlin/com/ctrip/sqllin/dsl/Platform.kt | 2 +- test_android.sh | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename sqllin-dsl/src/{appleMain => appleTest}/kotlin/com/ctrip/sqllin/dsl/PlatformApple.kt (96%) rename sqllin-dsl/src/{linuxMain => linuxTest}/kotlin/com/ctrip/sqllin/dsl/PlatformLinux.kt (95%) rename sqllin-dsl/src/{mingwMain => mingwTest}/kotlin/com/ctrip/sqllin/dsl/PlatformMingw.kt (95%) rename sqllin-dsl/src/{nativeMain => nativeTest}/kotlin/com/ctrip/sqllin/dsl/Platform.kt (95%) diff --git a/sqllin-dsl/src/appleMain/kotlin/com/ctrip/sqllin/dsl/PlatformApple.kt b/sqllin-dsl/src/appleTest/kotlin/com/ctrip/sqllin/dsl/PlatformApple.kt similarity index 96% rename from sqllin-dsl/src/appleMain/kotlin/com/ctrip/sqllin/dsl/PlatformApple.kt rename to sqllin-dsl/src/appleTest/kotlin/com/ctrip/sqllin/dsl/PlatformApple.kt index 66a1f2b..e11b152 100644 --- a/sqllin-dsl/src/appleMain/kotlin/com/ctrip/sqllin/dsl/PlatformApple.kt +++ b/sqllin-dsl/src/appleTest/kotlin/com/ctrip/sqllin/dsl/PlatformApple.kt @@ -30,4 +30,4 @@ import platform.Foundation.NSUserDomainMask internal actual fun getPlatformStringPath(): String = (NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true).firstOrNull() as? String ?: "") -// actual val pathSeparator: Char = '/' \ No newline at end of file +internal actual val pathSeparator: Char = '/' \ No newline at end of file diff --git a/sqllin-dsl/src/linuxMain/kotlin/com/ctrip/sqllin/dsl/PlatformLinux.kt b/sqllin-dsl/src/linuxTest/kotlin/com/ctrip/sqllin/dsl/PlatformLinux.kt similarity index 95% rename from sqllin-dsl/src/linuxMain/kotlin/com/ctrip/sqllin/dsl/PlatformLinux.kt rename to sqllin-dsl/src/linuxTest/kotlin/com/ctrip/sqllin/dsl/PlatformLinux.kt index 29ce773..80bd9ec 100644 --- a/sqllin-dsl/src/linuxMain/kotlin/com/ctrip/sqllin/dsl/PlatformLinux.kt +++ b/sqllin-dsl/src/linuxTest/kotlin/com/ctrip/sqllin/dsl/PlatformLinux.kt @@ -29,4 +29,4 @@ import platform.posix.getcwd internal actual fun getPlatformStringPath(): String = getcwd(null, 0u)?.toKString() ?: throw IllegalStateException("The temp path created error") -// actual val pathSeparator: Char = '/' \ No newline at end of file +internal actual val pathSeparator: Char = '/' \ No newline at end of file diff --git a/sqllin-dsl/src/mingwMain/kotlin/com/ctrip/sqllin/dsl/PlatformMingw.kt b/sqllin-dsl/src/mingwTest/kotlin/com/ctrip/sqllin/dsl/PlatformMingw.kt similarity index 95% rename from sqllin-dsl/src/mingwMain/kotlin/com/ctrip/sqllin/dsl/PlatformMingw.kt rename to sqllin-dsl/src/mingwTest/kotlin/com/ctrip/sqllin/dsl/PlatformMingw.kt index f3ae026..e87a3de 100644 --- a/sqllin-dsl/src/mingwMain/kotlin/com/ctrip/sqllin/dsl/PlatformMingw.kt +++ b/sqllin-dsl/src/mingwTest/kotlin/com/ctrip/sqllin/dsl/PlatformMingw.kt @@ -29,4 +29,4 @@ import platform.posix._wgetcwd internal actual fun getPlatformStringPath(): String = _wgetcwd(null, 0)?.toKString() ?: throw IllegalStateException("Get database path wrong") -// actual val pathSeparator: Char = '\\' \ No newline at end of file +internal actual val pathSeparator: Char = '\\' \ No newline at end of file diff --git a/sqllin-dsl/src/nativeMain/kotlin/com/ctrip/sqllin/dsl/Platform.kt b/sqllin-dsl/src/nativeTest/kotlin/com/ctrip/sqllin/dsl/Platform.kt similarity index 95% rename from sqllin-dsl/src/nativeMain/kotlin/com/ctrip/sqllin/dsl/Platform.kt rename to sqllin-dsl/src/nativeTest/kotlin/com/ctrip/sqllin/dsl/Platform.kt index 1b7a5b3..b9a0505 100644 --- a/sqllin-dsl/src/nativeMain/kotlin/com/ctrip/sqllin/dsl/Platform.kt +++ b/sqllin-dsl/src/nativeTest/kotlin/com/ctrip/sqllin/dsl/Platform.kt @@ -29,4 +29,4 @@ internal expect fun getPlatformStringPath(): String /** * Get the file path separator, '\' in Windows, '/' in others */ -// expect val pathSeparator: Char \ No newline at end of file +internal expect val pathSeparator: Char \ No newline at end of file diff --git a/test_android.sh b/test_android.sh index b55b8ef..98c6f7b 100755 --- a/test_android.sh +++ b/test_android.sh @@ -1,5 +1,5 @@ #Run Android instrumented tests ./gradlew :sqllin-driver:connectedDebugAndroidTest --stacktrace ./gradlew :sqllin-dsl:connectedDebugAndroidTest --stacktrace -adb uninstall com.ctrip.sqllin.driver.test -adb uninstall com.ctrip.sqllin.dsl.test \ No newline at end of file +#adb uninstall com.ctrip.sqllin.driver.test +#adb uninstall com.ctrip.sqllin.dsl.test \ No newline at end of file