With the latest Xcode we can now view code coverage of local builds or integrations. I want to export the coverage results to build some analysis of this data.
The project https://github.com/jonreid/XcodeCoverage seems like a simple way to export the report data into xml or html which I can use to build something else. But I am having some difficulty.
The setup is fairly simple.
pull from the repository.
add the XcodeCovearage in my project.
ad a build phase script to run exporting.sh
Run my tests.
execute getcov to view the data.
When I run getcov I get the following output:
~/Library/Developer/Xcode/DerivedData/Garage-emxrmloetsurmcgqiahicyecarix/Build/Intermediates/CodeCoverage/Garage/Products/Debug-iphonesimulator /Workspace/ios/Garage/XcodeCoverage
/Workspace/ios/Garage/XcodeCoverage
Capturing coverage data from /Users/Seamus/Library/Developer/Xcode/DerivedData/Garage-emxrmloetsurmcgqiahicyecarix/Build/Intermediates/CodeCoverage/Garage/Intermediates/Garage.build/Debug-iphonesimulator/Garage.build/Objects-normal/x86_64
geninfo: Use of uninitialized value $version_string in substitution (s///) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 1914.
geninfo: Use of uninitialized value $version_string in pattern match (m//) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 1917.
geninfo: Use of uninitialized value $version_string in pattern match (m//) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 1930.
geninfo: Use of uninitialized value $gcov_version_string in pattern match (m//) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 3720.
geninfo: Use of uninitialized value $gcov_version_string in pattern match (m//) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 3720.
Scanning /Users/Seamus/Library/Developer/Xcode/DerivedData/Garage-emxrmloetsurmcgqiahicyecarix/Build/Intermediates/CodeCoverage/Garage/Intermediates/Garage.build/Debug-iphonesimulator/Garage.build/Objects-normal/x86_64 for .da files ...
geninfo: WARNING: no .da files found in /Users/Seamus/Library/Developer/Xcode/DerivedData/Garage-emxrmloetsurmcgqiahicyecarix/Build/Intermediates/CodeCoverage/Garage/Intermediates/Garage.build/Debug-iphonesimulator/Garage.build/Objects-normal/x86_64 - skipping!
Finished .info-file creation
Reading tracefile Coverage.info
lcov: ERROR: no valid records found in tracefile Coverage.info
Reading tracefile Coverage.info
lcov: ERROR: no valid records found in tracefile Coverage.info
Reading data file Coverage.info
genhtml: ERROR: no valid records found in trace file Coverage.info
Seems to be missing some information about the version of the lcov or getcov scripts and failing to build coverage.info
Has anybody tried using this with Xcode7
does anybody know any other useful tools to export the coverage data from Xcode?
Thanks,
It is problem of lcov. You just need to update lcov version to 1.12 and replace in code coverag
Related
In Bazel 4.2.2 I could do a "go-to-reference" on a source file to get the path of the corresponding BUILD file, along with the line and column numbers pointing to where the source file is referenced:
bazel query ./main.cpp --output=location
~/project/package/BUILD:124:8: source file //package:main.cpp
In Bazel 5.1.1 this command returns the path of the very same source file:
bazel query ./main.cpp --output=location
~/project/package/main.cpp:1:1: source file //package:main.cpp
How to get the old behavior back?
P.S. This ticket requests the new behavior.
Solution is to use --noincompatible_display_source_file_location:
bazel query ./main.cpp --output=location --noincompatible_display_source_file_location
~/project/package/BUILD:124:8: source file //package:main.cpp
i set up an Jenkins-> robot framework chain where the robot tasks are stimulated by Jenkins.
The example robot tasks (some simple shell scripts) are executed without errors, but Jenkind fails because it is not able to parse some "output.xml" file which has nothing to do with the robot framework tasks.
Error message:
[ ERROR ] Reading XML source '/var/lib/jenkins/workspace/Test/output.xml' failed:ParseError: junk after document element: line 188, column 0
When i investigate the "output.xml" there is indeed an error:
...
rrors>
</errors>
</robot>
This behavior is already known and active and is described in https://issues.jenkins.io/browse/JENKINS-62359?attachmentViewMode=list
in 2020, but the error is still appearing.
Is there a solution or workaround? It is curious that sometimes the build is executing without an error when nothing changed.
I've pulled the most recent drake repo "https://github.com/RobotLocomotion/drake" and I am trying to
$run bazel build //...
but bazel is returning the following error
ERROR: /home/nathan/drake/tools/workspace/os.bzl:73:13: invalid escape sequence: \(. You can enable unknown escape sequences by passing the flag --incompatible_restrict_string_escapes=false ERROR: /home/nathan/drake/tools/workspace/os.bzl:73:19: invalid escape sequence: \|. You can enable unknown escape sequences by passing the flag --incompatible_restrict_string_escapes=false ERROR: /home/nathan/drake/tools/workspace/os.bzl:73:31: invalid escape sequence: \). You can enable unknown escape sequences by passing the flag --incompatible_restrict_string_escapes=false ERROR: error loading package '': in /home/nathan/drake/tools/workspace/default.bzl: in /home/nathan/drake/tools/workspace/blas/repository.bzl: Extension 'tools/workspace/os.bzl' has errors INFO: Elapsed time: 0.139s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded).
It seems to not like line 73 in os.bzl, but I'm not sure how to fix it. Any suggestions would be very helpful.
I've just run a build using those same versions of Bazel, Ubuntu, and Drake, with no problems.
There was a problem on that line several months ago, that we fixed in https://github.com/RobotLocomotion/drake/pull/12696. Can you confirm you're using a new-enough version of Drake? For example, what does git log -1 report?
Having a nightmare including an svg file in my document. It's just a picture of Tux.
Code:
\svgpath{{C:/Users/me/Google\ Drive/foo}}
\includesvg[width = 200pt]{tux}
Error:
** (inkscape.exe:27228): WARNING **: 20:52:43.840: Can't open file: tux.svg (doesn't exist)
** (inkscape.exe:27228): WARNING **: 20:52:43.840: Can't open file: tux.svg (doesn't exist)
** (inkscape.exe:27228): WARNING **: 20:52:43.840: Specified document tux.svg cannot be opened (does not exist or not a valid SVG file)
The system cannot find the file specified.
The system cannot find the file specified.
I wish it would give me more debugging information so I could tell what directory is being used. I've enabled --shell-escape. I've tried various combinations with no success.
EDIT: Minimal example
\documentclass{article}
\usepackage{svg}
\begin{document}
\includesvg{tux}
\end{document}
I created a directory c:\latex
My command line is texify --pdf --engine=luatex --synctex=1 --tex-option=--shell-escape --clean foo
I noticed that it also says there's a log file, but I cannot find a log file with more information
Package svg Warning: The export with Inkscape failed for file
(svg) `tux.svg'
(svg) Troubleshooting: Please check in the log file how
(svg) the invocation of Inkscape took place and try to
(svg) execute it yourself in the terminal on input line 5.
I would love to get my hands on that mythical log file. There's a foo.log file but that just says what my console output was. There's another log file at C:\Users\james\AppData\Local\MiKTeX\2.9\miktex\log\texify.log, but that doesn't have any information about the inkscape command either.
The docs (http://mirror.its.dal.ca/ctan/graphics/svg/doc/svg.pdf) say that I should see runsystem ....
The problem is the --clean option. I figured this out by selected pdflatex in TeXWorks and it suddenly built. Taking out options one by one helped me get to the bottom of this. Going back to post on some other questions.
As #samcarter pointed out, if you don't have to use texify, try not to. One of my packages requires LuaLaTex to typeset, so I selected the LuaLaTeX +MakeIndex +BibTex when I only needed the LuaLaTex plain option. Using that one fixed the issue.
If you have to use texify, though, try removing the --clean.
I downloaded the zbar library and cloned the opencv-zbar repo in my home directory. Then I ran the following command $cmake . which gave my the error
-- Could NOT find ZBAR (missing: ZBAR_LIBRARIES ZBAR_INCLUDE_DIR)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZBAR_LIBRARIES
linked by target "zbar_opencv" in directory /home/surabhi/opencv-zbar
-- Configuring incomplete, errors occurred!
See also "/home/surabhi/opencv-zbar/CMakeFiles/CMakeOutput.log".
I then made two changes in my CMakeCache.txt as follows
//Path to a file.
ZBAR_INCLUDE_DIR:PATH=/usr/include/zbar
//Path to a library.
ZBAR_LIBRARIES:FILEPATH=/usr/lib/libzbar.so
because the were set to NOTFOUND.
It then gave me no errors
-- Found ZBAR: /usr/lib/libzbar.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/surabhi/opencv-zbar
But when I run make
It gives the error:
fatal error: zbar.h: No such file or directory
#include <zbar.h>
^
compilation terminated.
I don't understand why I get this error as It says Found ZBAR when I run cmake.
Thanks in advance
You need to do actually use the include dirs somewhere in your CMakeLists.txt so CMake knows that you actually want to use these include paths.
Examples:
include_directories(${ZBAR_INCLUDE_DIR})
Or the more modern, recommended way:
target_include_directories(zbar_opencv PRIVATE ${ZBAR_INCLUDE_DIR})