Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a6da4648f | ||
|
|
b5250591ea | ||
|
|
c1ec07f726 | ||
|
|
a975f1a4e4 | ||
|
|
7c2282a7dd | ||
|
|
caeafb22be | ||
|
|
aac4f10d23 | ||
|
|
b7ac4f92ed | ||
|
|
3244efd366 | ||
|
|
7a05da3a35 | ||
|
|
5134e82e63 | ||
|
|
7fd93247cb | ||
|
|
a0fcede454 | ||
|
|
97eafd11fb | ||
|
|
ed7487c2b6 | ||
|
|
a2e3f11e70 | ||
|
|
c3c9bbc5ba | ||
|
|
b5683aa36a | ||
|
|
707455dcfb | ||
|
|
17ee5d6717 | ||
|
|
2295bcdbae |
@@ -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
|
||||||
@@ -45,6 +51,19 @@ jobs:
|
|||||||
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)"
|
||||||
@@ -127,6 +146,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
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -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,18 @@ 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.
|
||||||
|
let sidebarChild = app.descendants(matching: .any)["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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,18 @@ 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 can sit at the window's bottom
|
||||||
|
// edge where XCUI's automatic scroll-to-visible is inert (#132)
|
||||||
|
// — scroll stage-2 explicitly until the hit point is onscreen.
|
||||||
|
let printPage = app.buttons["btnPrintPage-0"]
|
||||||
|
let stage2 = app.scrollViews["stage-2"]
|
||||||
|
let scrollDeadline = Date().addingTimeInterval(10)
|
||||||
|
while Date() < scrollDeadline, !printPage.isHittable {
|
||||||
|
stage2.scroll(byDeltaX: 0, deltaY: -1)
|
||||||
|
RunLoop.current.run(until: Date().addingTimeInterval(0.2))
|
||||||
|
}
|
||||||
|
XCTAssertTrue(printPage.isHittable)
|
||||||
|
printPage.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)
|
||||||
|
|||||||
+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