summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov/llvm-cov.test
diff options
context:
space:
mode:
authorYuchen Wu <yuchenericwu@hotmail.com>2013-11-14 00:07:15 +0000
committerYuchen Wu <yuchenericwu@hotmail.com>2013-11-14 00:07:15 +0000
commite28da84c965b117500a44323ae9572126a141fcb (patch)
treed1805a2658ed00def1940697328ee01f41e42168 /llvm/test/tools/llvm-cov/llvm-cov.test
parent857d6e3dd1c5be19faa68e679fc126585cd18b8c (diff)
downloadbcm5719-llvm-e28da84c965b117500a44323ae9572126a141fcb.tar.gz
bcm5719-llvm-e28da84c965b117500a44323ae9572126a141fcb.zip
llvm-cov: Replaced asserts with proper error handling.
Unified the interface for read functions. They all return a boolean indicating if the read from file succeeded. Functions that previously returned the read value now store it into a variable that is passed in by reference instead. Callers will need to check the return value to detect if an error occurred. Also added a new test which ensures that no assertions occur when file contains invalid data. llvm-cov should return with error code 1 upon failure. llvm-svn: 194635
Diffstat (limited to 'llvm/test/tools/llvm-cov/llvm-cov.test')
-rw-r--r--llvm/test/tools/llvm-cov/llvm-cov.test6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/test/tools/llvm-cov/llvm-cov.test b/llvm/test/tools/llvm-cov/llvm-cov.test
index b1a56a9ba2e..cf694a4c275 100644
--- a/llvm/test/tools/llvm-cov/llvm-cov.test
+++ b/llvm/test/tools/llvm-cov/llvm-cov.test
@@ -1,4 +1,8 @@
-RUN: cd %p/Inputs && llvm-cov -gcno=test.gcno -gcda=test.gcda \
+RUN: cd %p/Inputs
+
+RUN: llvm-cov -gcno=test.gcno -gcda=test.gcda \
RUN: | diff test.cpp.gcov -
+RUN: not llvm-cov -gcno=test_read_fail.gcno -gcda=test.gcda
+
XFAIL: powerpc64, s390x, arm
OpenPOWER on IntegriCloud