File tree 1 file changed +10
-2
lines changed 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -908,8 +908,16 @@ sub run_cmake
908
908
close $out ;
909
909
}
910
910
911
- sleep (30) if (is_windows()); # CMPLRTOOLS-26045: sleep for 30 second to correctly remove the folder
912
- rmtree($build_dir ); # Clean build folder
911
+ if (-d $build_dir ) {
912
+ execute( " rm -rf $build_dir " );
913
+ if ($command_status != $PASS ) {
914
+ sleep (30) if (is_windows()); # CMPLRTOOLS-26045: sleep for 30 second to correctly remove the folder
915
+ execute( " rm -rf $build_dir " ); # Device or resource busy, rm again.
916
+ if ($command_status != $PASS ) {
917
+ $build_dir = $build_dir . " _" . int (rand (~0));
918
+ }
919
+ }
920
+ }
913
921
safe_Mkdir($build_dir ); # Create build folder
914
922
chdir_log($build_dir ); # Enter build folder
915
923
execute( " cmake -G Ninja ../ -DTEST_SUITE_SUBDIRS=$subdir -DTEST_SUITE_LIT=$lit "
You can’t perform that action at this time.
0 commit comments