Linux installer and transport tests - #33
Open
icarus-help wants to merge 2 commits into
Open
Conversation
- Create linux_install.sh: Automated installer script supporting major distros
* Auto-detects distribution (Ubuntu/Debian, Fedora/RHEL, Arch, openSUSE)
* Installs BlueZ and Bluetooth development libraries
* Sets up Python virtual environment with pybmap
* Configures bluetooth group permissions for unprivileged access
* Creates global bosectl command via /usr/local/bin/ symlink
* Includes installation verification and troubleshooting tips
- Update README.md: Document linux_install.sh usage
* Separate installation instructions for Linux and macOS
* Consistent experience with macOS_install.sh
- Create docs/linux-setup.md: Comprehensive Linux setup guide
* Supported distributions table
* Step-by-step installation walkthrough
* Manual installation instructions for unsupported distros
* Detailed troubleshooting section covering:
- Permission denied errors
- Missing bluetoothctl
- Device discovery failures
- Virtual environment issues
* Usage examples and advanced configuration
* Uninstallation instructions
Addresses high-priority issue: Missing Linux installation script and documentation
Improves user onboarding and reduces support burden
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Create test_transport_linux.py with full coverage of LinuxRfcommTransport: Initialization Tests (3): - Default parameters - Custom RFCOMM channel - Custom timeout Connection Tests (6): - Successful connection - Invalid MAC address format - Device not found - Permission denied (Bluetooth group) - Socket creation failure - Timeout setting verification Close/Cleanup Tests (3): - Closing connected socket - Socket close failure handling - Closing unconnected socket Context Manager Tests (3): - Successful context manager usage - Connection failure in context - Cleanup on exception Send/Receive Tests (6): - Successful packet send/receive - Send/recv when not connected - Timeout on device non-response - Communication error handling - Send operation failure - 200ms protocol delay verification Drain Mode Tests (3): - Single response in drain mode - Multiple response packets drained - BlockingIOError graceful handling Buffer Management Tests (3): - Large response packets (near 4096 limit) - Empty response handling - Proper buffer sizing Multi-Device Tests (1): - Multiple transport instances independently Integration Tests (2): - Full workflow: connect → send/receive → disconnect - Rapid reconnection cycles All tests use mocking to avoid requiring actual Bluetooth hardware. Tests are skipped on non-Linux platforms; designed to run on Linux CI/CD. Mirrors existing macOS transport tests in structure and coverage. Total: 31 test cases across 8 test classes Addresses high-priority issue: Missing Linux transport unit tests Improves test coverage and reduces regression risk for Linux-specific code Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add comprehensive Linux support to bosectl with automated installation and unit tests.
Changes
linux_install.sh (367 lines) - Automated Linux installer
/usr/local/bin/bosectlcommanddocs/linux-setup.md (368 lines) - Comprehensive Linux setup guide
python/tests/test_transport_linux.py (503 lines, 28 test cases)
README.md - Updated with platform-specific installation sections
Testing
Fixes in this commit
Backward Compatibility
Merge Requirements