-
Notifications
You must be signed in to change notification settings - Fork 12
Add End To End Testing, Improved Environment management and configuration system, Fix SITL launch on Macos setups. #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add End To End Testing, Improved Environment management and configuration system, Fix SITL launch on Macos setups. #25
Conversation
…nsion Bypass cache for Python tools in ProgramUtils.cachedToolPath() to ensure tasks always use the current VS Code Python interpreter instead of stale cached paths that may not match the active virtual environment.
- Replace hardcoded 'python3' with ProgramUtils.cachedToolPath() in build commands - Add PYTHON environment variable to task execution environment - Ensure consistent Python interpreter usage across ArduPilot build system - Fixes issues where wrong Python interpreter was used for builds
Allow tests to skip waiting for full extension activation when needed for faster test initialization or when testing extension startup behavior.
- Convert _installTool() and _installPythonPackages() to static methods - Allow calling these methods from E2E tests without panel instance - Update method signatures to accept optional panel instance for UI updates - Modify validation refresh logic to work in testing contexts
- Add toolInstallationAndBuild.test.ts for complete workflow testing - Include runE2ETest.ts for E2E test execution - Test covers tool installation, ArduPilot cloning, and build verification - Validates task completion detection and Python interpreter configuration - Tests both SITL and CubeOrange+ builds with proper artifact verification
Add automated E2E testing pipeline that runs on Ubuntu with VS Code environment, including Python setup and ArduPilot build verification.
- Add 'Debug E2E Tests' launch configuration for VS Code debugging - Add 'test:e2e' npm script for running E2E tests - Configure proper environment and sourcemap support for E2E debugging
Initialize and update submodules after cloning ArduPilot repository to ensure all dependencies are available for builds. Add progress reporting and error handling for submodule operations.
Update package-lock.json with latest dependency versions for webview components.
Update build command generation tests to mock ProgramUtils.cachedToolPath for consistent Python path handling. Tests now properly account for the Python cache bypass functionality that returns dynamic interpreter paths.
Update e2e-test.yml to run on both Linux and macOS using matrix strategy. Platform-specific dependency installation with python3-venv package support. Remove tool verification step to simplify workflow.
- Add toolInstallationAndClone.test.ts for tool installation and ArduPilot cloning - Add ardupilotBuild.test.ts for SITL and CubeOrange+ builds from existing clone - Mock workspace.updateWorkspaceFolders() to prevent extension host crashes - Tests use shared temp directory at /tmp/ardupilot-e2e/ardupilot
- Delete toolInstallationAndBuild.test.ts (replaced by separate tests) - Update e2e/index.ts to support E2E_TEST_MODE environment variable - Support selective test execution: 'clone', 'build', or 'all' modes
- Add runE2ECloneTest.ts for clone-only test execution - Add runE2EBuildTest.ts for build-only test execution - Both runners install required VS Code extensions and set appropriate E2E_TEST_MODE - Enable independent execution of test phases
- Add test:e2e:clone script for clone-only testing - Add test:e2e:build script for build-only testing - Maintain existing test:e2e script for full test suite
- Split E2E test execution into clone and build phases - Add 10-second wait between phases to allow VS Code to reset - Run test:e2e:clone first, then test:e2e:build - Apply same xvfb configuration to both phases on Linux - Maintain separate macOS execution for both phases
- Add conditional execution for Ubuntu (with xvfb-run) and macOS - Separate test execution commands based on OS matrix - Ensures tests run properly on both platforms
- Add workspace folder validation in taskProvider.ts before accessing workspaceFolders[0] - Add workspace validation in apBuildConfig.ts activate() method with graceful fallback - Add error handling for workspace configuration updates in apActions.ts - Prevents 'Unable to write to Workspace Settings because no workspace is opened' errors - Ensures extension works properly in headless testing environments
- Add temporary directory creation for ardupilot-e2e folder - Open temp directory in VS Code for proper workspace context - Import required fs and os modules for directory handling - Ensures consistent test environment across runs
…2E test - Set up Python interpreter configuration for virtual environment in ardupilotBuild.test.ts - Use direct workspace configuration update instead of UI mocking for reliability - Activate Python extension and trigger environment refresh - Increase venv creation timeout from 30s to 60s for reliability - Add comprehensive error handling and debug logging
- Add LSUSB tool support to ProgramUtils with Ubuntu installation instructions - Enhance Linux USB device detection with proper lsusb availability checking - Add LSUSB install button to Environment Validator with one-click installation - Include lsusb in tool validation, configuration, and reset functionality - Provide graceful fallback for WSL environments and test compatibility - Filter lsusb display to Linux-only systems with proper platform detection - Add 'sudo apt-get install usbutils' installation command support
- Implement apTerminalMonitor.ts for monitoring terminal output and processes
- Add STMicro board definitions and configurations
- Enhance device detection with LSUSB functionality - Add install button for LSUSB when not available - Improve USB device monitoring and display
- Add Python virtual environment detection - Improve environment validation logic
- Add better path resolution and validation - Improve utility function reliability
- Add APCustomExecution and APBuildPseudoterminal classes for enhanced task handling - Integrate apTerminalMonitor for real-time build output monitoring - Replace ShellExecution with custom pseudoterminal implementation - Improve environment setup for ARM toolchain path handling - Add comprehensive build logging and status tracking
- Add Python virtual environment setup and package verification to build tests - Implement comprehensive terminal shell integration for output capture - Extend test timeouts for complex build operations (30min total, 20min binary creation) - Add detailed build monitoring with progress reporting and status tracking - Improve E2E clone test setup and reliability - Remove obsolete toolInstallationAndBuild.test.ts and runE2ETest.ts files - Consolidate test execution logic in runE2EBuildTest.ts and runE2ECloneTest.ts
- Change test:e2e to run both clone and build tests sequentially - Maintain separate test:e2e:clone and test:e2e:build commands
be75419
to
0972d28
Compare
0972d28
to
062274b
Compare
84866ff
to
77c0864
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces comprehensive End-to-End testing infrastructure, improves environment management and configuration systems, and fixes SITL launch functionality on macOS setups.
- Complete E2E test suite with separate build/clone phases and GitHub Actions workflow for automated cross-platform testing
- Unified registry system for tool management with dynamic Python path resolution and environment validation
- Terminal monitor functionality and process management improvements with async/await patterns and proper cleanup
Reviewed Changes
Copilot reviewed 48 out of 68 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
webview-ui/src/lib/FeatureViewer.svelte |
Adds null check for feature label property |
webview-ui/src/lib/CommandDisplay.svelte |
Improves event handling with cleanup functions and null guards |
webview-ui/src/EnvironmentValidator.svelte |
Adds environment prerequisites section with validation UI |
webview-ui/src/BuildConfig.svelte |
Enhances validation logic with DOM value reading for custom commands |
src/test/suite/taskProvider.test.ts |
Updates tests to use async methods and new tool registry system |
src/test/suite/common.ts |
Adds wait_active parameter for extension activation control |
src/test/suite/apUIHooks.test.ts |
Simplifies test structure with reduced complexity and better mocking |
src/test/suite/apToolsConfig.test.ts |
Updates tests for new registry architecture with proper typing |
src/test/suite/apProgramUtils.test.ts |
Refactors to test new program discovery system with registry-based approach |
src/test/suite/apLog.test.ts |
Adds explicit channel reset for clean test state |
src/test/suite/apLaunch.test.ts |
Updates launch configuration tests with platform-specific debugging and terminal monitoring |
Files not reviewed (1)
- webview-ui/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
src/test/suite/taskProvider.test.ts:396
- The hardcoded string comparison 'PYTHON' should use a constant from the tools registry to avoid potential mismatches if the tool ID changes.
path: '/custom/path/to/arm-g++',
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fb4d919
to
9abdd08
Compare
E2E Testing Infrastructure
Tool Management Refactor
Terminal and Process Management