1XFAIL: ios 2RUN: mkdir -p %t 3# Use a ".exe" extension because it is needed on Windows to call system() 4# to execute itself again. 5RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t/T.exe 6 7RUN: rm -rf %t/T0 %t/T1 %t/T2 8RUN: mkdir -p %t/T0 %t/T1 %t/T2 9RUN: echo F..... > %t/T0/1 10RUN: echo .U.... > %t/T0/2 11RUN: echo ..Z... > %t/T0/3 12 13# Test what happens if the control file is junk. 14 15RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 16RUN: echo JUNK > %t/MCF 17RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=JUNK 18RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF 19RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=JUNK 20JUNK: MERGE-OUTER: non-empty control file provided: {{.*}}MCF 21JUNK: MERGE-OUTER: bad control file, will overwrite it 22 23 24# Check valid control files 25 26RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 27RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF; echo %t/T1/2 >> %t/MCF; echo %t/T1/3 >> %t/MCF 28RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=OK_0 29OK_0: MERGE-OUTER: control file ok, 3 files total, first not processed file 0 30OK_0: MERGE-OUTER: 3 new files with {{.*}} new features added 31 32RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 33RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF; echo %t/T1/2 >> %t/MCF; echo %t/T1/3 >> %t/MCF 34RUN: echo STARTED 0 1 >> %t/MCF 35RUN: echo FT 0 11 >> %t/MCF 36RUN: echo STARTED 1 2 >> %t/MCF 37RUN: echo FT 1 12 >> %t/MCF 38RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=OK_2 39OK_2: MERGE-OUTER: control file ok, 3 files total, first not processed file 2 40OK_2: MERGE-OUTER: 3 new files with {{.*}} new features added 41 42RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1 43RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF; echo %t/T1/2 >> %t/MCF; echo %t/T1/3 >> %t/MCF 44RUN: echo STARTED 0 1 >> %t/MCF 45RUN: echo FT 0 11 >> %t/MCF 46RUN: echo STARTED 1 2 >> %t/MCF 47RUN: echo FT 1 12 >> %t/MCF 48RUN: echo STARTED 2 2 >> %t/MCF 49RUN: echo FT 2 13 >> %t/MCF 50RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=OK_3 51OK_3: MERGE-OUTER: nothing to do, merge has been completed before 52