From 6c2fb617b512663fe8f331a86cfe368dfb2f35b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simo=20F=C3=A4lt?= Date: Thu, 14 Feb 2013 10:39:53 +0200 Subject: 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 Reviewed-by: Oswald Buddenhagen Reviewed-by: Janne Anttila --- scripts/qt/qtmod_test.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts') 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') -- cgit v1.2.3