2014-06-11 23:11:26 +08:00
|
|
|
// Test that no data is collected without a runtime flag.
|
|
|
|
//
|
2015-05-08 07:20:47 +08:00
|
|
|
// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
|
2014-06-11 23:11:26 +08:00
|
|
|
//
|
|
|
|
// RUN: rm -rf %T/coverage-disabled
|
|
|
|
//
|
|
|
|
// RUN: mkdir -p %T/coverage-disabled/normal
|
2015-08-15 01:39:48 +08:00
|
|
|
// RUN: %env_asan_opts=coverage_direct=0:coverage_dir='"%T/coverage-disabled/normal"':verbosity=1 %run %t
|
2014-06-11 23:11:26 +08:00
|
|
|
// RUN: not %sancov print %T/coverage-disabled/normal/*.sancov 2>&1
|
|
|
|
//
|
|
|
|
// RUN: mkdir -p %T/coverage-disabled/direct
|
2015-08-15 01:39:48 +08:00
|
|
|
// RUN: %env_asan_opts=coverage_direct=1:coverage_dir='"%T/coverage-disabled/direct"':verbosity=1 %run %t
|
2014-06-11 23:11:26 +08:00
|
|
|
// RUN: cd %T/coverage-disabled/direct
|
|
|
|
// RUN: not %sancov rawunpack *.sancov
|
2014-12-24 20:23:15 +08:00
|
|
|
//
|
2015-06-27 07:44:43 +08:00
|
|
|
// UNSUPPORTED: android
|
2014-06-11 23:11:26 +08:00
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
return 0;
|
|
|
|
}
|