31 lines · plain
1# Tests -focus_function2#3# TODO: don't require linux.4# REQUIRES: linux5UNSUPPORTED: target=aarch64{{.*}}6 7RUN: %cpp_compiler %S/OnlySomeBytesTest.cpp -o %t-exe8 9RUN: %run %t-exe -runs=100 2>&1 | FileCheck %s --check-prefix=FOCUS_NONE10FOCUS_NONE-NOT: INFO: Focus function is set to11FOCUS_NONE-NOT: INFO: {{.*}} inputs touch the focus function12 13RUN: not %run %t-exe -runs=100 -focus_function=WRONG 2>&1 | FileCheck %s --check-prefix=FOCUS_WRONG14FOCUS_WRONG-NOT: INFO: Focus function is set to15FOCUS_WRONG: ERROR: Failed to set focus function16 17RUN: %run %t-exe -runs=100 -focus_function=f0 2>&1 | FileCheck %s --check-prefix=FOCUS_F018FOCUS_F0: INFO: Focus function is set to 'f0'19FOCUS_F0: INFO: 0/1 inputs touch the focus function20 21RUN: rm -rf %t-corpus22RUN: mkdir %t-corpus23# ABC triggers the focus function, others don't.24RUN: %python -c 'print("ABC" + "x" * 2048)' > %t-corpus/ABC25RUN: %python -c 'print("AXY" + "x" * 2048)' > %t-corpus/AXY26RUN: %python -c 'print("ABX" + "x" * 2048)' > %t-corpus/ABX27 28RUN: %run %t-exe -runs=10000 -focus_function=f0 %t-corpus 2>&1 | FileCheck %s --check-prefix=CORPUS_1_329CORPUS_1_3: INFO: 1/3 inputs touch the focus function30CORPUS_1_3: DONE {{.*}} focus:31