AntiMicroX / antimicrox

Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support.
GNU General Public License v3.0
2.44k stars 141 forks source link

Tests don’t build #138

Open mirabilos opened 3 years ago

mirabilos commented 3 years ago

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

Fund with Polar

pktiuk commented 3 years ago

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.

xgqt commented 2 years ago

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.

pktiuk commented 2 years ago

@xgqt
I fully agree with you. :)
But it was done a long time ago, when I was not developing this app.