These 2 check lines still cause an error. The error that I get during the debian package build is,

make[1]: Entering directory `/home/krnekhelesh/Documents/Ubuntu-Projects/add-debian-packaging'
qmltestrunner -input tests/unit
QXcbConnection: Could not connect to display 
make[1]: *** [check] Aborted (core dumped)

What could be done is to leave the check as it is currently in master and only commenting it out while building the deb package. This is not really nice, but unfortunately I am not sure why I get the error message I posted above.