objective c - How can I run Gcov over an installed Cocoa application? -


I have a Cocoa app that uses an installer I want to be able to run code coverage on code ( After it has been installed).

This is not a common unit test scenario, where a binary test will run a suit. Rather, the question will interact with the testing UI and the app back-end, while this is going on, so I want to know that GCOV is doing this profiling and then runs a test against it.

Any thoughts?

Update

Why I made this question clear:

The mistake I made was thinking that The object, .gcno and .gcda files were to be installed with binaries (thus making the installer difficult). As soon as the original location of the files is hard-wired in the code, which contains the instrumentation code.

The solution I went with is zipping on the code construction machine and putting it on the test machine on the disk. lcov (or just gcov ) can be run from there. Alternatively, .gcda files will be created on disk and they must be copied back to the machine containing the source code.

Anyhow, the source code should not be present in the install and run time, but if you want to get your results back to the LAKROV-style, then the generated coverage counter file will be mailed to the source code. Should be taken.

The app must compile with the correct GCC flag, which will insert profiling instructions in the code. This is not something you can turn on and off, meaning that your code coverage is modified when compiling time to output information.

Therefore, if you have compiled the app with the correct flag, then this coverage will emit the data, if you have not done it (and you certainly will not want it for such an app. Whom you were going to distribute)


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -