Files
craft-libs/crates/update/Cargo.toml
T
dotCooCoo 76159a6f18 craft-update: cancel and output-limit tests no longer depend on elapsed time
Two tests of the Flatpak helper runner decided their results with the
clock. One canceled the run after 100 ms and checked that it took under
5 s. The other waited out the real 5 s output limit against a `sleep 8`
descendant and checked that it took under 8 s.

`cancellable_output` now waits through `cancellable_output_until`, which
asks a `keep_waiting` callback each time the helper or its output is
unfinished, as `run_command_until` does. `cancellable_output` keeps the
one-hour limit for the helper and the 5 s limit for its output. The
cancel test cancels on the second check, while `sleep 86400` runs. The
output test ends the wait at the first ask while a descendant holds the
pipes. Both run under a 60 s `with_deadline` hang guard.

The macOS disk-image fixture retried a busy `hdiutil` after sleeps of
0.5 to 4 s and gave up after about 8 s. It now asks again until hdiutil
gives another answer, and a helper that stays busy for a minute fails
the test. The attach in `an_install_that_ended_partway_does_not_block_the_next`
no longer skips the test when the helper stays busy.
2026-11-27 17:48:24 -08:00

77 lines
3.0 KiB
TOML

[package]
name = "craft-update"
description = "Release checking, downloading, installing and self-updating for the Craft App Suite and ArtCraft Launcher"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
autotests = false
[lib]
# The lib's test target is the crate's one test executable: its trials and, with `screen-testing`, the
# screen tests in tests/it.
harness = false
[lints]
workspace = true
[features]
suite = ["screen-testing", "craft-ui/suite"]
# Opt-in migration of first party Flatpak bundles to the ArtCraft OCI remote.
oci_migration = []
default = []
# Developer builds only: downloads from a mirror on loopback, and plain HTTP from remote hosts. No other feature turns it on.
local-mirror = []
ui = ["dep:egui", "dep:image", "dep:craft-ui", "dep:craft-host", "dep:craft-theme"]
# The dialog stories, the updater's test seams and the integration binary `tests/it`.
screen-testing = ["ui", "craft-ui/testing"]
[dependencies]
egui = { workspace = true, optional = true }
craft-ui = { workspace = true, optional = true }
# `Tone` for the dialogs' notices.
craft-theme = { workspace = true, optional = true }
# `Host::app` and `Host::icon_png`: the name and icon the update dialogs show.
craft-host = { workspace = true, features = ["ui"], optional = true }
# Decodes the app icon the update dialogs show (`Host::icon_png`); PNG only.
image = { version = "0.25", default-features = false, features = ["png"], optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
log = "0.4"
tempfile = "3"
sha2 = "0.10"
base64 = "0.22"
ed25519-dalek = { version = "2.2", default-features = false, features = ["std", "fast", "pem"] }
toml = { version = "=1.1.8", default-features = false, features = ["parse", "serde", "std"] }
ureq = { version = "3.4", default-features = false, features = ["rustls-no-provider", "_ring", "gzip", "platform-verifier"] }
chrono = { workspace = true }
semver = { version = "1", features = ["serde"] }
[dev-dependencies]
craft-testkit = { workspace = true }
craft-ui = { workspace = true, features = ["suite"] }
flate2 = "1"
[target.'cfg(unix)'.dependencies]
flate2 = "1"
tar = { version = "0.4", default-features = false }
[target.'cfg(target_os = "macos")'.dependencies]
plist = "1"
[target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies]
rustix = { version = "1.1", default-features = false, features = ["std", "fs", "process"] }
[target.'cfg(target_os = "windows")'.dependencies]
winreg = "0.55"
dunce = "1"
# `deflate-flate2` with flate2's default miniz_oxide backend, not zip's `deflate` (zopfli and
# zlib-rs): Cargo unifies flate2's features across an app, and zlib-rs would switch the whole
# app's flate2 to it, where level 1 is a static-Huffman mode that can make output larger than
# its input (Lightcraft's 16-bit ZIP TIFFs on Windows).
zip = { version = "9", default-features = false, features = ["deflate-flate2"] }
flate2 = "1"
winsafe = { version = "0.0.29", features = ["advapi", "kernel", "shell", "version"] }
verifysign = "1"