aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends.py3
-rwxr-xr-xrun_tests.py4
-rw-r--r--test cases/frameworks/4 qt5/mainWindow.h5
-rw-r--r--test cases/frameworks/4 qt5/meson.build2
-rw-r--r--test cases/frameworks/4 qt5/stuff.qrc1
-rw-r--r--test cases/frameworks/4 qt5/stuff2.qrc5
6 files changed, 12 insertions, 8 deletions
diff --git a/backends.py b/backends.py
index e7b6a9c..55f3192 100644
--- a/backends.py
+++ b/backends.py
@@ -218,7 +218,8 @@ class Backend():
for src in gen_src_deps:
src_list.append(src)
if is_unity:
- unity_src.append(src)
+ unity_src.append(os.path.join(self.environment.get_build_dir(), src))
+ header_deps.append(src)
else:
# Generated targets are ordered deps because the must exist
# before the sources compiling them are used. After the first
diff --git a/run_tests.py b/run_tests.py
index 96fff21..4ca0659 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -25,6 +25,7 @@ test_build_dir = 'work area'
install_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'install dir')
meson_command = './meson.py'
+unity_flags = ['--unity']
msbuild_exe = shutil.which('msbuild')
if msbuild_exe is not None:
@@ -107,7 +108,8 @@ def run_test(testdir, should_succeed):
os.mkdir(test_build_dir)
os.mkdir(install_dir)
print('Running test: ' + testdir)
- gen_command = [sys.executable, meson_command, '--prefix', install_dir, testdir, test_build_dir] + backend_flags
+ gen_command = [sys.executable, meson_command, '--prefix', install_dir, testdir, test_build_dir]\
+ + unity_flags + backend_flags
p = subprocess.Popen(gen_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(stdo, stde) = p.communicate()
stdo = stdo.decode('utf-8')
diff --git a/test cases/frameworks/4 qt5/mainWindow.h b/test cases/frameworks/4 qt5/mainWindow.h
index fc6b245..82d8c76 100644
--- a/test cases/frameworks/4 qt5/mainWindow.h
+++ b/test cases/frameworks/4 qt5/mainWindow.h
@@ -1,3 +1,6 @@
+#ifndef MES_MAINWINDOW
+#define MES_MAINWINDOW
+
#include <QObject>
#include <QMainWindow>
#include "ui_mainWindow.h"
@@ -13,3 +16,5 @@ public:
private:
};
+
+#endif
diff --git a/test cases/frameworks/4 qt5/meson.build b/test cases/frameworks/4 qt5/meson.build
index 3f0770e..cda27ae 100644
--- a/test cases/frameworks/4 qt5/meson.build
+++ b/test cases/frameworks/4 qt5/meson.build
@@ -6,7 +6,7 @@ q5exe = executable('qt5app',
sources : ['main.cpp', 'mainWindow.cpp'], # Sources that don't need preprocessing.
moc_headers : ['mainWindow.h'], # These need to be fed through the moc tool before use.
ui_files : 'mainWindow.ui', # XML files that need to be compiled with the uic tol.
-qresources : ['stuff.qrc', 'stuff2.qrc'], # Resource files for rcc compiler.
+qresources : 'stuff.qrc', # Resource file for rcc compiler.
deps : qt5dep)
# We need a console test application because some test environments
diff --git a/test cases/frameworks/4 qt5/stuff.qrc b/test cases/frameworks/4 qt5/stuff.qrc
index cd1c6b5..48f8fda 100644
--- a/test cases/frameworks/4 qt5/stuff.qrc
+++ b/test cases/frameworks/4 qt5/stuff.qrc
@@ -1,5 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>thing.png</file>
+ <file>thing2.png</file>
</qresource>
</RCC>
diff --git a/test cases/frameworks/4 qt5/stuff2.qrc b/test cases/frameworks/4 qt5/stuff2.qrc
deleted file mode 100644
index b719919..0000000
--- a/test cases/frameworks/4 qt5/stuff2.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource>
- <file>thing2.png</file>
-</qresource>
-</RCC>