File tree Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 81
81
echo " $filename "
82
82
" $fpm " ${cmdrun[$j]} $filename
83
83
test -e $filename .txt
84
+ # non-i-th tests should not have run
84
85
for k in ${others[@]}
85
86
do
86
87
test ! -e ${targets[$k]} $k .txt
87
88
done
88
89
done
89
90
done
91
+
92
+ # Test building all targets and with runner
93
+ if [[ " $( which time) " ]]; then
94
+ targets=( " run" " run --example" " test" )
95
+ names=( " run" " example" " test" )
96
+ cmdrun=( " " " --runner time" )
97
+ for j in {0..2}
98
+ do
99
+ for i in {0..1}
100
+ do
101
+ rm -f * .txt
102
+ " $fpm " ${targets[$j]}${cmdrun[$i]}
103
+ # all targets should have run
104
+ for k in ${cases[@]}
105
+ do
106
+ test -e ${names[$j]} $k .txt
107
+ done
108
+ done
109
+ done
110
+ fi
90
111
popd
91
112
113
+
92
114
pushd auto_discovery_off
93
115
" $fpm " build
94
116
" $fpm " run --target auto_discovery_off
Original file line number Diff line number Diff line change @@ -486,7 +486,6 @@ subroutine cmd_run(settings,test)
486
486
integer :: run_scope,firsterror
487
487
integer , allocatable :: stat(:),target_ID(:)
488
488
character (len= :),allocatable :: line
489
- logical :: toomany
490
489
491
490
call get_package_data(package, " fpm.toml" , error, apply_defaults= .true. )
492
491
if (allocated (error)) then
@@ -547,13 +546,8 @@ subroutine cmd_run(settings,test)
547
546
end if
548
547
549
548
! Check all names are valid
550
- ! or no name and found more than one file
551
- toomany= size (settings% name)==0 .and. size (executables)>1
552
- if ( any (.not. found) &
553
- & .or. &
554
- & ( (toomany .and. .not. test) .or. (toomany .and. settings% runner /= ' ' ) ) &
555
- & .and. &
556
- & .not. settings% list) then
549
+ ! or no name and found more than one file
550
+ if ( any (.not. found) ) then
557
551
line= join(settings% name)
558
552
if (line/= ' .' )then ! do not report these special strings
559
553
if (any (.not. found))then
You can’t perform that action at this time.
0 commit comments