-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup question - source has changed but make
is not run
#42
Comments
Hi, no this totally fine. There is no automatic rebuild or file watcher at the moment. That is because in C/C++ you have such a big variety of builders, toolchains, tools etc. that can be used to trigger a rebuild. When I was doing C programming I used to have a build task that could be trigger by using Ctrl+Shift+B or something and after the build i clicked run tests. So that was my workflow but I can understand that you aim for more automation. I quickly browsed through the code and thought I actually added a file watcher on the executables to have at least a retire of tests if the test runner changes but I guess I forgot to implement that ;) I think this is a good first issue for contributers as I will not be able to do much on the code in the next time. Maybe in winter :) |
Thanks for clarifying! I think in that case I'd modify my Makefile to stop short of running the tests. |
I've been working on this issue. I have the basic functionality in place of running a configured pre-launch task from I think if the pre-launch task fails (returns exit code != 0), the right thing to do would be to report that as a failing test somehow. Other kinds of failures result in a call to |
Hey, that sounds great. I haven't been programming C for a while and was really busy so I unfortunately neglected this project a bit. Every help is highly appreciated. |
OK awesome! I have it working pretty well, I'm polishing it up. One issue I'm running into is that when first opening a CMake project, with |
The configured task will be run at the beginning of load(), run(), and debug(). This can be used to rebuild the test executable. Addresses issue bneumann#42
The configured task will be run at the beginning of load(), run(), and debug(). This can be used to rebuild the test executable. Addresses issue bneumann#42
* run(): RunAllTests() if the only test is named 'error' This can happen if a previous TestLoadFinishedEvent contained an errorMessage instead of a suite. No code takes advantage of this yet. It is being added in preparation for preLaunchTask support, which will emit such an event if the task fails. * Add support for `cpputestTestAdapter.preLaunchTask` setting The configured task will be run at the beginning of load(), run(), and debug(). This can be used to rebuild the test executable. Addresses issue #42 * Bail out of run() or debug() if preLaunchTask fails
Hi there,
Quite novice to CppUTest and this adapter, please bear with me - it just seems I'm missing something.
I have the Test Executable and Test Executable Path configured in the extension settings like this:
Now when I change my source I don't see the test result change in the VS Code Testing panel, even though I've intentionally broken it. Example:
I take this to be because this extension is not re-running
make
, so the production code change isn't being picked up.What I'm left wondering is how this extension is meant to be used for maximum benefit.
Otherwise my process would look like:
make
(can be linked to the save keybind which makes this one step), - at this point I have shell output for pass/failThis sequence of steps does work for picking up changes, I just expected this to be more automatic. What am I missing here?
For info I'm using Ubuntu 14.04, VS Code 1.69.2, CppUTest latest.
The text was updated successfully, but these errors were encountered: