aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Burkert <carl.burkert@gmail.com>2021-09-24 15:24:21 +0200
committerCarl Burkert <carl.burkert@gmail.com>2021-09-24 15:24:21 +0200
commita906a122bcbb360c889a41a590d582b0b62c7e61 (patch)
tree2b2b882e21c52992f55abc92c72c3a9b058c1dba /test
parentdfeb17a3811054716828be47644ac98b146746de (diff)
downloadfpm-a906a122bcbb360c889a41a590d582b0b62c7e61.tar.gz
fpm-a906a122bcbb360c889a41a590d582b0b62c7e61.zip
Fix dir not getting removed after testing fpm
Diffstat (limited to 'test')
-rw-r--r--test/new_test/new_test.f907
1 files changed, 5 insertions, 2 deletions
diff --git a/test/new_test/new_test.f90 b/test/new_test/new_test.f90
index a6c859b..f191015 100644
--- a/test/new_test/new_test.f90
+++ b/test/new_test/new_test.f90
@@ -36,6 +36,8 @@ character(len=:),allocatable :: shortdirs(:)
character(len=:),allocatable :: expected(:)
logical,allocatable :: tally(:)
logical :: IS_OS_WINDOWS
+character(len=*),parameter :: dirs_to_be_removed = 'fpm_scratch_* name-with-hyphens'
+character(len=:),allocatable :: rm_command
write(*,'(g0:,1x)')'TEST new SUBCOMMAND (draft):'
cmdpath = get_command_path()
@@ -146,10 +148,11 @@ logical :: IS_OS_WINDOWS
! clean up scratch files; might want an option to leave them for inspection
select case (get_os_type())
case (OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_CYGWIN, OS_SOLARIS, OS_FREEBSD, OS_OPENBSD)
- call execute_command_line('rm -rf fpm_scratch_*',exitstat=estat,cmdstat=cstat,cmdmsg=message)
+ rm_command = 'rm -rf ' // dirs_to_be_removed
case (OS_WINDOWS)
- call execute_command_line('rmdir fpm_scratch_* /s /q',exitstat=estat,cmdstat=cstat,cmdmsg=message)
+ rm_command = 'rmdir ' // dirs_to_be_removed // ' /s /q'
end select
+ call execute_command_line(rm_command, exitstat=estat,cmdstat=cstat,cmdmsg=message)
write(*,'("new TEST TALLY=",*(g0))')tally
if(all(tally))then