devlib
devlib copied to clipboard
Add cross-platform LocalTarget with macOS and Linux support
This PR introduces the new LocalTarget class, which unifies local target handling across macOS and Linux. Fix #728.
Key changes include:
- Automatic platform detection (mac, linux)
- Native command usage on macOS (e.g., sysctl, screencapture) and Linux (e.g., /proc/cpuinfo, scrot)
- Fallback to busybox commands for unsupported platforms
- Updated tests and configuration to use LocalTarget instead of platform-specific classes
- Maintained backward compatibility (LocalMacTarget remains as alias)
Benefits:
- Single class works on both macOS and Linux without manual selection
- Platform-specific logic centralized for easier maintenance
- Simplifies test configuration and improves code clarity
Let me know your thoughts. Happy to help.