summaryrefslogtreecommitdiffstats
path: root/scripts/qt
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@digia.com>2013-02-14 10:39:53 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-14 11:26:20 +0100
commit6c2fb617b512663fe8f331a86cfe368dfb2f35b6 (patch)
treef2c65322492201062254ab8aff91fcdbc682e117 /scripts/qt
parent61b524bffef356f03572da25f0398bc4e1fbf3f8 (diff)
QtQA: Added configurable parameter for test dir
By using qt.tests.dir parameter one can define where the build will run the tests. Default is the submodule root, as it is now. Affects only qt5 builds. Change-Id: I7c7f5610f092f4510a0880d3df9af70bfe814b93 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Diffstat (limited to 'scripts/qt')
-rwxr-xr-xscripts/qt/qtmod_test.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/qt/qtmod_test.pl b/scripts/qt/qtmod_test.pl
index d0281518..f14a4d47 100755
--- a/scripts/qt/qtmod_test.pl
+++ b/scripts/qt/qtmod_test.pl
@@ -190,6 +190,8 @@ my @PROPERTIES = (
q{qt.tests.flaky_mode} => q{how to handle flaky autotests ("best", "worst" or "ignore")},
+ q{qt.tests.dir} => q{directory where to run the testplanner and execute tests},
+
q{qt.qtqa-tests.enabled} => q{if 1, run the shared autotests in qtqa (over this module }
. q{only, or all modules if qt.gitmodule == "qt5"). The qtqa }
. q{tests are run after the other autotests.},
@@ -492,6 +494,7 @@ sub read_and_store_configuration
'qt.tests.timeout' => 450 ,
'qt.tests.capture_logs' => q{} ,
'qt.tests.tee_logs' => q{} ,
+ 'qt.tests.dir' => q{} ,
'qt.tests.args' => \&default_qt_tests_args ,
'qt.tests.backtraces' => \&default_qt_tests_backtraces ,
'qt.tests.flaky_mode' => q{} ,
@@ -1214,6 +1217,7 @@ sub run_autotests
my $doing = $self->doing( 'running the autotests' );
my $qt_gitmodule_build_dir = $self->{ 'qt.gitmodule.build.dir' };
+ my $qt_tests_dir = $self->{ 'qt.tests.dir' };
# Add this module's `bin' directory to PATH.
# FIXME: verify if this is really needed (should each module's tools build directly
@@ -1230,9 +1234,10 @@ sub run_autotests
# In qt5, all tests are expected to be correctly set up in top-level .pro files, so they
# do not need an explicit added compile step.
# In qt4, this is not the case, so they need to be compiled separately.
+ # By using qt.tests.dir one can change the test dir to be tests/auto in qt5 also.
return $self->_run_autotests_impl(
tests_dir => ($self->{ 'qt.gitmodule' } ne 'qt')
- ? $qt_gitmodule_build_dir # qt5
+ ? catfile( $qt_gitmodule_build_dir, $qt_tests_dir) # qt5
: catfile( $qt_gitmodule_build_dir, 'tests/auto' ), # qt4
insignificant_option => 'qt.tests.insignificant',
do_compile => ($self->{ 'qt.gitmodule' } ne 'qt')