Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Running tests #2585
How to execute all the tests? I want to run exactly the same tests when the CI build server runs.
What I tried
Like it says in TESTING.MD and COMPILE.MD I tried to execute "make run_all" and "make run_nokdbtests"
The tests are executed, but a lot more of them fail compared to the output of the build server.
I built the project like this
And I ran tests like this
-----a lot of lines omitted here------
-----below is the last seen output-------
fatal: Could not export user config
64% tests passed, 63 tests failed out of 177
Label Time Summary:
Total Test time (real) = 39.77 sec
The following tests FAILED:
This error message looks like the file
It might also be a permissions problem. For development purposes, I would recommend using the cmake options:
The easiest way to execute all tests similar to the way that the Jenkins Server does is by following these instructions to build/download and run the debian-stretch docker container (the
mkdir build-docker && cd build-docker # compile cmake .. -DBINDINGS="ALL;-DEPRECATED" -DPLUGINS="ALL;-DEPRECATED" -DTOOLS="ALL" -DENABLE_DEBUG=ON -DKDB_DB_HOME="$PWD" -DKDB_DB_SYSTEM="$PWD/.config/kdb/system" -DKDB_DB_SPEC="$PWD/.config/kdb/system" make -j 10 # run all tests make run_all # run tests with valgrind make run_memcheck
The build server also runs the tests for the installed version of kdb and some other things that are more complicated to replicate. If you really want to run everything (almost never necessary) take a look at the Jenkinsfile.
Then I started a container like this
Inside the container, I built the project as you described it, but I get the following error when it is almost finished:
Do you have an idea what might cause the error?
I also used the steps described above and the build system reports the same error.
The problem seems to be the Haskell binding. I would recommend to not include this binding:
cmake .. \ -DBINDINGS="ALL;-DEPRECATED;-haskell" \ -DPLUGINS="ALL;-DEPRECATED" \ -DTOOLS="ALL" \ -DENABLE_DEBUG=ON \ -DKDB_DB_HOME="$PWD" \ -DKDB_DB_SYSTEM="$PWD/.config/kdb/system" \ -DKDB_DB_SPEC="$PWD/.config/kdb/system"
. If I use the commands above, the build step (
I think it is more important that building Elektra works for new developer than continuously testing something which is not maintained anyway (which is unfortunately the case for Haskell).
If it is again maintained, we readd it to the tests of course. Then such problems can also be fixed by the Haskell maintainer.
While I agree, I would not recommend the full Dockerfile for Debian for new developers anyway. In my opinion it makes much more sense to use the Alpine Docker image, which is