zarfld / LinuxCnc_PokeysLibComp

Pokeys comp for LinuxCnc using https://bitbucket.org/mbosnak/pokeyslib.git
MIT License
5 stars 0 forks source link

Create Multiple LinuxCNC Configurations for Automated Testing #65

Open zarfld opened 1 day ago

zarfld commented 1 day ago

Create Multiple LinuxCNC Configurations for Automated Testing

Description:

In order to fully test the integration of pokeys_py, pokeys_rt, and pokeys.comp with LinuxCNC, several different LinuxCNC configurations need to be created. These configurations (INI and HAL files) should cover a range of use cases, such as custom homing, different axis setups, I/O configurations, and scenarios using various peripherals like digital/analog I/O, PWM, and counters.

Tasks:

  1. Define Multiple Test Configurations:

    • Create several LinuxCNC configuration sets (INI + HAL files) that simulate different setups. These should include:
      • Basic Configuration: A simple configuration with a single axis and basic I/O.
      • Custom Homing: A configuration that uses the custom homing procedure with PoKeys.
      • Multiple Axes Configuration: A setup with multiple joints/axes, including both linear and rotational joints.
      • I/O Heavy Configuration: A configuration that heavily uses Digital I/O, Analog I/O, and PWM.
      • Counter Test Configuration: A setup focused on using digital counters.
      • PoExtBus/PoRelay8: A configuration that tests PoExtBus and PoRelay8 interactions.
  2. Create INI and HAL Files for Each Configuration:

    • Define the necessary INI and HAL files for each configuration.
    • Ensure that each configuration properly links with the PoKeys components (digital IO, analog IO, PWM, PEv2, etc.).
    • Provide proper mappings of pins in the HAL files and adjust axes settings in the INI files.
    • Include setups for both user-space (pokeys.comp) and real-time (pokeys_rt) components.
    • Ensure that each configuration is well-commented and documented to explain the purpose of each setting.
  3. Unit Tests for Each Configuration:

    • Create unit tests that load each INI and HAL configuration in LinuxCNC simulation mode.
    • Test the interaction of each configuration with the mock pokeyslib.
    • Ensure that tests cover both valid scenarios and error handling (e.g., missing devices, out-of-range values, etc.).
  4. Integration Tests Across Configurations:

    • Create integration tests that validate the complete workflow from setting up pins to performing actions like homing and controlling axes.
    • Simulate scenarios such as emergency stop activation, reaching axis limits, and toggling I/O pins.
    • Ensure that real-time performance is evaluated in the simulation environment.
  5. Add Configurations to CI Pipeline:

    • Integrate the LinuxCNC configurations into the GitHub Actions pipeline.
    • Each configuration should be automatically tested on each commit/pull request.
    • Use different test stages for each configuration and report results for each.
  6. Coverage Reports for Each Configuration:

    • Ensure that the test coverage for each configuration is reported and tracked.
    • Use coverage.py to generate reports, focusing on how well each configuration covers the codebase.

Acceptance Criteria:

References: