From a2458580baa59158e735f5a924a257c6f550705c Mon Sep 17 00:00:00 2001 From: qiyinxi Date: Thu, 5 Nov 2026 17:02:59 +0100 Subject: [PATCH] =?UTF-8?q?test(emu):=20=E4=B8=A4=E5=A4=84=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=87=8C=E7=9A=84=E6=9C=AC=E6=9C=BA=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E6=8D=A2=E6=88=90=E9=80=9A=E7=94=A8=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit disk_integration_test.go 注释里的 SDK 路径改成占位写法,disk_test.go 里 qemu-img check 样例输出的 filename 换成 C:\avd\x.avd\…。只改测试的注释和样例数据,测试逻辑不变(这个字段不参与断言)。 发版打包的隐私扫描会扫源码包里的管理器源码,这两行会被私有规则拦下。 Refs ModAVD/ModAVDManager#47、ModAVD/ModAVDManager#65 --- internal/emu/disk_integration_test.go | 2 +- internal/emu/disk_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/emu/disk_integration_test.go b/internal/emu/disk_integration_test.go index e2d38bc..7c16188 100644 --- a/internal/emu/disk_integration_test.go +++ b/internal/emu/disk_integration_test.go @@ -20,7 +20,7 @@ import ( // TestDiskCompactIntegration runs compact end to end against a real qemu-img -- the path the fake-manager unit tests // cannot reach, and the one the `-T none` bug failed on for every real qcow2 overlay (ModAVD/ModAVD#2 P1-1). It is // skipped unless MODAVD_TEST_SDK_ROOT points at an SDK whose emulator\qemu-img.exe exists, so CI without an SDK just -// skips it. Run it with, e.g., MODAVD_TEST_SDK_ROOT=E:\aosp\sdk-mas37. +// skips it. Run it with MODAVD_TEST_SDK_ROOT set to such an SDK directory, e.g. MODAVD_TEST_SDK_ROOT=. func TestDiskCompactIntegration(t *testing.T) { t.Run("EmptyBacking", func(t *testing.T) { testDiskCompactIntegration(t, false) diff --git a/internal/emu/disk_test.go b/internal/emu/disk_test.go index 15503fc..b78c6d1 100644 --- a/internal/emu/disk_test.go +++ b/internal/emu/disk_test.go @@ -60,7 +60,7 @@ func TestParseQemuImgCheck(t *testing.T) { "total-clusters": 131072, "check-errors": 0, "allocated-clusters": 32586, - "filename": "E:\\private\\avd\\x.avd\\userdata-qemu.img.qcow2", + "filename": "C:\\avd\\x.avd\\userdata-qemu.img.qcow2", "format": "qcow2", "fragmented-clusters": 6736 }