【发布时间】:2023-03-14 07:34:01
【问题描述】:
我有一个带有子目录模板和两个子项目的 qmake 项目。 subdir 项目是两个测试用例。该项目是在 mingw64 上构建的。
当我运行“mingw32-make check”时,当 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
Makefile.Release 为检查目标调用以下行:
check: first
cd && /C/JENKINS/workspace/MyProject/tests/test1/target_wrapper.sh $(TESTRUNNER) release/$(TARGET) $(TESTARGS)
通过请求 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 "$@"
第一个 cd 进入当前用户的 homedir 并调用 target_wrapper.sh。 target_wrapper.sh 脚本尝试执行 test1 二进制文件 - 不在主目录中。
我做错了什么?
【问题讨论】:
-
请发布 target_wrapper.sh。
-
将 target_wrapper.sh 添加到我的问题中。
-
您是否将
DESTDIR = ...添加到您的.pro 文件中? -
没有。未安装或部署测试程序。
-
这就是为什么它说
/home/jenluelokal/release/test1.exe: No such file or directory它不存在。设置DESTDIR = /home/jenluelokal/release。此外,您的路径看起来像是将 Windows 与 Linux 混合在一起。
标签: bash qt qmake mingw-w64 qtestlib