summaryrefslogtreecommitdiffstats
path: root/scripts/qt
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@digia.com>2013-11-28 09:30:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-01 07:16:51 +0100
commit22c7a1f438ba9be1692f32d39ad1c7697ade8f9d (patch)
treec936b97fb7464e921b2cc8e7e7b5c5c435afc212 /scripts/qt
parent0c4f56346dd9d509c629a7f8d2fc247fd560caec (diff)
qtqa: Delete $qt_dir only if needed
Fix warning which says that script can't remove path when in it. In this case the dir was already cleaned and it shouldn't be deleted again. Task-number: QTQAINFRA-778 Change-Id: Id22501d8ab886799cf873dc2b4588cc94cfcf612 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Diffstat (limited to 'scripts/qt')
-rwxr-xr-xscripts/qt/qtmod_test.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/qt/qtmod_test.pl b/scripts/qt/qtmod_test.pl
index 793cf2ca..124fd1fd 100755
--- a/scripts/qt/qtmod_test.pl
+++ b/scripts/qt/qtmod_test.pl
@@ -62,6 +62,7 @@ use List::MoreUtils qw( any apply );
use autodie;
use Readonly;
use Text::Trim;
+use Cwd;
#Code coverage tools
Readonly my $TESTCOCOON => 'testcocoon';
@@ -650,7 +651,8 @@ sub run_clean_directories
}
# Job can be configured to outside base.dir.
- if (-e $qt_dir) {
+ # If we are in same dir, it was already deleted
+ if ((-e $qt_dir) && ( cwd() ne $qt_dir)) {
push @to_delete, $qt_dir;
}
# it will get created once cloned and checked out