diff options
author | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-11-14 00:07:15 +0000 |
---|---|---|
committer | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-11-14 00:07:15 +0000 |
commit | dbb51ff01fd08df39e5040c1cd9edacdc3e4308a (patch) | |
tree | f7efe453cbf087a07bae0933b017dec688e5f24e /test/tools | |
parent | 006806267a4f85a5abf32573348c81098f2696d2 (diff) | |
download | external_llvm-dbb51ff01fd08df39e5040c1cd9edacdc3e4308a.zip external_llvm-dbb51ff01fd08df39e5040c1cd9edacdc3e4308a.tar.gz external_llvm-dbb51ff01fd08df39e5040c1cd9edacdc3e4308a.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tools')
-rw-r--r-- | test/tools/llvm-cov/llvm-cov.test | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/tools/llvm-cov/llvm-cov.test b/test/tools/llvm-cov/llvm-cov.test index b1a56a9..cf694a4 100644 --- a/test/tools/llvm-cov/llvm-cov.test +++ b/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 |