mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
feat: x86-64 client follows DroidDeck-Components' fex.json; fuller x86-64 session logs (#1053)
FEX builds can reach devices without an app release: while the x86-64 client is selected the app reads DroidDeck-Components' fex.json (directly, on its own thread, not in Offline Mode) and a session passes that build to droiddeck-steam-x64, which installs it only once its sha256 matches and its programs load, keeping the replaced files aside until the installed copy loads too; it keeps a working installed build otherwise and falls back to the build it pins. FEX is built and published by Components' build-fex.yml on its single fex release; this repository's build-fex.yml only checks the build. x86-64 session logs name the FEX build and its source, the rootfs and the client's builds, report the rootfs download in tenths, and say in one line when the web helper's GPU process keeps exiting, with x86 glxinfo and vulkaninfo through FEX. Settings shows the FEX build installed.
This commit is contained in:
1 parent
798386d02a
commit
292295ba30
12 files changed
+488
-58
No files matched your search
@@ -0,0 +1,46 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.RobolectricTestRunner
|
||||
import org.robolectric.annotation.Config
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@Config(sdk = [33])
|
||||
class FexCatalogTest {
|
||||
private val sha = "0fc1ca2ba13817ad70d1ea157119a75c9c02446b57d166e6d676cce0807c19c4"
|
||||
private val url = "https://github.com/Droid-Deck/DroidDeck-Components/releases/download/fex-2610-r5/fex.tzst"
|
||||
|
||||
private fun json(release: String = "fex-2610-r5", url: String = this.url, sha256: String = sha) =
|
||||
"""{"schemaVersion": 1, "category": "fex", "release": "$release", "url": "$url", "sha256": "$sha256", "size": 4083539}"""
|
||||
|
||||
@Test fun readsTheBuildComponentsNames() {
|
||||
assertEquals(FexCatalog.Build("fex-2610-r5", url, sha), FexCatalog.parse(json()))
|
||||
}
|
||||
|
||||
@Test fun readsTheSingleReleaseByItsVersion() {
|
||||
val single = "https://github.com/Droid-Deck/DroidDeck-Components/releases/download/fex/fex.tzst"
|
||||
assertEquals(FexCatalog.Build("fex-2610-r6", single, sha), FexCatalog.parse(json(release = "fex", url = single).replace("}", ", \"version\": \"2610-r6\"}")))
|
||||
assertNull(FexCatalog.parse(json(release = "fex", url = single).replace("}", ", \"version\": \"latest\"}")))
|
||||
assertNull(FexCatalog.parse(json(release = "fex", url = single)))
|
||||
}
|
||||
|
||||
@Test fun refusesAnArchiveOutsideItsOwnRelease() {
|
||||
assertNull(FexCatalog.parse(json(url = "https://example.com/fex.tzst")))
|
||||
assertNull(FexCatalog.parse(json(url = url.replace("fex-2610-r5/", "fex-2610-r4/"))))
|
||||
assertNull(FexCatalog.parse(json(release = "latest", url = url.replace("fex-2610-r5", "latest"))))
|
||||
}
|
||||
|
||||
@Test fun refusesAMissingOrMalformedDigest() {
|
||||
assertNull(FexCatalog.parse(json(sha256 = "abc")))
|
||||
assertNull(FexCatalog.parse("""{"release": "fex-2610-r5", "url": "$url"}"""))
|
||||
assertNull(FexCatalog.parse("not json"))
|
||||
}
|
||||
|
||||
@Test fun theSessionGetsTheBuildAndEverySource() {
|
||||
val env = FexCatalog.environment(FexCatalog.Build("fex-2610-r5", url, sha), listOf(url, "https://ghfast.top/$url"))
|
||||
assertEquals(listOf("BL_FEX_TAG=fex-2610-r5", "BL_FEX_SHA256=$sha", "BL_FEX_URLS=$url https://ghfast.top/$url"), env)
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,11 @@ class FexVersionTest {
|
||||
assertNull(fexVersionOf("# FEX_TAG=fex-2610-r3\n"))
|
||||
}
|
||||
|
||||
@Test fun readsAnInstalledOrCatalogTag() {
|
||||
assertEquals("2610 r5", fexVersionOfTag("fex-2610-r5\n"))
|
||||
assertNull(fexVersionOfTag("latest"))
|
||||
}
|
||||
|
||||
@Test fun theShippedLauncherHasOne() {
|
||||
val script = java.io.File("../tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-x64").takeIf { it.isFile }
|
||||
?: java.io.File("tools/linuxfs/overlay/usr/local/bin/droiddeck-steam-x64")
|
||||
|
||||
Reference in new issue
Block a user