Stephen Hines | 6a211c5 | 2014-07-21 00:49:56 -0700 | [diff] [blame] | 1 | // Test that no data is collected without a runtime flag. |
| 2 | // |
Pirama Arumuga Nainar | cdce50b | 2015-07-01 12:26:56 -0700 | [diff] [blame] | 3 | // RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t |
Stephen Hines | 6a211c5 | 2014-07-21 00:49:56 -0700 | [diff] [blame] | 4 | // |
| 5 | // RUN: rm -rf %T/coverage-disabled |
| 6 | // |
| 7 | // RUN: mkdir -p %T/coverage-disabled/normal |
Pirama Arumuga Nainar | cdce50b | 2015-07-01 12:26:56 -0700 | [diff] [blame] | 8 | // RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:coverage_direct=0:coverage_dir=%T/coverage-disabled/normal:verbosity=1 %run %t |
Stephen Hines | 6a211c5 | 2014-07-21 00:49:56 -0700 | [diff] [blame] | 9 | // RUN: not %sancov print %T/coverage-disabled/normal/*.sancov 2>&1 |
| 10 | // |
| 11 | // RUN: mkdir -p %T/coverage-disabled/direct |
Pirama Arumuga Nainar | cdce50b | 2015-07-01 12:26:56 -0700 | [diff] [blame] | 12 | // RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:coverage_direct=1:coverage_dir=%T/coverage-disabled/direct:verbosity=1 %run %t |
Stephen Hines | 6a211c5 | 2014-07-21 00:49:56 -0700 | [diff] [blame] | 13 | // RUN: cd %T/coverage-disabled/direct |
| 14 | // RUN: not %sancov rawunpack *.sancov |
Stephen Hines | 86277eb | 2015-03-23 12:06:32 -0700 | [diff] [blame] | 15 | // |
| 16 | // XFAIL: android |
Stephen Hines | 6a211c5 | 2014-07-21 00:49:56 -0700 | [diff] [blame] | 17 | |
| 18 | int main(int argc, char **argv) { |
| 19 | return 0; |
| 20 | } |