Detect KiCad symbol dir cross-platform in test gating
Some checks are pending
CI / Lint and Format (push) Waiting to run
CI / Test Python 3.11 on macos-latest (push) Waiting to run
CI / Test Python 3.12 on macos-latest (push) Waiting to run
CI / Test Python 3.13 on macos-latest (push) Waiting to run
CI / Test Python 3.10 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.11 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.12 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.13 on ubuntu-latest (push) Waiting to run
CI / Security Scan (push) Waiting to run
CI / Build Package (push) Blocked by required conditions
Some checks are pending
CI / Lint and Format (push) Waiting to run
CI / Test Python 3.11 on macos-latest (push) Waiting to run
CI / Test Python 3.12 on macos-latest (push) Waiting to run
CI / Test Python 3.13 on macos-latest (push) Waiting to run
CI / Test Python 3.10 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.11 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.12 on ubuntu-latest (push) Waiting to run
CI / Test Python 3.13 on ubuntu-latest (push) Waiting to run
CI / Security Scan (push) Waiting to run
CI / Build Package (push) Blocked by required conditions
requires_kicad keyed off a hardcoded /usr/share/kicad path, so symbol-dependent tests silently skipped on macOS even with KiCad installed. Derive DEVICE_LIB from get_kicad_symbol_dir() so those tests actually run on the macOS testbed.
This commit is contained in:
parent
1677f85666
commit
b42992f64d
@ -21,7 +21,15 @@ from mckicad.utils.sexp_tree import find_recursive, parse
|
||||
# Fixtures
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
DEVICE_LIB = "/usr/share/kicad/symbols/Device.kicad_sym"
|
||||
# Locate the system symbol dir cross-platform (macOS/Linux/Windows) via the
|
||||
# same resolver the code uses, rather than a hardcoded Linux path — otherwise
|
||||
# `requires_kicad` tests silently skip on macOS even when KiCad is installed.
|
||||
_SYMBOL_DIR = get_kicad_symbol_dir()
|
||||
DEVICE_LIB = (
|
||||
os.path.join(_SYMBOL_DIR, "Device.kicad_sym")
|
||||
if _SYMBOL_DIR
|
||||
else "/usr/share/kicad/symbols/Device.kicad_sym"
|
||||
)
|
||||
GLOBAL_SYM_LIB_TABLE_9 = os.path.expanduser("~/.config/kicad/9.0/sym-lib-table")
|
||||
GLOBAL_SYM_LIB_TABLE_8 = os.path.expanduser("~/.config/kicad/8.0/sym-lib-table")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user