mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 15:26:04 +00:00
ci: keep unit-test scratch out of the runner's shared /tmp (#3083)
* ci: keep unit-test scratch out of the runner's shared /tmp Test JVMs now write temp files under the test task's build folder, which checkout wipes on every job, so a killed run no longer leaves Robolectric and JUnit folders behind in /tmp. Self-hosted runners also clear stale test folders they own in /tmp, drop the regenerable Gradle build cache when the workspace has under 20 GB free, and log disk use so a full disk is visible in the job. * test(agent): size check no longer depends on the temp path's length A symlink's own size is the length of its target path, so the old 100-byte bound failed once the temp dir moved under the build folder. * ci: never remove a mount point while clearing runner scratch * ci: keep a scratch folder that anything inside it touched recently * ci: keep a scratch folder the freshness scan could not read
This commit is contained in:
1 parent
e3b1b60914
commit
b0a8c0898e
4 files changed
+26
-2
No files matched your search
@@ -11,13 +11,13 @@ class AgentStorageTest {
|
||||
@Test fun removingAFolderKeepsWhatItsLinksPointAt() {
|
||||
val base = Files.createTempDirectory("agent-storage")
|
||||
val outside = Files.createDirectories(base.resolve("sdcard"))
|
||||
Files.write(outside.resolve("save.dat"), ByteArray(100))
|
||||
Files.write(outside.resolve("save.dat"), ByteArray(1 shl 20))
|
||||
val item = Files.createDirectories(base.resolve("rootfs/android-sdk"))
|
||||
Files.write(item.resolve("a.jar"), ByteArray(10))
|
||||
val linked = runCatching { Files.createSymbolicLink(item.resolve("saves"), outside) }.isSuccess
|
||||
assumeTrue("symbolic links need privileges on this OS", linked)
|
||||
|
||||
assertTrue(AgentStorage.size(item) < 100)
|
||||
assertTrue(AgentStorage.size(item) < 1 shl 20)
|
||||
AgentStorage.delete(item)
|
||||
assertFalse(Files.exists(item))
|
||||
assertTrue(Files.exists(outside.resolve("save.dat")))
|
||||
|
||||
Reference in new issue
Block a user