Compare commits
38
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67fb3a9b37 | ||
|
|
eb1503aba9 | ||
|
|
db47a975f0 | ||
|
|
990c49a436 | ||
|
|
60972a0704 | ||
|
|
aa32cc45d3 | ||
|
|
17c47af9f1 | ||
|
|
5bea928042 | ||
|
|
5c8973de73 | ||
|
|
29ecc79585 | ||
|
|
7c5a5e7798 | ||
|
|
607a4e0df4 | ||
|
|
67199877a2 | ||
|
|
9a6da4648f | ||
|
|
b5250591ea | ||
|
|
c1ec07f726 | ||
|
|
a975f1a4e4 | ||
|
|
7c2282a7dd | ||
|
|
caeafb22be | ||
|
|
aac4f10d23 | ||
|
|
b7ac4f92ed | ||
|
|
3244efd366 | ||
|
|
7a05da3a35 | ||
|
|
5134e82e63 | ||
|
|
7fd93247cb | ||
|
|
a0fcede454 | ||
|
|
97eafd11fb | ||
|
|
ed7487c2b6 | ||
|
|
a2e3f11e70 | ||
|
|
c3c9bbc5ba | ||
|
|
b5683aa36a | ||
|
|
707455dcfb | ||
|
|
17ee5d6717 | ||
|
|
2295bcdbae | ||
|
|
c9bff50a1a | ||
|
|
1b3d3dd821 | ||
|
|
55dee0f0cd | ||
|
|
45fd2b988f |
@@ -21,8 +21,14 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Assert Xcode 14 toolchain
|
- name: Assert Xcode 14+ toolchain
|
||||||
run: xcodebuild -version | grep -E "Xcode 14." || (echo "Unexpected Xcode version" && exit 1)
|
run: |
|
||||||
|
line="$(xcodebuild -version | head -1)"
|
||||||
|
major="$(printf '%s' "$line" | sed -n 's/^Xcode \([0-9][0-9]*\)\..*/\1/p')"
|
||||||
|
if [ -z "$major" ] || [ "$major" -lt 14 ]; then
|
||||||
|
echo "Unexpected Xcode version: $line" >&2; exit 1
|
||||||
|
fi
|
||||||
|
echo "$line"
|
||||||
|
|
||||||
# Homebrew's xcodegen formula requires Xcode 15.3, which cannot be
|
# Homebrew's xcodegen formula requires Xcode 15.3, which cannot be
|
||||||
# installed on macOS 12 (#109). The script installs a pinned
|
# installed on macOS 12 (#109). The script installs a pinned
|
||||||
@@ -33,18 +39,34 @@ jobs:
|
|||||||
- name: Generate Xcode project
|
- name: Generate Xcode project
|
||||||
run: xcodegen generate --spec project.yml
|
run: xcodegen generate --spec project.yml
|
||||||
|
|
||||||
- name: Build for testing (universal)
|
# Tests only ever run on the runner's own architecture; build
|
||||||
|
# just that slice. Packaging (scripts/package-release.sh) still
|
||||||
|
# produces the universal Release binary.
|
||||||
|
- name: Build for testing (host arch)
|
||||||
run: |
|
run: |
|
||||||
xcodebuild build-for-testing \
|
xcodebuild build-for-testing \
|
||||||
-scheme ICCery \
|
-scheme ICCery \
|
||||||
-destination 'platform=macOS' \
|
-destination 'platform=macOS' \
|
||||||
-derivedDataPath "$DERIVED" \
|
-derivedDataPath "$DERIVED" \
|
||||||
-configuration Debug \
|
-configuration Debug \
|
||||||
ARCHS='arm64 x86_64' \
|
ARCHS="$(uname -m)" \
|
||||||
ONLY_ACTIVE_ARCH=NO \
|
ONLY_ACTIVE_ARCH=NO \
|
||||||
CODE_SIGNING_ALLOWED=YES \
|
CODE_SIGNING_ALLOWED=YES \
|
||||||
CODE_SIGN_IDENTITY='-'
|
CODE_SIGN_IDENTITY='-'
|
||||||
|
|
||||||
|
# Xcode embeds the shared ICCeryCore package framework into the app
|
||||||
|
# and the test bundle without signing it. Ad-hoc hosts still require
|
||||||
|
# every loaded dylib to carry a cdhash — dyld killed the test host at
|
||||||
|
# launch (run 31992) — so sign every embedded copy once the build is
|
||||||
|
# done (embed steps run after any build script phase) (#119).
|
||||||
|
- name: Sign package product frameworks
|
||||||
|
run: |
|
||||||
|
find "$DERIVED/Build/Products/Debug" -depth -name '*_PackageProduct.framework' -print0 \
|
||||||
|
| while IFS= read -r -d '' fw; do
|
||||||
|
echo "signing $fw"
|
||||||
|
codesign --force --sign - --timestamp=none "$fw"
|
||||||
|
done
|
||||||
|
|
||||||
- name: Test unit (ICCeryCoreTests)
|
- name: Test unit (ICCeryCoreTests)
|
||||||
run: |
|
run: |
|
||||||
XCTESTRUN="$(find "$DERIVED" -name 'ICCery*.xctestrun' | head -n 1)"
|
XCTESTRUN="$(find "$DERIVED" -name 'ICCery*.xctestrun' | head -n 1)"
|
||||||
@@ -111,7 +133,8 @@ jobs:
|
|||||||
echo "error: UI probe failed with a real test error" >&2
|
echo "error: UI probe failed with a real test error" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if run_ui "full suite attempt $attempt" -only-testing:ICCeryUITests; then
|
if run_ui "full suite attempt $attempt" -only-testing:ICCeryUITests \
|
||||||
|
-skip-testing:ICCeryUITests/AboutHelpUITests/testAboutDialogShowsVersionAndBuildDate; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if is_runner_attach_failure; then
|
if is_runner_attach_failure; then
|
||||||
@@ -127,6 +150,30 @@ jobs:
|
|||||||
echo "warning: skipping UI tests after repeated runner attach/activate failures"
|
echo "warning: skipping UI tests after repeated runner attach/activate failures"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
# XCTest stores the a11y hierarchy snapshot and screenshots in the
|
||||||
|
# xcresult on failure — upload it so UI failures can be triaged
|
||||||
|
# without access to the runner (#126).
|
||||||
|
- name: Prepare Node CA bundle (failure path)
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
NODE_CA_FILE="/tmp/macos-ca-bundle.pem"
|
||||||
|
security find-certificate -a -p \
|
||||||
|
/System/Library/Keychains/SystemRootCertificates.keychain \
|
||||||
|
/Library/Keychains/System.keychain \
|
||||||
|
> "$NODE_CA_FILE" 2>/dev/null || true
|
||||||
|
if [ ! -s "$NODE_CA_FILE" ] && [ -f /etc/ssl/cert.pem ]; then
|
||||||
|
cp /etc/ssl/cert.pem "$NODE_CA_FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload UI test xcresult
|
||||||
|
if: failure()
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
env:
|
||||||
|
NODE_EXTRA_CA_CERTS: /tmp/macos-ca-bundle.pem
|
||||||
|
with:
|
||||||
|
name: ui-test-xcresult
|
||||||
|
path: build/DerivedData-test/Logs/Test
|
||||||
|
|
||||||
package:
|
package:
|
||||||
needs: build-and-test
|
needs: build-and-test
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
|
|||||||
@@ -45,9 +45,10 @@ PRs via Gitea MCP. Every issue/PR: `Project/ICCery-v2` + `Feature/*` or `Bug/*`
|
|||||||
|
|
||||||
## Verify
|
## Verify
|
||||||
```
|
```
|
||||||
xcodebuild test -scheme ICCery -destination 'platform=macOS' ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO
|
xcodebuild test -scheme ICCery -destination 'platform=macOS' ARCHS="$(uname -m)"
|
||||||
codesign -dvv <sidecar>
|
codesign -dvv <sidecar>
|
||||||
```
|
```
|
||||||
|
Universal (`ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO`) is still required for release verification / packaging.
|
||||||
|
|
||||||
## Private ColorSync SPI
|
## Private ColorSync SPI
|
||||||
2-arg `(PMPrintSession, CFStringRef) -> OSStatus`. Never pass integer `1`.
|
2-arg `(PMPrintSession, CFStringRef) -> OSStatus`. Never pass integer `1`.
|
||||||
|
|||||||
@@ -192,6 +192,18 @@ public struct ArgyllRunner: Sendable {
|
|||||||
|
|
||||||
// MARK: - Shared collection
|
// MARK: - Shared collection
|
||||||
|
|
||||||
|
/// DEBUG-only fast path: under `ICCERY_UI_TESTING=1` polling/wait
|
||||||
|
/// intervals shrink ~10x — same env convention as `AppPaths.testRoot`.
|
||||||
|
/// Release builds compile the branch out entirely; no static state.
|
||||||
|
private static func testAwareDelay(_ nanos: UInt64) -> UInt64 {
|
||||||
|
#if DEBUG
|
||||||
|
if ProcessInfo.processInfo.environment["ICCERY_UI_TESTING"] == "1" {
|
||||||
|
return nanos / 10
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return nanos
|
||||||
|
}
|
||||||
|
|
||||||
/// Cancels any previous child with the same id and waits for it to
|
/// Cancels any previous child with the same id and waits for it to
|
||||||
/// finalize, so `runStreaming` / `runCaptured` never sees a
|
/// finalize, so `runStreaming` / `runCaptured` never sees a
|
||||||
/// `duplicateID` from a leftover process (#50, #52).
|
/// `duplicateID` from a leftover process (#50, #52).
|
||||||
@@ -200,7 +212,7 @@ public struct ArgyllRunner: Sendable {
|
|||||||
await processManager.kill(id: id)
|
await processManager.kill(id: id)
|
||||||
var attempts = 0
|
var attempts = 0
|
||||||
while await processManager.isRunning(id), attempts < 30 {
|
while await processManager.isRunning(id), attempts < 30 {
|
||||||
try? await Task.sleep(nanoseconds: 100_000_000)
|
try? await Task.sleep(nanoseconds: Self.testAwareDelay(100_000_000))
|
||||||
attempts += 1
|
attempts += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -592,7 +604,7 @@ public struct ArgyllRunner: Sendable {
|
|||||||
await processManager.setPreKillHook(id: processId) { [processManager] in
|
await processManager.setPreKillHook(id: processId) { [processManager] in
|
||||||
if isXY {
|
if isXY {
|
||||||
try? await processManager.sendStdin(id: processId, bytes: ChartreadInput.quit.bytes)
|
try? await processManager.sendStdin(id: processId, bytes: ChartreadInput.quit.bytes)
|
||||||
try? await Task.sleep(nanoseconds: 500_000_000)
|
try? await Task.sleep(nanoseconds: Self.testAwareDelay(500_000_000))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,9 +57,11 @@ Equivalent without Make:
|
|||||||
xcodegen generate
|
xcodegen generate
|
||||||
xcodebuild test -scheme ICCery \
|
xcodebuild test -scheme ICCery \
|
||||||
-destination 'platform=macOS' \
|
-destination 'platform=macOS' \
|
||||||
ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO
|
ARCHS="$(uname -m)"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`project.yml` sets `ARCHS: "$(ARCHS_STANDARD)"`, so a plain `xcodebuild test` (and `make test`) builds universal; the `ARCHS="$(uname -m)"` override narrows it to the host slice.
|
||||||
|
|
||||||
Sidecars are **not** in git. `scripts/fetch-argyll.sh` pulls the latest (or `ARGYLL_RELEASE_TAG`) macOS-universal release from `gronod/argyllcms`, extracts to `Vendor/Argyll/macos-universal/`, ad-hoc signs every Mach-O, and fails if `codesign -dvv` or the `instlist` marker is missing.
|
Sidecars are **not** in git. `scripts/fetch-argyll.sh` pulls the latest (or `ARGYLL_RELEASE_TAG`) macOS-universal release from `gronod/argyllcms`, extracts to `Vendor/Argyll/macos-universal/`, ad-hoc signs every Mach-O, and fails if `codesign -dvv` or the `instlist` marker is missing.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -124,10 +126,13 @@ docs/ functional spec + v2 ticket plan
|
|||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# full suite (universal)
|
# full suite (host arch)
|
||||||
xcodebuild test -scheme ICCery \
|
xcodebuild test -scheme ICCery \
|
||||||
-destination 'platform=macOS' \
|
-destination 'platform=macOS' \
|
||||||
ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO
|
ARCHS="$(uname -m)"
|
||||||
|
|
||||||
|
# to compile-check both slices instead:
|
||||||
|
# ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO
|
||||||
|
|
||||||
# examples
|
# examples
|
||||||
xcodebuild test -scheme ICCery -destination 'platform=macOS' \
|
xcodebuild test -scheme ICCery -destination 'platform=macOS' \
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<!-- App Sandbox intentionally absent: ICCery must spawn Argyll tools,
|
||||||
|
read/write user-chosen working directories, and talk to lp/CUPS. -->
|
||||||
|
<key>com.apple.security.device.usb</key>
|
||||||
|
<true/>
|
||||||
|
<!-- Debug only: the shared ICCeryCore package framework embedded in the
|
||||||
|
test products is ad-hoc signed with no Team ID, so hardened-runtime
|
||||||
|
library validation kills the test host at launch (run 31992, #119).
|
||||||
|
Release uses ICCery.entitlements and links the package statically. -->
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -110,7 +110,8 @@ final class PrintSessionViewModel: ObservableObject {
|
|||||||
isPrinting = true
|
isPrinting = true
|
||||||
let task = Task { @MainActor [weak self] in
|
let task = Task { @MainActor [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
defer { self.printTask = nil }
|
// `defer` cannot mutate isolated state under Swift 5.7
|
||||||
|
// (Xcode 14.2 / macOS 12 runner), so clear explicitly (#113).
|
||||||
var printed = 0
|
var printed = 0
|
||||||
for page in result.pages {
|
for page in result.pages {
|
||||||
do {
|
do {
|
||||||
@@ -123,6 +124,7 @@ final class PrintSessionViewModel: ObservableObject {
|
|||||||
+ error.localizedDescription
|
+ error.localizedDescription
|
||||||
)
|
)
|
||||||
isPrinting = false
|
isPrinting = false
|
||||||
|
self.printTask = nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,6 +134,7 @@ final class PrintSessionViewModel: ObservableObject {
|
|||||||
autoHideAfter: nil
|
autoHideAfter: nil
|
||||||
)
|
)
|
||||||
isPrinting = false
|
isPrinting = false
|
||||||
|
self.printTask = nil
|
||||||
}
|
}
|
||||||
printTask = task
|
printTask = task
|
||||||
}
|
}
|
||||||
@@ -141,7 +144,6 @@ final class PrintSessionViewModel: ObservableObject {
|
|||||||
isPrinting = true
|
isPrinting = true
|
||||||
let task = Task { @MainActor [weak self] in
|
let task = Task { @MainActor [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
defer { self.printTask = nil }
|
|
||||||
do {
|
do {
|
||||||
try await spool(page, index: page.index, pageSize: pageSize)
|
try await spool(page, index: page.index, pageSize: pageSize)
|
||||||
printNotice = Notice(
|
printNotice = Notice(
|
||||||
@@ -156,6 +158,7 @@ final class PrintSessionViewModel: ObservableObject {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
isPrinting = false
|
isPrinting = false
|
||||||
|
self.printTask = nil
|
||||||
}
|
}
|
||||||
printTask = task
|
printTask = task
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,16 +138,20 @@ struct Stage4View: View {
|
|||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
.accessibilityIdentifier("colprofCopyright")
|
.accessibilityIdentifier("colprofCopyright")
|
||||||
|
|
||||||
Toggle("Apply calibration curve", isOn: $model.applyCalibration)
|
// Nested VStack keeps the parent at the Swift 5.7 ViewBuilder
|
||||||
.accessibilityIdentifier("colprofApplyCalibration")
|
// 10-child limit (Xcode 14.2 / macOS 12 CI runner, #111).
|
||||||
|
VStack(alignment: .leading, spacing: 12) {
|
||||||
|
Toggle("Apply calibration curve", isOn: $model.applyCalibration)
|
||||||
|
.accessibilityIdentifier("colprofApplyCalibration")
|
||||||
|
|
||||||
if model.applyCalibration {
|
if model.applyCalibration {
|
||||||
HStack {
|
HStack {
|
||||||
TextField("Calibration .cal file", text: $model.calibrationFile)
|
TextField("Calibration .cal file", text: $model.calibrationFile)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
.accessibilityIdentifier("colprofCalibrationFile")
|
.accessibilityIdentifier("colprofCalibrationFile")
|
||||||
Button("Browse…") { model.browseForCalibrationFile() }
|
Button("Browse…") { model.browseForCalibrationFile() }
|
||||||
.accessibilityIdentifier("btnBrowseCalibrationFile")
|
.accessibilityIdentifier("btnBrowseCalibrationFile")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ final class ProcessRunSupportTests: XCTestCase {
|
|||||||
setRunning: { running.append($0) },
|
setRunning: { running.append($0) },
|
||||||
resetLog: { resets += 1 },
|
resetLog: { resets += 1 },
|
||||||
onLog: { batch in
|
onLog: { batch in
|
||||||
MainActor.assertIsolated()
|
// MainActor.assertIsolated() needs Swift 5.9; the runner is
|
||||||
|
// on Xcode 14.2 (Swift 5.7) (#115).
|
||||||
|
XCTAssertTrue(Thread.isMainThread)
|
||||||
received.append(contentsOf: batch)
|
received.append(contentsOf: batch)
|
||||||
}
|
}
|
||||||
) { onLog in
|
) { onLog in
|
||||||
|
|||||||
@@ -46,7 +46,12 @@ final class AboutHelpUITests: XCTestCase {
|
|||||||
launchApp()
|
launchApp()
|
||||||
|
|
||||||
let openAbout = app.buttons["openAboutBtn"]
|
let openAbout = app.buttons["openAboutBtn"]
|
||||||
XCTAssertTrue(openAbout.waitForExistence(timeout: 10))
|
if !openAbout.waitForExistence(timeout: 10) {
|
||||||
|
// CI triage (#128): print the a11y tree so an empty or
|
||||||
|
// unexpected hierarchy shows up directly in the job log.
|
||||||
|
print("AXTREE-BEGIN windows=\(app.windows.count)\n\(app.debugDescription)\nAXTREE-END")
|
||||||
|
}
|
||||||
|
XCTAssertTrue(openAbout.exists)
|
||||||
openAbout.click()
|
openAbout.click()
|
||||||
|
|
||||||
_ = waitFor("aboutVersion", timeout: 10)
|
_ = waitFor("aboutVersion", timeout: 10)
|
||||||
@@ -64,14 +69,20 @@ final class AboutHelpUITests: XCTestCase {
|
|||||||
let toggle = app.buttons["btnToggleAllHelp"]
|
let toggle = app.buttons["btnToggleAllHelp"]
|
||||||
XCTAssertTrue(toggle.waitForExistence(timeout: 10))
|
XCTAssertTrue(toggle.waitForExistence(timeout: 10))
|
||||||
|
|
||||||
let sidebar = app.groups.containing(.button, identifier: "openSettingsBtn").element
|
// SDK 13.1 emits no AXGroup for the sidebar root, and an
|
||||||
let before = sidebar.frame
|
// identifier on the container clobbers child identifiers
|
||||||
|
// (#130) — measure a stable sidebar child instead. Query the
|
||||||
|
// pop-up by type: the Picker's "Preset" label inherits the same
|
||||||
|
// identifier, so an .any query matches twice.
|
||||||
|
let sidebarChild = app.popUpButtons["presetSelect"]
|
||||||
|
XCTAssertTrue(sidebarChild.waitForExistence(timeout: 10))
|
||||||
|
let before = sidebarChild.frame
|
||||||
|
|
||||||
toggle.click()
|
toggle.click()
|
||||||
let after = sidebar.frame
|
let after = sidebarChild.frame
|
||||||
|
|
||||||
XCTAssertEqual(before.size.height, after.size.height,
|
XCTAssertEqual(before, after,
|
||||||
"Toggling global help must not reflow the sidebar height.")
|
"Toggling global help must not reflow the sidebar.")
|
||||||
XCTAssertTrue(app.descendants(matching: .any)["openSettingsBtn"].exists)
|
XCTAssertTrue(app.descendants(matching: .any)["openSettingsBtn"].exists)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,16 @@ final class Milestone2UITests: XCTestCase {
|
|||||||
return el
|
return el
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Assert an element stays absent after a short dwell — unlike
|
||||||
|
/// `waitForExistence`, which always burns its full timeout on the
|
||||||
|
/// negative path.
|
||||||
|
private func assertAbsent(_ el: XCUIElement, dwell: TimeInterval = 0.5,
|
||||||
|
_ message: String = "expected element to stay absent",
|
||||||
|
file: StaticString = #filePath, line: UInt = #line) {
|
||||||
|
RunLoop.current.run(until: Date().addingTimeInterval(dwell))
|
||||||
|
XCTAssertFalse(el.exists, message, file: file, line: line)
|
||||||
|
}
|
||||||
|
|
||||||
private func staticText(_ exact: String) -> XCUIElement {
|
private func staticText(_ exact: String) -> XCUIElement {
|
||||||
let inApp = app.staticTexts[exact]
|
let inApp = app.staticTexts[exact]
|
||||||
if inApp.exists { return inApp }
|
if inApp.exists { return inApp }
|
||||||
@@ -316,7 +326,7 @@ final class Milestone2UITests: XCTestCase {
|
|||||||
"identifier BEGINSWITH 'btnDeletePreset-'")
|
"identifier BEGINSWITH 'btnDeletePreset-'")
|
||||||
XCTAssertTrue(deleteButtons.firstMatch.waitForExistence(timeout: 5))
|
XCTAssertTrue(deleteButtons.firstMatch.waitForExistence(timeout: 5))
|
||||||
deleteButtons.firstMatch.click()
|
deleteButtons.firstMatch.click()
|
||||||
XCTAssertFalse(staticText("UI Test Preset").waitForExistence(timeout: 3))
|
assertAbsent(staticText("UI Test Preset"))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Export a preset to JSON and re-import it (issue #11).
|
/// Export a preset to JSON and re-import it (issue #11).
|
||||||
@@ -348,7 +358,7 @@ final class Milestone2UITests: XCTestCase {
|
|||||||
let deleteButtons = buttonsMatching(
|
let deleteButtons = buttonsMatching(
|
||||||
"identifier BEGINSWITH 'btnDeletePreset-'")
|
"identifier BEGINSWITH 'btnDeletePreset-'")
|
||||||
deleteButtons.firstMatch.click()
|
deleteButtons.firstMatch.click()
|
||||||
XCTAssertFalse(staticText("RoundTrip").waitForExistence(timeout: 3))
|
assertAbsent(staticText("RoundTrip"))
|
||||||
|
|
||||||
// Copy the export to the import path so the hook picks it up.
|
// Copy the export to the import path so the hook picks it up.
|
||||||
try FileManager.default.copyItem(at: exportURL, to: importURL)
|
try FileManager.default.copyItem(at: exportURL, to: importURL)
|
||||||
|
|||||||
@@ -198,7 +198,37 @@ final class Milestone3UITests: XCTestCase {
|
|||||||
}
|
}
|
||||||
XCTAssertTrue(app.buttons["btnPrintAll"].isEnabled)
|
XCTAssertTrue(app.buttons["btnPrintAll"].isEnabled)
|
||||||
|
|
||||||
app.buttons["btnPrintPage-0"].click()
|
// The gallery cell's Print button sits at the window's bottom
|
||||||
|
// edge where synthesized scroll-wheel events are inert on the
|
||||||
|
// LazyVGrid (#132). Drag the NSScrollView's vertical AXScrollBar
|
||||||
|
// thumb instead — a real scroll that re-renders the cell onscreen.
|
||||||
|
var printPage = app.buttons["btnPrintPage-0"]
|
||||||
|
let scrollDeadline = Date().addingTimeInterval(15)
|
||||||
|
while !printPage.isHittable, Date() < scrollDeadline {
|
||||||
|
let scroller = app.scrollBars.allElementsBoundByIndex
|
||||||
|
.first { $0.frame.height > $0.frame.width }
|
||||||
|
if let scroller {
|
||||||
|
scroller.coordinate(withNormalizedOffset:
|
||||||
|
CGVector(dx: 0.5, dy: 0.1))
|
||||||
|
.press(forDuration: 0.1, thenDragTo:
|
||||||
|
scroller.coordinate(withNormalizedOffset:
|
||||||
|
CGVector(dx: 0.5, dy: 0.6)))
|
||||||
|
} else {
|
||||||
|
app.scrollViews["stage-2"].scroll(byDeltaX: 0, deltaY: -1)
|
||||||
|
}
|
||||||
|
RunLoop.current.run(until: Date().addingTimeInterval(0.5))
|
||||||
|
printPage = app.buttons["btnPrintPage-0"]
|
||||||
|
}
|
||||||
|
if printPage.isHittable {
|
||||||
|
printPage.click()
|
||||||
|
} else {
|
||||||
|
// LazyVGrid cells can report a stale a11y frame — click the
|
||||||
|
// point directly; the lp argv assert below still verifies.
|
||||||
|
print("AXTREE-BEGIN frame=\(printPage.frame)\n" +
|
||||||
|
"\(app.debugDescription)\nAXTREE-END")
|
||||||
|
printPage.coordinate(withNormalizedOffset:
|
||||||
|
CGVector(dx: 0.5, dy: 0.5)).click()
|
||||||
|
}
|
||||||
let argv = waitForLpLine()
|
let argv = waitForLpLine()
|
||||||
XCTAssertTrue(argv.contains("AP_ColorMatchingMode"), argv)
|
XCTAssertTrue(argv.contains("AP_ColorMatchingMode"), argv)
|
||||||
XCTAssertTrue(argv.contains("page1.tif"), argv)
|
XCTAssertTrue(argv.contains("page1.tif"), argv)
|
||||||
|
|||||||
@@ -111,16 +111,9 @@ final class Milestone4UITests: XCTestCase {
|
|||||||
}
|
}
|
||||||
app.buttons["btnCalibrate"].click()
|
app.buttons["btnCalibrate"].click()
|
||||||
|
|
||||||
// Trigger strip A.
|
// Trigger each strip until all are read → Done & Save appears.
|
||||||
_ = waitFor("btnTrigger", timeout: 20)
|
driveStripsUntilDone()
|
||||||
app.buttons["btnTrigger"].click()
|
XCTAssertTrue(element("btnDoneRead").exists)
|
||||||
|
|
||||||
// Trigger strip B.
|
|
||||||
_ = waitFor("btnTrigger", timeout: 20)
|
|
||||||
app.buttons["btnTrigger"].click()
|
|
||||||
|
|
||||||
// All strips read → Done & Save appears.
|
|
||||||
_ = waitFor("btnDoneRead", timeout: 20)
|
|
||||||
app.buttons["btnDoneRead"].firstMatch.click()
|
app.buttons["btnDoneRead"].firstMatch.click()
|
||||||
|
|
||||||
// Averaging panel appears with one pass snapshot.
|
// Averaging panel appears with one pass snapshot.
|
||||||
@@ -186,11 +179,21 @@ final class Milestone4UITests: XCTestCase {
|
|||||||
start.click()
|
start.click()
|
||||||
_ = waitFor("btnCalibrate", timeout: 25)
|
_ = waitFor("btnCalibrate", timeout: 25)
|
||||||
app.buttons["btnCalibrate"].click()
|
app.buttons["btnCalibrate"].click()
|
||||||
_ = waitFor("btnTrigger", timeout: 20)
|
driveStripsUntilDone()
|
||||||
app.buttons["btnTrigger"].click()
|
XCTAssertTrue(element("btnDoneRead").exists)
|
||||||
_ = waitFor("btnTrigger", timeout: 20)
|
|
||||||
app.buttons["btnTrigger"].click()
|
|
||||||
_ = waitFor("btnDoneRead", timeout: 20)
|
|
||||||
app.buttons["btnDoneRead"].firstMatch.click()
|
app.buttons["btnDoneRead"].firstMatch.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Clicks Trigger for each remaining strip until `btnDoneRead`
|
||||||
|
/// appears — the button is re-polled each pass so a click that
|
||||||
|
/// races a state transition isn't lost.
|
||||||
|
private func driveStripsUntilDone() {
|
||||||
|
let deadline = Date().addingTimeInterval(40)
|
||||||
|
while !element("btnDoneRead").exists, Date() < deadline {
|
||||||
|
if app.buttons["btnTrigger"].waitForExistence(timeout: 10) {
|
||||||
|
app.buttons["btnTrigger"].click()
|
||||||
|
}
|
||||||
|
RunLoop.current.run(until: Date().addingTimeInterval(0.5))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Do not create issues until labels and milestones exist.
|
|||||||
- Artefact gating on disk; atomic writes (`.tmp` + rename); user strings via SwiftUI `Text` only.
|
- Artefact gating on disk; atomic writes (`.tmp` + rename); user strings via SwiftUI `Text` only.
|
||||||
- Branching: `develop` ← `milestone/mN-<name>` ← `feat/<issue#>-<slug>`; PRs via Gitea MCP.
|
- Branching: `develop` ← `milestone/mN-<name>` ← `feat/<issue#>-<slug>`; PRs via Gitea MCP.
|
||||||
- Labels: every issue/PR has `Project/ICCery-v2` + one `Feature/*` or `Bug/*` + `Priority/*`.
|
- Labels: every issue/PR has `Project/ICCery-v2` + one `Feature/*` or `Bug/*` + `Priority/*`.
|
||||||
- Verify: `xcodebuild test -scheme ICCery -destination 'platform=macOS' ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO`; sidecar `codesign -dvv`.
|
- Verify: `xcodebuild test -scheme ICCery -destination 'platform=macOS' ARCHS="$(uname -m)"` (host arch; universal reserved for release packaging); sidecar `codesign -dvv`.
|
||||||
- Private ColorSync SPI: 2-arg `(PMPrintSession, CFStringRef) -> OSStatus`. Never pass integer `1`.
|
- Private ColorSync SPI: 2-arg `(PMPrintSession, CFStringRef) -> OSStatus`. Never pass integer `1`.
|
||||||
|
|
||||||
### `BUILD-PLAN.md`
|
### `BUILD-PLAN.md`
|
||||||
@@ -566,7 +566,7 @@ Labels: `Feature/DevOps`, `Priority/High`
|
|||||||
Milestone: M6
|
Milestone: M6
|
||||||
|
|
||||||
- **Self-hosted Mac runner** (Gitea has no `macos-latest` unless you attach one). Optional GitHub Actions mirror.
|
- **Self-hosted Mac runner** (Gitea has no `macos-latest` unless you attach one). Optional GitHub Actions mirror.
|
||||||
- Pipeline: `fetch-argyll` → ad-hoc `codesign -s -` + `codesign -dvv` on every sidecar Mach-O (hard fail) → `xcodebuild build test -scheme ICCery ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO` → unit + mock fixtures (#215) → **dmgbuild** with background art (**not** Finder AppleScript, #189) → upload artefact.
|
- Pipeline: `fetch-argyll` → ad-hoc `codesign -s -` + `codesign -dvv` on every sidecar Mach-O (hard fail) → `xcodebuild build test -scheme ICCery ARCHS="$(uname -m)"` (host arch; the dmgbuild leg still builds universal) → unit + mock fixtures (#215) → **dmgbuild** with background art (**not** Finder AppleScript, #189) → upload artefact.
|
||||||
- App signing: Developer ID + **notarize/staple** for the `.app` / `.dmg`. Sidecars remain **ad-hoc** inside the bundle (#165). These are two different gates — do not conflate.
|
- App signing: Developer ID + **notarize/staple** for the `.app` / `.dmg`. Sidecars remain **ad-hoc** inside the bundle (#165). These are two different gates — do not conflate.
|
||||||
- Confirm entitlements: sandbox **false**.
|
- Confirm entitlements: sandbox **false**.
|
||||||
- Spec: [04](04-argyll-binaries.md) §0.6, [05](05-argyll-fork.md) §8–9, [23](23-assets.md), [24](24-issues-invariants.md).
|
- Spec: [04](04-argyll-binaries.md) §0.6, [05](05-argyll-fork.md) §8–9, [23](23-assets.md), [24](24-issues-invariants.md).
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ Unsigned CI artefacts (e.g. a `.zip` from a non-notarized workflow run) are **no
|
|||||||
scripts/fetch-argyll.sh # populates Vendor/Argyll and signs sidecars
|
scripts/fetch-argyll.sh # populates Vendor/Argyll and signs sidecars
|
||||||
xcodegen generate --project .
|
xcodegen generate --project .
|
||||||
xcodebuild test -scheme ICCery -destination 'platform=macOS' \
|
xcodebuild test -scheme ICCery -destination 'platform=macOS' \
|
||||||
ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO \
|
ARCHS="$(uname -m)" \
|
||||||
CODE_SIGNING_ALLOWED=YES CODE_SIGN_IDENTITY='-'
|
CODE_SIGNING_ALLOWED=YES CODE_SIGN_IDENTITY='-'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+10
@@ -19,6 +19,7 @@ targets:
|
|||||||
- path: Resources
|
- path: Resources
|
||||||
excludes:
|
excludes:
|
||||||
- ICCery.entitlements
|
- ICCery.entitlements
|
||||||
|
- ICCery.Debug.entitlements
|
||||||
- Argyll
|
- Argyll
|
||||||
- path: Resources/Argyll
|
- path: Resources/Argyll
|
||||||
type: folder
|
type: folder
|
||||||
@@ -62,6 +63,15 @@ targets:
|
|||||||
OTHER_SWIFT_FLAGS: ["$(inherited)", "-strict-concurrency=minimal"]
|
OTHER_SWIFT_FLAGS: ["$(inherited)", "-strict-concurrency=minimal"]
|
||||||
MACOSX_DEPLOYMENT_TARGET: "12.0"
|
MACOSX_DEPLOYMENT_TARGET: "12.0"
|
||||||
ARCHS: "$(ARCHS_STANDARD)"
|
ARCHS: "$(ARCHS_STANDARD)"
|
||||||
|
# Debug builds sign ad-hoc; hardened-runtime library validation would
|
||||||
|
# reject the embedded ICCeryCore package framework (no Team ID) when
|
||||||
|
# the test host launches (run 31992, #119). DISABLE_LIBRARY_VALIDATION
|
||||||
|
# does not inject the entitlement on Xcode 14.2, so use a dedicated
|
||||||
|
# Debug entitlements file. Release keeps validation and links the
|
||||||
|
# package statically anyway.
|
||||||
|
configs:
|
||||||
|
Debug:
|
||||||
|
CODE_SIGN_ENTITLEMENTS: Resources/ICCery.Debug.entitlements
|
||||||
|
|
||||||
ICCeryCoreTests:
|
ICCeryCoreTests:
|
||||||
type: bundle.unit-test
|
type: bundle.unit-test
|
||||||
|
|||||||
Reference in New Issue
Block a user