vscode-ceedling-test-adapter icon indicating copy to clipboard operation
vscode-ceedling-test-adapter copied to clipboard

add ceedling 1.0.0 compatibility, add multi project setup capability

Open simeon-s1 opened this issue 1 year ago • 10 comments

simeon-s1 avatar Jul 30 '24 07:07 simeon-s1

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.

gsmithufl avatar Aug 16 '24 14:08 gsmithufl

@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 avatar Sep 01 '24 23:09 jerdwys

@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

jerdwys avatar Sep 02 '24 00:09 jerdwys

@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.

gsmithufl avatar Sep 09 '24 21:09 gsmithufl

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

simeon-s1 avatar Sep 10 '24 07:09 simeon-s1

Thanks for everyone's effort. I've tested this extension and I am having a couple of issues with debugging.

The first issue relates to selecting the specific launch config for debugging.

My launch.json had the ceedling debugging profile set as "name": "ceedlingExplorer". The workspacesettings.json in .vscode folder has this entry: "ceedlingExplorer.projects": [{"path": "./", "debugLaunchConfig": "ceedlingExplorer"}]. When attempting to debug with these settings, vscode gives the message: Configuration 'ceedling' is missing in 'launch.json'. Changing the launch.json profile name to ceedling fixes the issue. Either I'm setting this profile name wrong in the settings or it is being ignored.

The second issue is that the test timer in Test Explorer continues to run if the debugging button is used to run tests. The stop button is the only way I have found to stop the timer. When in this condition (ie the timer is running after debug), the Explorer otherwise behaves as expected and tests can be run with the run buttons.

mmerlo avatar Nov 14 '24 23:11 mmerlo

Hi, I was just wondering if there are plans to complete this PR now that Ceedling 1.0.0 is out?

EmileBV avatar Jan 16 '25 12:01 EmileBV

Any updates on this PR? it will be so helpful to support the Ceedling 1.0.0

yahyayozo avatar Jan 29 '25 16:01 yahyayozo

A year after initial and six months after last. Just checking in! It would be great to get this merged in to use this extension again.

jnz86 avatar Jun 09 '25 21:06 jnz86

The second issue is that the test timer in Test Explorer continues to run if the debugging button is used to run tests. The stop button is the only way I have found to stop the timer. When in this condition (ie the timer is running after debug), the Explorer otherwise behaves as expected and tests can be run with the run buttons.

That was an issue going back well into the 0.32 days. I had brought that up previously with no resolution. Luckily, I don't think it does anything, just keeps running the timer.

jnz86 avatar Jun 09 '25 21:06 jnz86