From 391c2c12abb66c6edcdac511be4ca126aeaf3377 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Tue, 25 Feb 2014 10:25:23 +0200 Subject: Introduce GENERATED_TESTDATA variable and fix qresourceengine test. testcase.prf cannot be loaded from pro file for various reasons, see qtbase commit history for details. Moved runtime testdata logic from pro file to testdata.prf, and thus made is reusable in other test cases as well. Change-Id: I500d08dc4951e4eda862071e4ddd3e0f6de8c3d2 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/testcase.prf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index 10f421a8e2..40ec7cff30 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -134,6 +134,28 @@ contains(INSTALLS, target) { INSTALLS += $$tdi } + # Install GENERATED_TESTDATA. + # Logic is copied from the TESTDATA installation, only difference being that + # INSTALL target is added with CONFIG = no_check_exist + for(file, GENERATED_TESTDATA) { + tnam = $$file + tnam ~= s,\\.\\.,dotdot, + tnam ~= s,[?*],wildcard, + tnam ~= s,[^A-Za-z0-9],_, + tdi = testdata_$$tnam + tdif = $${tdi}.files + tdip = $${tdi}.path + tdic = $${tdi}.CONFIG + + $$tdif = $$file + $$tdic = no_check_exist + + file = $$replace(file, ^(\\.\\./)+, ) + $$tdip = $${target.path}/$$dirname(file) + + INSTALLS += $$tdi + } + # TEST_HELPER_INSTALLS specifies additional test helper executables for installation. # # Typical usage is: -- cgit v1.2.3