antimicrox
antimicrox copied to clipboard
Tests don’t build
Discovered during Debian packaging, sorry for terseness, I’m short of time for this.
[ 97%] Building CXX object tests/CMakeFiles/GuiTests.dir/testaboutdialog.cpp.o
cd /tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu/tests && /usr/bin/c++ -DWITH_UINPUT -DWITH_X11 -DWITH_XTEST -I/tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu/tests -I/tmp/buildd/antimicro-3.1.4/tests -I/tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu/tests/GuiTests_autogen/include -I/tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu -I/tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu/src -I/tmp/buildd/antimicro-3.1.4 -I/tmp/buildd/antimicro-3.1.4/src -g -O2 -ffile-prefix-map=/tmp/buildd/antimicro-3.1.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-deprecated-declarations -Wno-deprecated-copy -Wdate-time -D_FORTIFY_SOURCE=2 -I'/tmp/buildd/antimicro-3.1.4/debian/q-include' -std=c++11 -fPIE -o CMakeFiles/GuiTests.dir/testaboutdialog.cpp.o -c /tmp/buildd/antimicro-3.1.4/tests/testaboutdialog.cpp
In file included from /tmp/buildd/antimicro-3.1.4/tests/testaboutdialog.cpp:20:
/tmp/buildd/antimicro-3.1.4/src/aboutdialog.h:22:10: fatal error: QDialog: No such file or directory
22 | #include <QDialog>
| ^~~~~~~~~
compilation terminated.
make[2]: *** [tests/CMakeFiles/GuiTests.dir/build.make:98: tests/CMakeFiles/GuiTests.dir/testaboutdialog.cpp.o] Error 1
This is because it’s missing the Qt include directories; other files compile like this:
[ 96%] Building CXX object CMakeFiles/antimicrox.dir/src/eventhandlers/uinputeventhandler.cpp.o
/usr/bin/c++ -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DWITH_UINPUT -DWITH_X11 -DWITH_XTEST -I/tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu -I/tmp/buildd/antimicro-3.1.4 -I/tmp/buildd/antimicro-3.1.4/obj-x86_64-linux-gnu/src -I/tmp/buildd/antimicro-3.1.4/src -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -g -O2 -ffile-prefix-map=/tmp/buildd/antimicro-3.1.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-deprecated-declarations -Wno-deprecated-copy -Wdate-time -D_FORTIFY_SOURCE=2 -I'/tmp/buildd/antimicro-3.1.4/debian/q-include' -std=c++11 -fPIE -fPIC -o CMakeFiles/antimicrox.dir/src/eventhandlers/uinputeventhandler.cpp.o -c /tmp/buildd/antimicro-3.1.4/src/eventhandlers/uinputeventhandler.cpp
Compiling with -DWITH_TESTS=OFF works, so I’m using that for now, but I’d prefer for tests to run if there are tests, of course ☺
Upvote & Fund
- If you find this issue important, mark it with 👍. It lets us see which fixes and features are demanded by the most users.
- We're using Polar.sh so you can upvote and help fund this issue. It may incentivize some developers to contribute to this project and fix some bugs.
- Funded developer receives the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
These tests have never been finished.
They seem to be committed as a work in progress. (I suppose so, because there are many comments describing what should be tested, and there are some mistakes in there like:
#inlude "addeditautoprofiledialog.h"
@gombosg
Do you think we should remove or finish them?
I haven't worked too much with tests, so I don't have any opinion about their usability.
Do you think we should remove or finish them?
IMHO if they do not work, then maybe it would be better to not put them on master.
@xgqt
I fully agree with you. :)
But it was done a long time ago, when I was not developing this app.