Closed lexstarwind closed 9 months ago
I also stumbled across the same problem during a fresh installation on a Win10 machine.
It seems that ${TEST_ID}
from the call to ceedling contains the path to the unit test module.
Errno::EINVAL: Invalid argument @ rb_file_s_mtime - test:test/test_helloWorld.c
{
"ceedlingExplorer.testCommandArgs": [
"test:${TEST_ID}"
]
}
It is a strange behavior, the old installations of my colleagues work without any problems, even with new VSCode versions. But if you uninstall Ruby (3.0.6-1) and Ceedling (0.31.1) and reinstall them, you run into this problem.
Full error output No tests executed.
stderr:
rake aborted!
Errno::EINVAL: Invalid argument @ rb_file_s_mtime - test:test/test_bit_manipulation.c
C:/Users/lexstarwind/.local/share/gem/ruby/3.0.0/gems/ceedling-0.31.1/bin/ceedling:345:in block in <top (required)>' C:/Users/lexstarwind/.local/share/gem/ruby/3.0.0/gems/ceedling-0.31.1/bin/ceedling:332:in
<top (required)>'
C:/Users/lexstarwind/AppData/Local/Microsoft/WindowsApps/ceedling:25:in load' C:/Users/lexstarwind/AppData/Local/Microsoft/WindowsApps/ceedling:25:in
Is there a fix or any new info about this problem? I can no longer use the plugin.
The error seems to happen when ruby tries to get the modification time of the file test:test/test_bit_manipulation.c
but I would expect ceedling to check for test/test_bit_manipulation.c
instead.
In the logs we can see that the error is reported by a ruby version 3.0.0 while you said you were using ruby 3.0.6. Which version is used when you run ceedling in the terminal?
It's also unexpected for me to see that the ceedling executable is in AppData/Local/Microsoft/WindowsApps
. How did you installed ceedling?
I installed ceedling using the gem command. gem install ceedling. When I run ruby --version from the command line. I get the following output - ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x64-mingw32]
Strangely enough the tests all run from command line
If you are running the test from the command line I assume that you are using something like
ceedling test:test_<module>
e.g.
PS C:\projects\tut101> ceedling test:test_helloWorld.c
Test 'test_helloWorld.c'
------------------------
Running test_helloWorld.out...
--------------------
IGNORED TEST SUMMARY
--------------------
[test_helloWorld.c]
Test: test_helloWorld_NeedToImplement
At line (17): "Need to Implement helloWorld"
--------------------
OVERALL TEST SUMMARY
--------------------
TESTED: 1
PASSED: 0
FAILED: 0
IGNORED: 1
But from the error messages the plugin uses
ceedling test:test/test_<module>
you are getting the same error message if you are adding the path on the command line call. e.g.
ceedling test:test/test_helloWorld.c
PS C:\projects\tut101> ceedling test:test/test_helloWorld.c
rake aborted!
Errno::EINVAL: Invalid argument @ rb_file_s_mtime - test:test/test_helloWorld.c
C:/Users/Michael/.local/share/gem/ruby/3.0.0/gems/ceedling-0.31.1/bin/ceedling:345:in `block in <top (required)>'
C:/Users/Michael/.local/share/gem/ruby/3.0.0/gems/ceedling-0.31.1/bin/ceedling:332:in `<top (required)>'
C:/Users/Michael/AppData/Local/Microsoft/WindowsApps/ceedling:25:in `load'
C:/Users/Michael/AppData/Local/Microsoft/WindowsApps/ceedling:25:in `<main>'
Tasks: TOP => test:test/test_helloWorld.c
(See full trace by running task with --trace)
--------------------
OVERALL TEST SUMMARY
--------------------
No tests executed.
I also added the used versions here since the gems are installed under ruby version 3.0.0 even if 3.0.6 is installed on windows.
PS C:\projects\tut101> ruby --version
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x64-mingw32]
PS C:\projects\tut101> ceedling version
Ceedling:: 0.31.1
Unity:: 2.5.4
CMock:: 2.5.4
CException:: 1.3.3
As stated above I used the plugin for round about 2 years without any problems but on a fresh installation it fails. Strangely old installations from my colleagues are still working without any problems.
When we run the ceedling help
command, it's written that we should not give a path to the test, only the source file name.
numaru@tower:~/dev/temp_sensor$ ceedling help
# ...
ceedling summary # Execute plugin result summaries (no build triggering)
ceedling test:* # Run single test ([*] real test or source file name, no path)
ceedling test:all # Run all unit tests (also just 'test' works)
ceedling test:delta # Run tests for changed files
ceedling test:path[dir] # Run tests whose test path contains [dir] or [dir] substring
ceedling test:pattern[regex] # Run tests by matching regular expression pattern
# ...
Using paths was working but it's maybe safer to use only file names in the extension if the case of 2 test files with the same name is not handled by ceedling.
To run the tests from command line, I just use the ceedling command. No parameters. I can also run using ceedling test:all
Command output from terminal
PS D:\Development\PSI\H2Scan\PSI_Software\CeedlingCMock> ceedling
Test 'test_bit_manipulation.c'
------------------------------
Running test_bit_manipulation.out...
-----------
TEST OUTPUT
-----------
[test_bit_manipulation.c]
- "Temperature is High"
- "Temperature is Low"
--------------------
OVERALL TEST SUMMARY
--------------------
TESTED: 4
PASSED: 4
FAILED: 0
IGNORED: 0
Just want to comment to add to this issue, I have two coworkers who are experiencing this issue using the same setup as I am although I'm not experiencing it.
Thank you @lexstarwind, @miebka and @prestonAdmiral for the report and additional info. The issue should be fixed by the release v1.11.0. Feel free to re-open it if it does not.
I have a simple Unity / Ceedling / CMock example project from this tutorial (https://embetronicx.com/tutorials/unit_testing/unit-testing-in-c-testing-with-unity/). Nothing special. I was able to run this project using the Ceeding Test Explorer for VSCode on my previous windows 10 machine. I've since switched to a Windows 11 machine and the same project won't run when pressing the play button in the test explorer window. Strangely enough the tests all run from command line. They also run in the VSCode terminal if I press the debug button, but the tests will not run in the test explorer window if I press the play button. Any ideas?
I get the following error Errno::EINVAL: Invalid argument @ rb_file_s_mtime I'm running ruby version 3.0.6 and ceedling 0.31.1 project.yml