From 22c7a1f438ba9be1692f32d39ad1c7697ade8f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simo=20F=C3=A4lt?= Date: Thu, 28 Nov 2013 09:30:03 +0200 Subject: qtqa: Delete $qt_dir only if needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tony Sarajärvi --- scripts/qt/qtmod_test.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3