summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/testcase.prf
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2012-01-10 10:38:51 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-11 04:09:26 +0100
commit28bfa8f6cc62306ada0fbd4e367f4b99748ca606 (patch)
tree05d7650330e5698d0b20f65d808882eef3fb4d20 /mkspecs/features/testcase.prf
parent008a1573af06b8e5e6e7a212feecd9ba35731e81 (diff)
Changed selftests unittest to work from installation directory.
- All subprograms installed as part of test instead of separate installs - Added installTestHelperApp() to testcase.prf Change-Id: I02fbbb299f095054c9216ad0e5f91f574fb0fe3d Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'mkspecs/features/testcase.prf')
-rw-r--r--mkspecs/features/testcase.prf25
1 files changed, 25 insertions, 0 deletions
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index 15135e1f89..f890e97733 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -126,3 +126,28 @@ contains(INSTALLS, target) {
}
+defineTest(installTestHelperApp) {
+ # args: relativeSource, relativeDestination, targetName
+ # description: install executables from other project directories as part of your installation.
+ # relativeSource - file to install including relative path
+ # relativeDestination - relative directory to install to
+ # targetName - executable without extension
+ targetName = $$replace(3, ' ', '_') # handle spaces in name
+ subTarget = $${targetName}.target
+ subInstall = $${targetName}_install
+ subConfig = $${subInstall}.CONFIG
+ subFiles = $${subInstall}.files
+ subPath = $${subInstall}.path
+ win32: extension = .exe
+ $$subTarget = $${2}/$${3}$${extension}
+ $$subFiles = $${1}$${extension}
+ $$subPath = $${target.path}/$${2}
+ $$subConfig += no_check_exist executable
+ INSTALLS += $${subInstall}
+ export(INSTALLS)
+ export($$subTarget)
+ export($$subFiles)
+ export($$subPath)
+ export($$subConfig)
+}
+