AtlatestRepositorysigil-ui

sigil-ui / tree / scripts / macosverify.sgl

1;;; FONT FONT_OBJECT_DIRECTORY NATIVE_AUDIT_DIRECTORY — no Mac execution.
2(import (sigil shell prelude))
3(define root (realpath (path (script-dir) "../..")))
4(define font (realpath (arg 1)))
5(define audit (realpath (arg 3)))
6(define cli (or (getenv "SIGIL") "sigil"))
7($ ,cli ,(path font "scripts/verify-sdk-free.sgl") ,(arg 2) "--images")
8(load (path font "scripts/macho.sgl"))
9(each arch '("aarch64" "x86_64")
10 (define cpu (if (equal? arch "aarch64") #x100000c #x1000007))
11 (each file (glob (path audit arch "**/*.o")) (verify file cpu '() #f #t))
12 (define config (if (equal? arch "aarch64") "darwin-arm64" "darwin-amd64"))
13 (define native (path font "test/coretext-host/build" config "native"))
14 (define runtime (glob (path native (str "sigil-lib-objs-" arch "-macos.15.0-none") "*.o")))
15 (unless (>= (length runtime) 80) (error "Incomplete runtime object receipt" config))
16 (each file runtime (verify file cpu '() #f #t))
17 (verify (path native "allocator-stock.o") cpu '()))
18(verify (path root "test/macos-drawing/build/darwin-arm64/bin/sigil-font-ui-drawing-tests") #x100000c '() #t)