numaru / vscode-ceedling-test-adapter

Ceedling Test Adapter for the VS Code Test Explorer
MIT License
37 stars 14 forks source link

add ceedling 1.0.0 compatibility, add multi project setup capability #139

Open simeon-s1 opened 3 months ago

gsmithufl commented 2 months ago

Overall, thanks a lot for making these updates! Hopefully this repo owner will show up.

I've tested this and I'm able to step debug from the GUI menu and run tests. However, I'm having an issue where tests are showing as failed in the GUI menu. In Test Explorer the output shows as on stderr:

Ceedling operations completed in 391 milliseconds

stderr:

-----------------------
✅ OVERALL TEST SUMMARY
-----------------------
TESTED:  2
PASSED:  2
FAILED:  0
IGNORED: 0

I currently have the project.yaml plugins setup as follows:

:plugins:
  :load_paths: []
  :enabled:
    - module_generator               # handy for quickly creating source, header, and test templates
    - gcov                           # test coverage using gcov. Requires gcc, gcov, and a coverage analyzer like gcovr

    # Report options (You'll want to choose one stdout option, but may choose multiple stored options if desired)
    #- report_build_warnings_log
    # - report_tests_gtestlike_stdout
    #- report_tests_ide_stdout
    - report_tests_log_factory
    - report_tests_pretty_stdout
    #- report_tests_raw_output_log
    # - report_tests_teamcity_stdout

# Specify which reports you'd like from the log factory
:report_tests_log_factory:
  :reports:
    # - json
    - junit
    # - cppunit
    # - html

Here are some app versions:

  Ceedling => 1.0.0-a1e6b24
  ----------------------
  /var/lib/gems/3.2.0/gems/ceedling-1.0.0

  Build Frameworks
  ----------------------
       CMock => 2.5.4
       Unity => 2.6.0
  CException => 1.3.4

Id: hbenl.vscode-test-explorer
Version: 2.21.1
Publisher: Holger Benl

Id: ms-vscode.test-adapter-converter
Version: 0.1.9

Id: futavis.vscode-ceedling-test-adapter-multi
Version: 2.0.0
Publisher: futavis

Separately, I think the README.md probably needs one more combing through. I believe the section on ceedlingExplorer.testCommandArgs needs to be updated because I think they got rid of the utils:gcov command extension.

Also, the packages.json section "publisher": "futavis", probably isn't correct for this repo.

jerdwys commented 2 months ago

@gsmithufl I believe you need to enable cppunit under report_tests_log_factory.

From the breaking changes: In addition, all references and naming connected to the previous xml_tests_report plugin have been updated to refer to CppUnit rather than generic XML as this is the actual format of the report that is processed.

jerdwys commented 2 months ago

@simeon-s1 I think you are missing the name change of the report.xml file that happened in Ceedling 1.0.0. For me, it didn't report the results until I updated the xml report name. Here is the pull request and a prerelease extension build

gsmithufl commented 1 month ago

@gsmithufl I believe you need to enable cppunit under report_tests_log_factory.

From the breaking changes: In addition, all references and naming connected to the previous xml_tests_report plugin have been updated to refer to CppUnit rather than generic XML as this is the actual format of the report that is processed.

@jerdwys you're right, thanks! I needed to enable cppunit and also needed to change the name of the report from the new cppunit_tests_report.xml name to the old report.xml name. For anyone else the documentation on how to do that is here: https://github.com/ThrowTheSwitch/Ceedling/tree/test/ceedling_0_32_rc/plugins/report_tests_log_factory#configuration

:report_tests_log_factory:
  :reports:
    # - json
    # - junit
    - cppunit
    # - html
  :cppunit:
    :filename: 'report.xml'

I think the extension would need to be updated to capture the new report name.

simeon-s1 commented 1 month ago

hey, could you do a PR? then i'll merge it and also merge everything into main on the fork afterwards.