Improve portable launch, forge persistence, and operator auth UX.
Persist build extra_files for Build Manager history, print dashboard login on every start, add libp2p for Mesh P2P forge, defer WebSocket until login, and split devrun.bat from LAUNCH.bat with USB deck auto-detection.
This commit is contained in:
25
agent/stats/reporter_darwin_test.go
Normal file
25
agent/stats/reporter_darwin_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
//go:build darwin
|
||||
|
||||
package stats
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestParseVmStatFreePages(t *testing.T) {
|
||||
out := `Mach Virtual Memory Statistics: (page size of 4096 bytes)
|
||||
Pages free: 12345.
|
||||
Pages active: 67890.
|
||||
`
|
||||
if got := parseVmStatFreePages(out); got != 12345 {
|
||||
t.Fatalf("got %d", got)
|
||||
}
|
||||
if parseVmStatFreePages("no free pages here") != 0 {
|
||||
t.Fatal("missing line should return 0")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseVmStatFreeBytes(t *testing.T) {
|
||||
out := "Pages free: 1000.\n"
|
||||
if got := parseVmStatFreeBytes(out); got != 1000*4096 {
|
||||
t.Fatalf("got %d", got)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user