Skip to content

Commit 4af517c

Browse files
committed
win32: run tests from windeployfolder so that Qt DLL(s) are present
1 parent 51bff1c commit 4af517c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

build_app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ windows_deploy () {
8686
PDIR="$3"
8787
SHIPDIR="$4"
8888
mkdir -p ${SHIPDIR}
89-
cp ${EXEDIR}/app.exe ${SHIPDIR}
89+
cp ${EXEDIR}/*.exe ${SHIPDIR} # copy main and tests. tests must be side-by-side with Qt DLL(s), too.
9090
cp ${PDIR}/libstylesplugin.dll ${SHIPDIR}
9191

9292
pushd ${SHIPDIR} >& /dev/null

tools/auto_test/run_cpp_auto_tests.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,13 @@ run_a_test() {
2323

2424
cd $CUR_GIT_ROOT
2525

26+
OUR_TEST_BINARIES_DIR=build/src/app
27+
if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
28+
OUR_TEST_BINARIES_DIR=build/windeployfolder
29+
fi
30+
2631
# run all test binaries that got built in the expected dir:
27-
find build/src/app \( -name '*test' -o -name '*tests' -o -name '*test.exe' -o -name '*tests.exe' \) | run_a_test
32+
find "${OUR_TEST_BINARIES_DIR}" -type f \( -name '*test' -o -name '*tests' -o -name '*test.exe' -o -name '*tests.exe' \) | run_a_test
2833

2934
echo 'We assume this was run with '\''set -e'\'' (look at upper lines of this script).'
3035
echo 'Assuming so, then getting here means:'

0 commit comments

Comments
 (0)