FASTSHIFT opened a new pull request, #4006:
URL: https://github.com/apache/nuttx-apps/pull/4006

   ## Summary
   
   `drivertest_framebuffer` selected a testcase with a private `-t <number>`
   option and ran only case 0 by default. Register all four cases in
   `main()` and drop that option. A single case is now selected with the
   cmocka runner's own filter:
   
   ```
   cmocka -s cmocka_driver_framebuffer -t drivertest_framebuffer_white
   ```
   
   Running `cmocka_driver_framebuffer -p <devpath>` directly runs every case.
   The usage text is updated, and the macros that only served the old option
   parsing are removed.
   
   A second commit fixes existing nxstyle errors in the file (missing blank
   lines after declarations). `checkpatch.sh` checks whole files, so they
   would otherwise fail CI.
   
   ## Impact
   
   - Only `testing/drivers/drivertest/drivertest_framebuffer.c`.
   - **Behavior change:** `-t <number>` is removed, and running the program
     without a filter now runs all four cases instead of case 0.
   - No Kconfig or documentation changes.
   
   ## Testing
   
   - Host: Ubuntu 22.04 x86_64, gcc 13.1.0
   - Base: apache/nuttx `066314c6373`, nuttx-apps `ee3d67104` plus this PR
   - Config: `sim:nsh` plus `CONFIG_SIM_X11FB`, `CONFIG_VIDEO_FB`,
     `CONFIG_TESTING_CMOCKA`, `CONFIG_TESTING_CMOCKA_PROG`,
     `CONFIG_TESTING_DRIVER_TEST` (and `CONFIG_ALLOW_MIT_COMPONENTS` for
     regex). Clean build: no warnings.
   - `checkpatch.sh -c -u -m -g` on the commits, and `-f` on the file: pass.
   
   ```
   nsh> cmocka -l
   ...
   tests
       drivertest_framebuffer_black
       drivertest_framebuffer_white
       drivertest_framebuffer_cross
       drivertest_framebuffer_vertical
   
   nsh> cmocka -s cmocka_driver_framebuffer -t drivertest_framebuffer_white
   [==========] tests: Running 1 test(s).
   [ RUN      ] drivertest_framebuffer_white
   [       OK ] drivertest_framebuffer_white
   [  PASSED  ] 1 test(s).
   
   nsh> cmocka -s cmocka_driver_framebuffer
   [==========] tests: Running 4 test(s).
   [ RUN      ] drivertest_framebuffer_black
   [       OK ] drivertest_framebuffer_black
   [ RUN      ] drivertest_framebuffer_white
   [       OK ] drivertest_framebuffer_white
   [ RUN      ] drivertest_framebuffer_cross
   [       OK ] drivertest_framebuffer_cross
   [ RUN      ] drivertest_framebuffer_vertical
   [       OK ] drivertest_framebuffer_vertical
   [  PASSED  ] 4 test(s).
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to