Issue: Create Tests for Currently Implemented Features in Main Branch
Summary
This issue aims to create a comprehensive set of tests to validate the currently implemented features in the main branch. The tests should cover all major functionalities and components to ensure stability, correctness, and performance of the pokeys.comp, pokeys_userspace, and related components.
Task Details
1. Define Test Scope
Components: The tests should cover all major components currently implemented, including but not limited to:
Develop unit tests for individual components and subsystems.
Digital IO: Test digital input/output behavior, including invert parameters, state changes, and correct mapping of pins.
Analog IO: Verify that the analog inputs/outputs respond correctly and map the expected values.
PEv2 (Pulse Engine v2): Test all PEv2-related functionalities, including position feedback (pos-fb), velocity commands, homing routines, and axis states.
Peripheral Devices: Test the functionality of PoRelay8, PoExtBusOC16, and PoNETkbd48CNC.
3. Integration Tests
Develop integration tests to ensure correct interaction between components:
Device Initialization: Test the proper initialization of PoKeys devices, ensuring that all pins and configurations are correctly loaded.
Pin Linking: Ensure that all HAL pins are correctly registered and linked according to the device's functionality (e.g., digin, digout, analogin, analogout, PEv2, etc.).
Real-Time Performance: Verify the performance of real-time critical operations, especially for motion control and PEv2, under realistic conditions.
4. Regression Tests
Set up regression tests to ensure no functionality is broken due to recent changes:
Main Branch Stability: Ensure that all new features do not cause regressions in existing functionality.
Backward Compatibility: Validate that all previously supported functionalities work as expected in the current implementation.
5. End-to-End System Tests
Create end-to-end tests for the entire system, covering:
Device initialization
Interaction with LinuxCNC (e.g., ensuring that the pins map correctly to HAL)
Complete homing routines and PEv2 axis state transitions
Testing system response to invalid or extreme inputs to ensure robustness
6. Test Automation
Integrate these tests into a CI/CD pipeline to ensure automatic testing on each push to the main branch.
Use appropriate testing frameworks for Python, C++, and LinuxCNC-based systems (e.g., pytest, unittest, or HAL testing tools for LinuxCNC).
Provide test coverage reports to monitor the completeness of the test suite.
7. Performance Tests
Implement performance tests to verify that real-time performance and system responsiveness meet the required standards.
Test the system under load conditions (e.g., simultaneous IO operations, multiple axes moving).
Expected Outcome
Comprehensive Tests: All features in the main branch should have corresponding unit, integration, and regression tests.
Automated Testing: Tests should run automatically on each commit or pull request to the main branch.
Performance Validation: The system should pass all performance and stress tests, ensuring that it meets real-time requirements.
Reference Files
pokeys.comp
pokeys_userspace/
pokeys_homecomp.comp
pokeys_homing.hal
DM542_XXYZ_mill configuration
Notes
The test suite should be modular and easily extensible to cover new features as they are implemented.
Any discovered test failures must be documented and addressed promptly.
Issue: Create Tests for Currently Implemented Features in Main Branch
Summary
This issue aims to create a comprehensive set of tests to validate the currently implemented features in the main branch. The tests should cover all major functionalities and components to ensure stability, correctness, and performance of the
pokeys.comp
,pokeys_userspace
, and related components.Task Details
1. Define Test Scope
pokeys.comp
pokeys_userspace
pokeys_homecomp.comp
2. Unit Tests
invert
parameters, state changes, and correct mapping of pins.pos-fb
), velocity commands, homing routines, and axis states.3. Integration Tests
digin
,digout
,analogin
,analogout
,PEv2
, etc.).4. Regression Tests
5. End-to-End System Tests
6. Test Automation
7. Performance Tests
Expected Outcome
Reference Files
pokeys.comp
pokeys_userspace/
pokeys_homecomp.comp
pokeys_homing.hal
DM542_XXYZ_mill
configurationNotes