2018-06-15 06:13:36 +08:00
|
|
|
XFAIL: ios
|
2017-11-09 13:49:28 +08:00
|
|
|
RUN: mkdir -p %t
|
2018-09-05 01:08:47 +08:00
|
|
|
# Use a ".exe" extension because it is needed on Windows to call system()
|
|
|
|
# to execute itself again.
|
|
|
|
RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t/T.exe
|
2017-11-09 13:49:28 +08:00
|
|
|
|
|
|
|
RUN: rm -rf %t/T0 %t/T1 %t/T2
|
|
|
|
RUN: mkdir -p %t/T0 %t/T1 %t/T2
|
|
|
|
RUN: echo F..... > %t/T0/1
|
|
|
|
RUN: echo .U.... > %t/T0/2
|
|
|
|
RUN: echo ..Z... > %t/T0/3
|
|
|
|
|
|
|
|
# Test what happens if the control file is junk.
|
|
|
|
|
2019-02-13 12:04:45 +08:00
|
|
|
RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1
|
2017-11-09 13:49:28 +08:00
|
|
|
RUN: echo JUNK > %t/MCF
|
2019-02-13 12:04:45 +08:00
|
|
|
RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=JUNK
|
2017-11-09 13:49:28 +08:00
|
|
|
RUN: echo 3 > %t/MCF; echo 0 >> %t/MCF; echo %t/T1/1 >> %t/MCF
|
2019-02-13 12:04:45 +08:00
|
|
|
RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=JUNK
|
2017-11-09 13:49:28 +08:00
|
|
|
JUNK: MERGE-OUTER: non-empty control file provided: {{.*}}MCF
|
|
|
|
JUNK: MERGE-OUTER: bad control file, will overwrite it
|
|
|
|
|
|
|
|
|
|
|
|
# Check valid control files
|
|
|
|
|
|
|
|
RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1
|
|
|
|
RUN: 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
|
2018-09-05 01:08:47 +08:00
|
|
|
RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=OK_0
|
2017-11-09 13:49:28 +08:00
|
|
|
OK_0: MERGE-OUTER: control file ok, 3 files total, first not processed file 0
|
|
|
|
OK_0: MERGE-OUTER: 3 new files with {{.*}} new features added
|
|
|
|
|
2017-11-17 04:25:45 +08:00
|
|
|
RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1
|
2017-11-09 13:49:28 +08:00
|
|
|
RUN: 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
|
|
|
|
RUN: echo STARTED 0 1 >> %t/MCF
|
2019-02-15 07:12:33 +08:00
|
|
|
RUN: echo FT 0 11 >> %t/MCF
|
2017-11-09 13:49:28 +08:00
|
|
|
RUN: echo STARTED 1 2 >> %t/MCF
|
2019-02-15 07:12:33 +08:00
|
|
|
RUN: echo FT 1 12 >> %t/MCF
|
2018-09-05 01:08:47 +08:00
|
|
|
RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=OK_2
|
2017-11-09 13:49:28 +08:00
|
|
|
OK_2: MERGE-OUTER: control file ok, 3 files total, first not processed file 2
|
|
|
|
OK_2: MERGE-OUTER: 3 new files with {{.*}} new features added
|
|
|
|
|
|
|
|
RUN: rm -f %t/T1/*; cp %t/T0/* %t/T1
|
|
|
|
RUN: 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
|
|
|
|
RUN: echo STARTED 0 1 >> %t/MCF
|
2019-02-15 07:12:33 +08:00
|
|
|
RUN: echo FT 0 11 >> %t/MCF
|
2017-11-09 13:49:28 +08:00
|
|
|
RUN: echo STARTED 1 2 >> %t/MCF
|
2019-02-15 07:12:33 +08:00
|
|
|
RUN: echo FT 1 12 >> %t/MCF
|
2017-11-09 13:49:28 +08:00
|
|
|
RUN: echo STARTED 2 2 >> %t/MCF
|
2019-02-15 07:12:33 +08:00
|
|
|
RUN: echo FT 2 13 >> %t/MCF
|
2018-09-05 01:08:47 +08:00
|
|
|
RUN: %run %t/T.exe -merge=1 %t/T1 %t/T2 -merge_control_file=%t/MCF 2>&1 | FileCheck %s --check-prefix=OK_3
|
2017-11-09 13:49:28 +08:00
|
|
|
OK_3: MERGE-OUTER: nothing to do, merge has been completed before
|