Skip to content

test(avd): create the production comparison at mas_1's resolution - #67

Merged
qiyinxi merged 1 commit into
ModAVD:mainfrom
qiyinxi:fix/avd-prod-test-resolution
Nov 5, 2026
Merged

qiyinxi merged 1 commit into
ModAVD:mainfrom
qiyinxi:fix/avd-prod-test-resolution

Conversation

@qiyinxi

@qiyinxi qiyinxi commented Nov 5, 2026

Copy link
Copy Markdown
Member

#61 合进 main 以后,internal/avd 的 TestMatchesProductionInstance 在维护者的机器上挂了(CI 上没有生产根目录,这个测试是跳过的,所以 CI 一直是绿的)。

这个测试按生产根目录 mas_1 的选项(内存、核数、数据盘、帧率)新建一台,再逐字节比 config.ini 和 mas_1.ini。#61 把新建的默认分辨率改成了 1080p,而 mas_1 是 720p,测试没把它的分辨率传进去。挂的时候两边只差 hw.lcd.width、hw.lcd.height、hw.lcd.density 三行,模板别的地方一个字节都没变,所以是测试没跟上,不是 #61 改坏了。

改法:和别的选项一样,把 mas_1 的分辨率(in.Resolution())也传给 Create,注释里补一句原因。只改测试。

验证:在有生产根目录的机器上跑 go test ./internal/avd -run TestMatchesProductionInstance(只读生产的两个配置文件);不带这个改动时照样挂在那三行上。

Refs ModAVD/ModAVD#100

TestMatchesProductionInstance builds an instance with the options read
from D:\ModAVD's mas_1 and compares the bytes. Since ModAVD#61 new instances
default to 1080p while mas_1 is 720p, so the test now passes mas_1's
resolution like the other options. Only hw.lcd.width/height/density
differed; nothing else in the template changed.

Refs ModAVD/ModAVD#100
@qiyinxi
qiyinxi merged commit 380a422 into ModAVD:main Nov 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant