summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov/llvm-cov.test
Commit message (Collapse)AuthorAgeFilesLines
* [tests] Add host-byteorder-*-endian; update XFAILs of big-endian triplesHubert Tong2019-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: Triple components in `XFAIL` lines are tested against the target triple. Various tests that are expected to fail on big-endian hosts are marked as being `XFAIL` for big-endian targets. This patch corrects these tests by having them test against a new `host-byteorder-big-endian` feature. Reviewers: xingxue, sfertile, jasonliu Reviewed By: xingxue Subscribers: jvesely, nhaehnle, fedor.sergeev, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60551 llvm-svn: 359689
* [llvm-cov] Add support for gcov --hash-filenames optionVedant Kumar2019-02-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The patch adds support for --hash-filenames to llvm-cov. This option adds md5 hash of the source path to the name of the generated .gcov file. The option is crucial for cases where you have multiple files with the same name but can't use --preserve-paths as resulting filenames exceed the limit. from gcov(1): ``` -x --hash-filenames By default, gcov uses the full pathname of the source files to to create an output filename. This can lead to long filenames that can overflow filesystem limits. This option creates names of the form source-file##md5.gcov, where the source-file component is the final filename part and the md5 component is calculated from the full mangled name that would have been used otherwise. ``` Patch by Igor Ignatev! Differential Revision: https://reviews.llvm.org/D58370 llvm-svn: 354379
* Profiling tests: Endianess XFAIL for powerpc- (32-bit)Hubert Tong2018-01-091-1/+1
| | | | | | | | | | | | Add powerpc- (32-bit) as XFAIL for tests that are documented either in- line or via commit messages as expected to fail on big-endian systems. Tests not documented in-line are documented in commit messages as follows: r211172 - test/tools/llvm-cov/llvm-cov.test r247920 - test/Transforms/SampleProfile/gcc-simple.ll llvm-svn: 322114
* llvm-cov: Require a subcommand when invoked as llvm-covJustin Bogner2015-03-241-21/+21
| | | | | | | | | | | | | | A while ago llvm-cov gained support for clang's instrumentation based profiling in addition to its gcov support, and subcommands were added to choose which behaviour to use. When no subcommand was specified, we fell back to gcov compatibility with a warning that a subcommand would be required in the future. Now, we require the subcommand. Note that if the basename of llvm-cov is gcov (via symlink or hardlink, for example), we still use the gcov compatible behaviour with no subcommand required. llvm-svn: 233132
* llvm-cov: Warn instead of error if a .gcda has arcs from an exit blockJustin Bogner2015-03-171-0/+4
| | | | | | Patch by Vanderson M. Rosario. Thanks! llvm-svn: 232443
* lit: Add 'cd' support to the internal shell and port some testsReid Kleckner2015-03-021-1/+2
| | | | | | | | | | | The internal shell was already threading around a 'cwd' parameter. We just have to make it mutable so that we can update it as the test script executes. If the shell ever grows support for environment variable substitution, we could also implement support for export. llvm-svn: 231017
* llvm-cov: Support specifying multiple source filesJustin Bogner2014-06-271-3/+3
| | | | | | | | | Make llvm-cov compatible with gcov for cases where multiple files are specified on the command line. That is, loop over each one and report coverage, and report errors on stderr only rather than via return code. llvm-svn: 211959
* Do not XFAIL test/tools/llvm-cov tests on powerpc64leUlrich Weigand2014-06-181-1/+1
| | | | | | | | | | | All tests in test/tools/llvm-cov fail on big-endian targets and are supposed to be XFAILed there. However, including "powerpc64" in the XFAIL line is now incorrect, since that matches both powerpc64- and powerpc64le- targets, and the tests pass on the latter. Update the XFAIL lines to use powerpc64- instead (like mips64-). llvm-svn: 211172
* llvm-cov: Handle missing source files as GCOV doesJustin Bogner2014-05-071-0/+6
| | | | | | | | | | | If the source files referenced by a gcno file are missing, gcov outputs a coverage file where every line is simply /*EOF*/. This also occurs for lines in the coverage that are past the end of a file that is found. This change mimics gcov. llvm-svn: 208149
* llvm-cov: Implement --no-outputJustin Bogner2014-05-071-0/+3
| | | | | | | | In gcov, there's a -n/--no-output option, which disables the writing of any .gcov files, so that it emits only the summary info on stdout. This implements the same behaviour in llvm-cov. llvm-svn: 208148
* llvm-cov: Add support for gcov's --long-file-names optionJustin Bogner2014-04-231-0/+10
| | | | | | | | GCOV provides an option to prepend output file names with the source file name, to disambiguate between covered data that's included from multiple sources. Add a flag to llvm-cov that does the same. llvm-svn: 207035
* For lcov tests, don't Xfail mips littl endian (mipsel-... and mip64el-...)Reed Kotler2014-02-241-1/+1
| | | | | | targets. Just big endian (mips-... and mips64-...) llvm-svn: 202049
* llvm-cov: Support gcov's extermely lenient treatment of -oJustin Bogner2014-02-181-0/+10
| | | | | | | | | | | | In gcov, the -o flag can accept either a directory or a file name. When given a directory, the gcda and gcno files are expected to be in that directory. When given a file, the gcda and gcno files are expected to be named based on the stem of that file. Non-existent paths are treated as files. This implements compatible behaviour. llvm-svn: 201555
* llvm-cov: Implement the preserve-paths flagJustin Bogner2014-02-041-0/+12
| | | | | | | | | | | | | | | | Until now, when a path in a gcno file included a directory, we would emit our .gcov file in that directory, whereas gcov always emits the file in the current directory. In doing so, this implements gcov's strange name-mangling -p flag, which is needed to avoid clobbering files when two with the same name exist in different directories. The path mangling is a bit ugly and only handles unix-like paths, but it's simple, and it doesn't make any guesses as to how it should behave outside of what gcov documents. If we decide this should be cross platform later, we can consider the compatibility implications then. llvm-svn: 200754
* llvm-cov: Implement the object-directory flagJustin Bogner2014-02-041-0/+7
| | | | llvm-svn: 200741
* llvm-cov: Ignore missing .gcda filesJustin Bogner2014-02-041-0/+5
| | | | | | | | When gcov is run without gcda data, it acts as if the counts are all zero and labels the file as - to indicate that there was no data. We should do the same. llvm-svn: 200740
* llvm-cov: Document the llvm-cov testsJustin Bogner2014-02-041-9/+31
| | | | llvm-svn: 200739
* llvm-cov: Expect a source file as a positional parameterJustin Bogner2014-01-291-10/+10
| | | | | | | | | | | Currently, llvm-cov isn't command-line compatible with gcov, which accepts a source file name as its first parameter and infers the gcno and gcda file names from that. This change keeps our -gcda and -gcno options available for convenience in overriding this behaviour, but adds the required parameter and inference behaviour as a compatible default. llvm-svn: 200417
* [Sparc] Add sparc to the list of XFAIL architecture. It seems that the ↵Venkatraman Govindaraju2014-01-251-1/+1
| | | | | | llvm-cov test is not supported in big-endian architectures. llvm-svn: 200101
* llvm-cov: Added -f option for function summaries.Yuchen Wu2013-12-191-0/+4
| | | | | | | | | | | Similar to the file summaries, the function summaries output line, branching and call statistics. The file summaries have been moved outside the initial loop so that all of the function summaries can be outputted before file summaries. Also updated test cases. llvm-svn: 197633
* llvm-cov: Print coverage summary to STDOUT.Yuchen Wu2013-12-181-2/+2
| | | | | | | | | | | | File summaries will now be optionally outputted which will give line, branching and call coverage info. Unfortunately, clang's current instrumentation does not give enough information to deduce function calls, something that gcc is able to do. Thus, no calls are always outputted to be consistent with gcov output. Also updated tests. llvm-svn: 197606
* llvm-cov: Added -c option for branch counts.Yuchen Wu2013-12-181-0/+4
| | | | | | | | | This will cause llvm-cov to output branch counts instead of branch probabilities. -b must be enabled. Also updated tests. llvm-svn: 197594
* llvm-cov: Added -u option for unconditional branch info.Yuchen Wu2013-12-161-0/+4
| | | | | | | | | Outputs branch information for unconditional branches in addition to conditional branches. -b option must be enabled. Also updated tests. llvm-svn: 197432
* llvm-cov: Added -b option for branch probabilities.Yuchen Wu2013-12-131-0/+4
| | | | | | | | | | | This option tells llvm-cov to print out branch probabilities when a basic block contains multiple branches. It also prints out some function summary info including the number of times the function enters, the percent of time it returns, and how many blocks were executed. Also updated tests. llvm-svn: 197198
* llvm-cov: Added -a option for block data.Yuchen Wu2013-12-101-2/+6
| | | | | | | | | | | | | | | Similar to gcov, llvm-cov will now print out the block count at the end of each block. Multiple blocks can end on the same line. One computational difference is by using -a, llvm-cov will no longer simply add the block counts together to form a line count. Instead, it will take the maximum of the block counts on that line. This has a similar effect to what gcov does, but generates more correct counts in certain scenarios. Also updated tests. llvm-svn: 196856
* llvm-cov: Added test.h header to tests.Yuchen Wu2013-12-071-0/+1
| | | | llvm-svn: 196632
* llvm-cov: Changed extension from .llcov to .gcov.Yuchen Wu2013-12-051-2/+1
| | | | llvm-svn: 196530
* Un-revert r196358: "llvm-cov: Added support for function checksums."Daniel Jasper2013-12-041-1/+3
| | | | | | And add the proper fix. llvm-svn: 196367
* Revert r196358: "llvm-cov: Added support for function checksums."Daniel Jasper2013-12-041-3/+1
| | | | | | | This currently breaks clang/test/CodeGen/code-coverage.c. The root cause is that the newly introduced access to Funcs[j] is out of bounds. llvm-svn: 196365
* llvm-cov: Added support for function checksums.Yuchen Wu2013-12-041-1/+3
| | | | | | | The function checksums are hashed from the concatenation of the function name and line number. llvm-svn: 196358
* llvm-cov: Another fix to llvm-cov test.Yuchen Wu2013-12-031-1/+1
| | | | | | | Copy all test files to temporary directory, not just test.* files. Tests didn't fail because the missing files occurred in XFAILS. llvm-svn: 196305
* Further fix to llvm-cov test.Daniel Jasper2013-12-031-1/+5
| | | | | | | It turns out that in some build systems, tests are executed in a non-writable directory. Hopefully, this finally fixes the issue. llvm-svn: 196256
* Fix llvm-cov test as suggested in r196228's post commit review.Daniel Jasper2013-12-031-0/+2
| | | | llvm-svn: 196255
* Copy input files to test directory.Daniel Jasper2013-12-031-4/+1
| | | | | | | | | | | With r196184, llvm-cov creates a new file right next to the input file. However, the Inputs-directory can't simply be assumed to be writable under all build systems. Also, this prevents a new source file from showing up in the source tree if the test aborts before the call to "rm". llvm-svn: 196228
* llvm-cov.test: Resurrect part of r194694 for win32 hosts.NAKAMURA Takumi2013-12-031-1/+1
| | | | llvm-svn: 196207
* llvm-cov: Removed output to STDOUT/specified file.Yuchen Wu2013-12-031-2/+3
| | | | | | | | | | | | Instead of asking the user to specify a single file to output coverage info and defaulting to STDOUT, llvm-cov now creates files for each source file with a naming system of: <source filename> + ".llcov". This is what gcov does and although it can clutter the working directory with numerous coverage files, it will be easier to hook the llvm-cov output to tools which operate on this assumption (such as lcov). llvm-svn: 196184
* mips: XFAIL llvm-cov testPetar Jovanovic2013-11-291-1/+1
| | | | | | | XFAIL llvm-cov.test for MIPS until big-endian issues are fixed for llvm-cov. The test does pass on MIPS little-endian. llvm-svn: 195966
* llvm-cov: Added file checksum to gcno and gcda files.Yuchen Wu2013-11-201-0/+2
| | | | | | | | | | | | Instead of permanently outputting "MVLL" as the file checksum, clang will create gcno and gcda checksums by hashing the destination block numbers of every arc. This allows for llvm-cov to check if the two gcov files are synchronized. Regenerated the test files so they contain the checksum. Also added negative test to ensure error when the checksums don't match. llvm-svn: 195191
* llvm-cov.test: Remove XFAIL:arm. Seems this is passing since my tweaks.NAKAMURA Takumi2013-11-141-1/+1
| | | | llvm-svn: 194712
* llvm-cov.test: Tweak win32 hosts not confused by \r\n in llvm-cov's stdout.NAKAMURA Takumi2013-11-141-1/+1
| | | | | | "diff -b" -- Ignore space changes. llvm-svn: 194694
* Suppress llvm-cov.test on Win32, with REQUIRES: shellNAKAMURA Takumi2013-11-141-0/+2
| | | | | | "cd" is unsupported in lit internal runner. llvm-svn: 194652
* llvm-cov: Replaced asserts with proper error handling.Yuchen Wu2013-11-141-1/+5
| | | | | | | | | | | | | | 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
* llvm-cov: Changed XFAIL targets to be more generic.Yuchen Wu2013-11-131-1/+1
| | | | llvm-svn: 194622
* Added basic unit test for llvm-cov.Yuchen Wu2013-11-131-0/+4
| | | | | | | | | | This test compares the output of llvm-cov against a coverage file generated by gcov. Currently, llvm-cov does not work on certain platforms (namely big-endian architectures such as PowerPC, among others). These platforms are marked as XFAIL for now, but will be fixed later. llvm-svn: 194616
* Revert "Added basic unit test for llvm-cov."Yuchen Wu2013-11-121-2/+0
| | | | | | | | | | | This reverts commit r194451. Not sure why the tests are failing on the buildbot. They run fine on my local machine. Could it possibly be because of the endianness of the architectures? The GCNO and GCDA files are little-endian encoded, and llvm-cov expects it to remain that way. Is this a safe assumption? llvm-svn: 194454
* Added basic unit test for llvm-cov.Yuchen Wu2013-11-121-0/+2
| | | | | | | | | This test compares the output of llvm-cov against a coverage file generated by gcov. Since the source file must be in the current directory when reading GCNO files, the test will first cd into the Inputs directory. llvm-svn: 194451
* Revert "Added basic unit test for llvm-cov."Yuchen Wu2013-11-051-2/+0
| | | | | | This reverts commit 9cacd131c22b888303cb88e9a3235b2d7b2f19a1. llvm-svn: 194039
* Added basic unit test for llvm-cov.Yuchen Wu2013-11-051-0/+2
This test compares the output of llvm-cov against a coverage file generated by gcov. llvm-svn: 194038
OpenPOWER on IntegriCloud