bashqtqmakemingw-w64qtestlib

qmake generated target_wrapper.sh fails on make check


I have a qmake project with a subdirs template and two child projects. The subdir projects are two testcases. The project is built with on mingw64.

When I run "mingw32-make check", the process fails when the first testcase is called by the target_wrapper.sh:

cd && /C/JENKINS/workspace/MyProject/tests/test1/target_wrapper.sh release/test1.exe
/C/JENKINS/workspace/MyProject/tests/test1/target_wrapper.sh: Zeile 6: /home/jenluelokal/release/test1.exe: No such file or directory
mingw32-make[2]: *** [Makefile.Release:82: check] Error 127

The Makefile.Release calls the following line for the check target:

check: first
    cd && /C/JENKINS/workspace/MyProject/tests/test1/target_wrapper.sh $(TESTRUNNER) release/$(TARGET) $(TESTARGS)

By request the target_wrapper.sh:

#!/bin/sh
PATH=/C/Qt/Qt5.9.2/5.9/mingw64/bin:$PATH
export PATH
QT_PLUGIN_PATH=/C/Qt/Qt5.9.2/5.9/mingw64/share/qt5/plugins${QT_PLUGIN_PATH:+:$QT_PLUGIN_PATH}
export QT_PLUGIN_PATH
exec "$@"

The first cd changes into the homedir of the current user and calls target_wrapper.sh. The target_wrapper.sh script tries to execute the test1 binary - which is not inside the home directory.

What am I doing wrong?


Solution

  • DESTDIR needs be set, so the make check target knows where to look for the test executables. The "cd" changes into this directory before trying to run the target_wrapper.sh.