brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · 0a5d0ab Raw
73 lines · plain
1RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest2 3RUN: rm -rf %t/T1 %t/T24RUN: mkdir -p %t/T1 %t/T25RUN: echo F..... > %t/T1/16RUN: echo .U.... > %t/T1/27RUN: echo ..Z... > %t/T1/38 9# T1 has 3 elements, T2 is empty.10RUN: %run %t-FullCoverageSetTest         -set_cover_merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK111CHECK1: MERGE-OUTER: 3 files, 3 in the initial corpus12CHECK1: MERGE-OUTER: 0 new files with 0 new features added13 14RUN: echo ...Z.. > %t/T2/115RUN: echo ....E. > %t/T2/216RUN: echo .....R > %t/T2/317RUN: echo F..... > %t/T2/a18RUN: echo .U.... > %t/T2/b19RUN: echo ..Z... > %t/T2/c20 21# T1 has 3 elements, T2 has 6 elements, only 3 are new.22RUN: %run %t-FullCoverageSetTest         -set_cover_merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK223CHECK2: MERGE-OUTER: 9 files, 3 in the initial corpus24CHECK2: MERGE-OUTER: 3 new files with 3 new features added25 26# Now, T1 has 6 units and T2 has no new interesting units.27RUN: %run %t-FullCoverageSetTest         -set_cover_merge=1 %t/T1 %t/T2 2>&1 | FileCheck %s --check-prefix=CHECK328CHECK3: MERGE-OUTER: 12 files, 6 in the initial corpus29CHECK3: MERGE-OUTER: 0 new files with 0 new features added30 31RUN: rm -rf %t/T1/* %t/T2/*32RUN: mkdir -p %t/T333RUN: echo ...... > %t/T1/134RUN: echo F..... > %t/T2/a35RUN: echo .U.... > %t/T2/b36RUN: echo ..Z... > %t/T2/c37RUN: echo ...Z.. > %t/T3/138RUN: echo ....E. > %t/T3/239RUN: echo .....R > %t/T3/340RUN: echo .UZZER. > %t/T3/a41RUN: echo .UZZER.. > %t/T3/b42RUN: echo ...... > %t/T3/c43 44# T1 is empty, T2 and T3 have overlapping features. The optimal solution45# consists of 2 files: T2/a, T3/a. These files cover 6 new features.46# Although T3/a is larger in size (1 more byte) we prefer it because47# it covers more features than any other file.48RUN: %run %t-FullCoverageSetTest         -set_cover_merge=1 %t/T1 %t/T2 %t/T3 2>&1 | FileCheck %s --check-prefix=CHECK_OVERLAP49CHECK_OVERLAP: MERGE-OUTER: 10 files, 1 in the initial corpus50CHECK_OVERLAP: MERGE-OUTER: 2 new files with 6 new features added51# Make sure that we are prefering smaller files (T3/a over T3/b).52RUN: diff %t/T1/1b2301992a0266982b135fee5164937d7f7abca3 %t/T3/a53 54RUN: rm -rf %t/T1/* %t/T2/* %t/T3/*55RUN: echo ...... > %t/T1/156RUN: echo F..... > %t/T2/a57RUN: echo .U.... > %t/T2/b58RUN: echo ..Z... > %t/T2/c59RUN: echo ...Z.. > %t/T3/160RUN: echo ....E. > %t/T3/261RUN: echo .....R > %t/T3/362RUN: echo .UZZER. > %t/T3/a63RUN: echo .UZZER.. > %t/T3/b64RUN: echo ...... > %t/T3/c65 66# Test the previous scenario with the '-merge=1' flag.67# Expect more files to be added to the first corpus, since '-merge=1'68# is going to prefer smaller files and ignore the fact that69# T3/a covers almost all of the available features.70RUN: %run %t-FullCoverageSetTest         -merge=1 %t/T1 %t/T2 %t/T3 2>&1 | FileCheck %s --check-prefix=CHECK_OVERLAP271CHECK_OVERLAP2: MERGE-OUTER: 10 files, 1 in the initial corpus72CHECK_OVERLAP2: MERGE-OUTER: 6 new files with 6 new features added73