66 lines · plain
1RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest2 3RUN: rm -rf %t/T0 %t/T1 %t/T24RUN: mkdir -p %t/T0 %t/T1 %t/T25RUN: echo F..... > %t/T0/16RUN: echo .U.... > %t/T0/27RUN: echo ..Z... > %t/T0/38 9# T1 has 3 elements, T2 is empty.10RUN: cp %t/T0/* %t/T1/11RUN: %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK112CHECK1: MERGE-OUTER: 3 files, 3 in the initial corpus13CHECK1: MERGE-OUTER: 0 new files with 0 new features added14 15RUN: echo ...Z.. > %t/T2/116RUN: echo ....E. > %t/T2/217RUN: echo .....R > %t/T2/318RUN: echo F..... > %t/T2/a19RUN: echo .U.... > %t/T2/b20RUN: echo ..Z... > %t/T2/c21 22# T1 has 3 elements, T2 has 6 elements, only 3 are new.23RUN: %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK224CHECK2: MERGE-OUTER: 9 files, 3 in the initial corpus25CHECK2: MERGE-OUTER: 3 new files with 3 new features added26 27# Now, T1 has 6 units and T2 has no new interesting units.28RUN: %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK329CHECK3: MERGE-OUTER: 12 files, 6 in the initial corpus30CHECK3: MERGE-OUTER: 0 new files with 0 new features added31 32# Check that we respect max_len during the merge and don't crash.33RUN: rm %t/T1/*34RUN: cp %t/T0/* %t/T1/35RUN: echo looooooooong > %t/T2/looooooooong36RUN: %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 -max_len=6 2>&1 | FileCheck %s --check-prefix=MAX_LEN37MAX_LEN: MERGE-OUTER: 3 new files38 39# Check that we respect -merge_control_file=FILE40RUN: rm %t/T1/*41RUN: cp %t/T0/* %t/T1/42RUN: rm -f %t/MCF43RUN: %run %t-FullCoverageSetTest -merge=1 -merge_control_file=%t/MCF %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=MCF44RUN: grep STARTED %t/MCF45RUN: grep FT %t/MCF46MCF: MERGE-INNER: using the control file {{.*}}MCF47MCF: MERGE-OUTER: 3 new files48 49 50# Check that merge tolerates failures.51RUN: rm %t/T1/*52RUN: cp %t/T0/* %t/T1/53RUN: echo 'FUZZER' > %t/T2/FUZZER54RUN: %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=MERGE_WITH_CRASH55MERGE_WITH_CRASH: MERGE-OUTER: successful in 2 attempt(s)56MERGE_WITH_CRASH: MERGE-OUTER: 3 new files57 58# Check that we actually limit the size with max_len59RUN: rm %t/T1/* %t/T2/*60RUN: echo 'FUZZER' > %t/T2/FUZZER61RUN: %run %t-FullCoverageSetTest -merge=1 %t/T1 %t/T2 -max_len=5 2>&1 | FileCheck %s --check-prefix=MERGE_LEN562RUN: not grep FUZZER %t/T1/*63RUN: grep FUZZE %t/T1/*64MERGE_LEN5: MERGE-OUTER: successful in 1 attempt(s)65 66