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
Add CPPFLAGS to dmake Makefile generation #449
Conversation
The reason for #424 was that debian is not able to run testsuite (version 1.66) because the cfg files are not found
the patch to make them run successfully is this one: --- cppcheck-1.66.orig/cli/cppcheckexecutor.cpp
+++ cppcheck-1.66/cli/cppcheckexecutor.cpp
@@ -696,10 +696,10 @@ int CppCheckExecutor::check_internal(Cpp
{
Settings& settings = cppcheck.settings();
_settings = &settings;
- bool std = (settings.library.load(argv[0], "std.cfg").errorcode == Library::OK);
+ bool std = (settings.library.load(argv[0], "std.cfg").errorcode == Library::OK || settings.library.load(argv[0], "cfg/std.cfg").errorcode == Lib$
bool posix = true;
if (settings.standards.posix)
- posix = (settings.library.load(argv[0], "posix.cfg").errorcode == Library::OK);
+ posix = (settings.library.load(argv[0], "posix.cfg").errorcode == Library::OK || settings.library.load(argv[0], "cfg/posix.cfg").errorcode =$
if (!std || !posix) {
const std::list<ErrorLogger::ErrorMessage::FileLocation> callstack; however this file seems to have been removed on latest master, I'm investigating right now |
12ed4e6 should fix the testsuite failure |
how do I reproduce? what are you doing? I use debian and the "make test" works fine here. No matter if I use CFGDIR or not. |
For me.. this works:
This also works:
|
…buildd test failures, when tests are run without the prior install)
02070cf
to
95cd957
Compare
Steps to reproduce:
enjoy your crash. the tests in "samples" expects that the configuration file is available system-wide, and my commit adds the local conf file as fallback if the first one isn't available. Again, build machines forbids installation of stuff outside the build directory, and installs something only if testsuite pass (obviously). Now debian has the testsuite disabled because samples cannot be run if the conf file is not installed. |
I am not sure about this. I like that testrunner fails if something bad happens. why don't you run a normal 'make test' without the bad configuration first? |
can you please define "bad" configuration? it isn't "bad", since it it where it is supposed to be installed. |
You can run the tests locally without any prior "make install".
I'd expect that if CFGDIR is specified then testrunner will use that path. If that path doesn't work then I expect a failure. What if I want to run the testrunner on nonlocal cfg files (/home/daniel/cfg). but I mistype the path or something and then the testrunner silently uses my local cfg files instead. |
is that a problem? |
Closing this as there are no updates. |
@PKEuS I'm not sure why it has been closed, what should I do to have a testsuite working during build? |
I made a fix with 095b2f7 Now the tests will execute with this command even though "/a/b" does not exist (yet)..
|
thanks! |
This is a follow up after the bad #424 pull request