devlib icon indicating copy to clipboard operation
devlib copied to clipboard

Add cross-platform LocalTarget with macOS and Linux support

Open denini08 opened this issue 5 months ago • 2 comments

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.

denini08 avatar Aug 15 '25 19:08 denini08