DroidKaigi / conference-app-2024

The Official Conference App for DroidKaigi 2024
Apache License 2.0
440 stars 201 forks source link

:core:data:allTests fails if tests run by gradle commands. #776

Open Aniokrait opened 1 month ago

Aniokrait commented 1 month ago

Overview

When running tests by gradle commands ./gradlew allTests, Task :core:data:allTests fails.

スクリーンショット 2024-08-24 21 38 39 スクリーンショット 2024-08-24 21 37 32

When executing the same tests on Android Studio, they pass without problem.

takahirom commented 1 month ago

I'm not sure why this happens https://github.com/DroidKaigi/conference-app-2024/blob/main/core/data/src/commonTest/kotlin/io/github/droidkaigi/confsched/data/profilecard/ProfileCardJsonTest.kt#L91C40-L91C76

Yamada-Ika commented 1 month ago

I found the solution. Due to differences in the current working directory depending on the platform, it seems necessary to handle path retrieval differently for each platfrom.

https://speakerdeck.com/ryunen344/okioniai-woip-mete?slide=54

Yamada-Ika commented 1 month ago

I will try to fix.