juliaci / coverage.jl Goto Github PK
View Code? Open in Web Editor NEWTake Julia code coverage and memory allocation results, do useful things with them
License: MIT License
Take Julia code coverage and memory allocation results, do useful things with them
License: MIT License
This seems to have broken on v0.5
since about December 30th. See this log for details:
ERROR: UndefVarError: with_output_limit not defined
in dump at show.jl:1032
in submit_token at /home/ubuntu/.julia/v0.5/Coverage/src/coveralls.jl:123
in eval at ./boot.jl:265
[inlined code] from ./sysimg.jl:14
in process_options at ./client.jl:222
in _start at ./client.jl:301
Since both coveralls and codecov can co-exist simultaneously. Also, this is the name suggested in https://github.com/coveralls-net/coveralls.net/wiki/CI-Integrations#appveyor
https://github.com/IainNZ/Coverage.jl/blob/master/src/coveralls.jl#L108
Looks like Requests
no longer exports post
.
In working on JuliaLang/julia#7464, I've taken a closer look at how this package scores coverage. I think there's a problem of over-reporting.
Suppose we create the following file:
module Functions
export f1, f2
function f1(a, b)
println(a, " ", b)
end
function f2(a, b)
println(a, " ", a + b)
end
end
Now we run the following test script:
using Functions
f1(3,7)
as julia --code-coverage test.jl
. We get the following coverage file:
- module Functions
-
- export f1, f2
-
- function f1(a, b)
1 println(a, " ", b)
- end
-
- function f2(a, b)
- println(a, " ", a + b)
- end
-
- end
-
As expected, f1 is marked as having run, but f2 is not. IIUC, this package will mark all lines that have a -
in front of them with (javascript) null
, and that is interpreted as not being relevant for coverage. So this "package" would be listed as having 100% coverage, despite the fact that half of the functions aren't tested.
To me it seems that the problem is (unfortunately) much harder, in that you have to parse the difference between lines like end
that definitely shouldn't count against your coverage total vs. genuine lines of code that should have coverage but don't.
The end of the travis testing log for my Metis
package is
Skipped src/metis_h.jl
src/Metis.jl
src/Metis.jl.cov
Skipped src/Metis.jl.cov
ASCIIString "{\"message\":\"Job #11.1\",\"url\":\"https://coveralls.io/jobs/2202142\"}\r\n"
Done. Your build exited with 0.
Unfortunately, in this package all the code defining methods is in src/Metis.jl
. In one way this is an advantage in that I always end up with 100% coverage, but that is based on an incorrect assessment.
Should I split the active code into a separate file?
For 0.6 dep warns thanks
Coverage can't seem to process baremodules. When including a baremodule
in a package when process_folder()
processes the file the following exception is raised:
ERROR: BoundsError: attempt to access 0-element Array{Any,1}
at index [1]
in getindex at ./array.jl:282
in function_body_lines! at /Users/omus/.julia/v0.4/Coverage/src/parser.jl:25
in function_body_lines! at /Users/omus/.julia/v0.4/Coverage/src/parser.jl:33
in anonymous at /Users/omus/.julia/v0.4/Coverage/src/Coverage.jl:153
in open at ./iostream.jl:114
in amend_coverage_from_src! at /Users/omus/.julia/v0.4/Coverage/src/Coverage.jl:147
in process_file at /Users/omus/.julia/v0.4/Coverage/src/Coverage.jl:184
in process_folder at /Users/omus/.julia/v0.4/Coverage/src/Coverage.jl:206
in process_folder at /Users/omus/.julia/v0.4/Coverage/src/Coverage.jl:198
I've managed to reproduce this exception by creating a new repo and adding a baremodule to the main source file.
https://coveralls.io/builds/1752035 has a file called src/dcp.jl.cov
(no other file has a .cov) and I can't seem to figure out why that would be the case specifically with just the dcp.jl file. Would this be a bug, or am I doing something wrong?
I have a situation where I'm calling an external function that returns an int. I know all the values that this external function can return, but I want to make sure my code breaks in case the external function adds another, new return type. So my code looks like this:
ret = somef()
if ret==1
# do something
elseif ret==2
# do something
else
error("This cannot happen with the current version of somef, but might in the future")
end
It would be great if there as a way to mark that line in the else block as "all good that this is not covered", so that it doesn't show up as a red line in the coverage UI.
Hello,
We're creating a new finite element solver for Julia and we're using Travis CI & Coverage.jl + Coveralls.io for testing. We had a problem when we uploaded our code to github and it started to build code via travis, tests went fine but it didn't upload coverage to Coveralls.io. After checking the log file from travis, it seems that Coverage.jl crashed in the Coveralls.process_folder() -function when it was processing greek symbols inside our functions. After replacing all the greek symbols with plain text, coverage started working fine.
Here's a log file from travis:
$ julia -e 'cd(Pkg.dir("JuliaFEM")); Pkg.add("Coverage"); using Coverage;
Coveralls.submit(Coveralls.process_folder())'
INFO: Cloning cache of BinDeps from git://github.com/JuliaLang/BinDeps.jl.git
INFO: Cloning cache of Codecs from git://github.com/dcjones/Codecs.jl.git
INFO: Cloning cache of Compat from git://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of Coverage from git://github.com/IainNZ/Coverage.jl.git
INFO: Cloning cache of Dates from git://github.com/quinnj/Dates.jl.git
INFO: Cloning cache of FactCheck from git://github.com/JuliaLang/FactCheck.jl.git
INFO: Cloning cache of GnuTLS from git://github.com/JuliaWeb/GnuTLS.jl.git
INFO: Cloning cache of HttpCommon from git://github.com/JuliaWeb/HttpCommon.jl.git
INFO: Cloning cache of HttpParser from git://github.com/JuliaWeb/HttpParser.jl.git
INFO: Cloning cache of JSON from git://github.com/JuliaLang/JSON.jl.git
INFO: Cloning cache of JuliaParser from git://github.com/jakebolewski/JuliaParser.jl.git
INFO: Cloning cache of Nettle from git://github.com/staticfloat/Nettle.jl.git
INFO: Cloning cache of Requests from git://github.com/JuliaWeb/Requests.jl.git
INFO: Cloning cache of SHA from git://github.com/staticfloat/SHA.jl.git
INFO: Cloning cache of URIParser from git://github.com/JuliaWeb/URIParser.jl.git
INFO: Installing BinDeps v0.3.12
INFO: Installing Codecs v0.1.4
INFO: Installing Compat v0.4.5
INFO: Installing Coverage v0.0.8
INFO: Installing Dates v0.3.2
INFO: Installing FactCheck v0.2.7
INFO: Installing GnuTLS v0.0.4
INFO: Installing HttpCommon v0.0.12
INFO: Installing HttpParser v0.0.11
INFO: Installing JSON v0.4.3
INFO: Installing JuliaParser v0.6.2
INFO: Installing Nettle v0.1.8
INFO: Installing Requests v0.0.8
INFO: Installing SHA v0.0.4
INFO: Installing URIParser v0.0.5
INFO: Building HttpParser
INFO: Changing Directory to /home/travis/.julia/v0.3/HttpParser
Submodule 'deps/src/http-parser' (https://github.com/joyent/http-parser.git) registered for path
'deps/src/http-parser'
Cloning into 'deps/src/http-parser'...
remote: Counting objects: 1354, done.
remote: Total 1354 (delta 0), reused 0 (delta 0), pack-reused 1354
Receiving objects: 100% (1354/1354), 687.14 KiB | 0 bytes/s, done.
Resolving deltas: 100% (804/804), done.
Checking connectivity... done.
INFO: Changing Directory to /home/travis/.julia/v0.3/HttpParser
INFO: Changing Directory to /home/travis/.julia/v0.3/HttpParser/deps/src
INFO: Attempting to Create directory /home/travis/.julia/v0.3/HttpParser/deps/usr/lib
INFO: Changing Directory to /home/travis/.julia/v0.3/HttpParser/deps/src
make: Entering directory `/home/travis/.julia/v0.3/HttpParser/deps/src/http-parser'
cc -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -fPIC -c http_parser.c -o
libhttp_parser.o
cc -shared -o libhttp_parser.so libhttp_parser.o
make: Leaving directory `/home/travis/.julia/v0.3/HttpParser/deps/src/http-parser'
INFO: Changing Directory to /home/travis/.julia/v0.3/HttpParser/deps/src
INFO: Building Nettle
INFO: Building GnuTLS
INFO: Package database updated
WARNING: This version of the GnuTLS library (2.12.14) is deprecated
and contains known security vulnerabilities. Please upgrade to a
more recent version.
[]
src/JuliaFEM.jl
src/shape_functions.jl
ASCIIString "{\"message\":\"Build processing error.\",\"error\":true,\"url\":\"\"}"
Here's an issue, which we already closed
JuliaFEM/JuliaFEM.jl#3
Is the URL in the README.md to the travis build badge is out of date?
I've tried running CoverageBase on julia since it's failing on the buildbots. When I run Coverage.process_folder("base")
, it runs happily for a while, but then I get this error:
Coverage.process_file: Detecting coverage for base/docs/Docs.jl
ERROR: ParseError("invalid \"import\" statement")
in parse_import at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1150
in anonymous at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1087
in parse_comma_sep at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1158
in parse_imports at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1087
in parse_resword at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1013
in parse_call at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:608
in parse_decl at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:488
in parse_factorh at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:510
in parse_unary at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:544
in parse_rational at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:393
in parse_with_chains at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:191
in parse_term at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:390
in parse_shift at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:387
in parse_with_chains at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:191
in parse_range at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:437
in parse_pipes at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:378
in parse_comparison at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:396
in parse_ineq at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:375
in parse_arrow at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:372
in parse_and at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:369
in parse_cond at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:254
in _parse_atom at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1680
in _parse_atom at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1651
in parse_atom at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1832
in parse_unary_prefix at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:600
in parse_call at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:606
in parse_decl at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:488
in parse_factorh at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:510
in parse_unary at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:544
in parse_rational at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:393
in parse_with_chains at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:191
in parse_term at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:390
in parse_shift at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:387
in parse_with_chains at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:191
in parse_range at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:437
in parse_pipes at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:378
in parse_comparison at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:396
in parse_ineq at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:375
in parse_arrow at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:372
in parse_and at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:369
in parse_cond at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:254
in _parse_arglist at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1249
in parse_arglist at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1272
in parse_call_chain at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:633
in parse_call at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:608
in parse_decl at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:488
in parse_factorh at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:510
in parse_unary at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:544
in parse_rational at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:393
in parse_with_chains at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:191
in parse_term at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:390
in parse_shift at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:387
in parse_with_chains at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:191
in parse_range at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:437
in parse_pipes at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:378
in parse_comparison at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:396
in parse_ineq at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:375
in parse_arrow at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:372
in parse_and at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:369
in parse_cond at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:254
in parse_Nary at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:284
in parse_comma at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:363
in parse_eq at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:353
in parse_Nary at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:315
in parse_resword at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:987
in parse_call at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:608
in parse_decl at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:488
in parse_factorh at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:510
in parse_unary at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:544
in parse_rational at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:393
in parse_with_chains at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:191
in parse_term at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:390
in parse_shift at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:387
in parse_with_chains at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:191
in parse_range at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:437
in parse_pipes at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:378
in parse_comparison at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:396
in parse_ineq at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:375
in parse_arrow at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:372
in parse_and at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:369
in parse_cond at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:254
in parse_Nary at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:284
in parse_comma at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:363
in parse_eq at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:353
in parse_Nary at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:284
in parse_stmts at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:341
in parse at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1877
in parse at /Users/kshyatt/.julia/v0.4/JuliaParser/src/parser.jl:1880
in anonymous at /Users/kshyatt/.julia/v0.4/Coverage/src/Coverage.jl:127
in open at iostream.jl:114
in amend_coverage_from_src! at /Users/kshyatt/.julia/v0.4/Coverage/src/Coverage.jl:123
in process_file at /Users/kshyatt/.julia/v0.4/Coverage/src/Coverage.jl:151
in process_folder at /Users/kshyatt/.julia/v0.4/Coverage/src/Coverage.jl:171
in process_folder at /Users/kshyatt/.julia/v0.4/Coverage/src/Coverage.jl:177
in process_options at ./client.jl:284
in _start at ./client.jl:411
It's dying here. The fact that this only happens for base/docs/Docs.jl
whether we ran the inlined or non-inlined tests is really weird. Anyone have any ideas?
I found this problem using Travis and Coveralls:
ERROR: LoadError: LoadError: __precompile__(true) but require failed to create a precompiled cache file
in require at ./loading.jl:219
in include at ./boot.jl:259
in include_from_node1 at ./loading.jl:271
in include at ./boot.jl:259
in include_from_node1 at ./loading.jl:271
in require at ./loading.jl:210
in process_options at ./client.jl:284
in _start at ./client.jl:411
while loading /home/travis/.julia/v0.4/Coverage/src/coveralls.jl, in expression starting on line 5
while loading /home/travis/.julia/v0.4/Coverage/src/Coverage.jl, in expression starting on line 185
Relevant location: https://coveralls.io/builds/14165929/source?filename=src%2Faccumulator.jl#L29
(I realize that this package isn't really maintained well right now, but in case I get some time or someone has an itch to scratch...)
Result of submission:
Array{UInt8}((69,)) UInt8[0x7b,0x22,0x6d,0x65,0x73,0x73,0x61,0x67,0x65,0x22 โฆ 0x31,0x36,0x33,0x32,0x36,0x36,0x39,0x39,0x22,0x7d]
WARNING: submit_token is deprecated, use submit_local instead.
in depwarn(::String, ::Symbol) at ./deprecated.jl:64
in submit_token(::Array{Coverage.FileCoverage,1}, ::Vararg{Any,N}) at ./deprecated.jl:30
in eval(::Module, ::Any) at ./boot.jl:234
in process_options(::Base.JLOptions) at ./client.jl:239
in _start() at ./client.jl:318
while loading no file, in expression starting on line 0
ERROR: MethodError: no method matching submit_local(::Array{Coverage.FileCoverage,1}, ::String, ::String)
Closest candidates are:
submit_local(::Array{Coverage.FileCoverage,1}; kwargs...)
in submit_token(::Array{Coverage.FileCoverage,1}, ::Vararg{Any,N}) at ./deprecated.jl:32
in eval(::Module, ::Any) at ./boot.jl:234
in process_options(::Base.JLOptions) at ./client.jl:239
in _start() at ./client.jl:318
program finished with exit code 1
Hi
The following function call (from SimJulia) shows up in coverage as not covered but it is called several times both with and without a specific "filter" function:
function Get{T}(sto::Store{T}, filter::Function=(item::T)->true, priority::Int64=0)
The code in this function is covered without any problem.
References:
There seems to be a problem with submitting coverage results on 0.4 for at least https://github.com/JuliaLang/ODE.jl - I can't tell if it's because we have an outdated format in our .travis.yml
or because something is actually broken, but all our tests pass, and then the build script fails when collecting and submitting coverage results.
You can check out a couple of build logs here and here (there are a few more in the build history of that project).
This is probably an error on our side, because http://pkg.julialang.org/pulse.html doesn't indicate a major breakage (which I would have expected if this was a problem in your end). However, it would still be nice with some assistance in seeing what's the cause :)
Hello,
Is there a way to exclude a file from coverage?
It's a file that generates a bunch of symbols using a macro, and I've tried several ways to make it fall under test coverage but none of them have worked, unfortunately.
In an attempt to configure the soon-to-be released Contour package to be correctly handled by Pkg
, I've added a couple of REQUIRE
files to the repo: JuliaGeometry/Contour.jl#6
However, since installation of testing dependencies rely on using Pkg.test("Contour")
to run the test suite, I can't just do julia --code-coverage test/runtests.jl
as before to run the tests - on the other hand, julia --code-coverage -e 'Pkg.test("Contour")
doesn't seem to generate any coverage files in the folder where I execute it (at least not on my local machine).
Is there a way to somehow tell Pkg.test()
that I want coverage analysis - or, if not, then maybe to tell it that "I'm about to run the tests manually, could you please resolve testing dependencies"?
Ping @StefanKarpinski
I wanted to add coveralls to my package, but it crashes with an error. Happens also to other packages.
See here:
https://travis-ci.org/dirkschumacher/PValueAdjust.jl/jobs/27127738
or
https://travis-ci.org/dcjones/Gadfly.jl/jobs/27072771
ERROR: ArgumentError("UTF16String data must be NULL-terminated")
in UTF16String at utf16.jl:5
in getDefaultTimeZone at /home/travis/.julia/v0.3/ICU/src/ICU.jl:558
in include at boot.jl:244
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at boot.jl:244
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at boot.jl:244
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at boot.jl:244
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at boot.jl:244
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:51
while loading /home/travis/.julia/v0.3/Calendar/src/Calendar.jl, in expression starting on line 75
while loading /home/travis/.julia/v0.3/HttpCommon/src/HttpCommon.jl, in expression starting on line 3
while loading /home/travis/.julia/v0.3/HttpParser/src/HttpParser.jl, in expression starting on line 9
while loading /home/travis/.julia/v0.3/Requests/src/Requests.jl, in expression starting on line 6
while loading /home/travis/.julia/v0.3/Coverage/src/Coverage.jl, in expression starting on line 27
Low priority, but I'm getting this error on appveyor.
ERROR: KeyError: key "TRAVIS_BRANCH" not found
in access_env(::Base.##351#352, ::String) at .\env.jl:14
in #submit#4(::Array{Any,1}, ::Function, ::Array{Coverage.FileCoverage,1}) at C:\Users\appveyor\.julia\v0.5\Coverage\src\codecovio.jl:68
in submit(::Array{Coverage.FileCoverage,1}) at C:\Users\appveyor\.julia\v0.5\Coverage\src\codecovio.jl:68
in eval(::Module, ::Any) at .\boot.jl:234
in process_options(::Base.JLOptions) at .\client.jl:242
in _start() at .\client.jl:321
Command exited with code 1
Any idea why it would think it was on travis?
The appveyor file is https://github.com/invenia/Keras.jl/blob/master/appveyor.yml.
I've noticed this while building on Travis and submitting to Coveralls.io, but it happens also locally.
Invoked line on Travis/locally:
cd(Pkg.dir("LARLIB")); using Coverage; Coveralls.submit(process_folder())
Log of the error:
Coverage.process_folder: Searching src for .jl files...
Coverage.process_file: Detecting coverage for src/dimension_travel.jl
Coverage.process_folder: Skipping dimension_travel.jl.2078.cov, not a .jl file
Coverage.process_file: Detecting coverage for src/interface.jl
Coverage.process_folder: Skipping interface.jl.2078.cov, not a .jl file
Coverage.process_file: Detecting coverage for src/largrid.jl
Coverage.process_folder: Skipping largrid.jl.2078.cov, not a .jl file
Coverage.process_file: Detecting coverage for src/LARLIB.jl
Coverage.process_cov: Coverage file(s) for src/LARLIB.jl do not exist.
Assuming file has no coverage.
Coverage.process_file: Detecting coverage for src/mapper.jl
Coverage.process_folder: Skipping mapper.jl.2078.cov, not a .jl file
Coverage.process_file: Detecting coverage for src/minimal_cycles.jl
Coverage.process_folder: Skipping minimal_cycles.jl.2078.cov, not a .jl file
Coverage.process_file: Detecting coverage for src/planar_arrangement.jl
Coverage.process_folder: Skipping planar_arrangement.jl.2078.cov, not a .jl file
Coverage.process_file: Detecting coverage for src/simplexn.jl
Coverage.process_cov: Coverage file(s) for src/simplexn.jl do not exist.
Assuming file has no coverage.
ERROR: ParseError("extra token \"s\" after end of expression")
Stacktrace:
[1] #parse#236(::Bool, ::Bool, ::Function, ::String, ::Int64) at ./parse.jl:222
[2] (::Base.#kw##parse)(::Array{Any,1}, ::Base.#parse, ::String, ::Int64) at ./<missing>:0
[3] #parse#88(::Bool, ::Bool, ::Function, ::IOStream) at ./markdown/Julia/interp.jl:5
[4] (::Coverage.##10#12{Array{Union{Int64, Void},1},Array{Int64,1}})(::IOStream) at /home/travis/.julia/v0.6/Coverage/src/Coverage.jl:153
[5] open(::Coverage.##10#12{Array{Union{Int64, Void},1},Array{Int64,1}}, ::String) at ./iostream.jl:152
[6] amend_coverage_from_src!(::Array{Union{Int64, Void},1}, ::String) at /home/travis/.julia/v0.6/Coverage/src/Coverage.jl:149
[7] process_file(::String, ::String) at /home/travis/.julia/v0.6/Coverage/src/Coverage.jl:186
[8] process_folder(::String) at /home/travis/.julia/v0.6/Coverage/src/Coverage.jl:208
[9] process_folder() at /home/travis/.julia/v0.6/Coverage/src/Coverage.jl:200
Error on Travis (same):
https://travis-ci.org/cvdlab/LARLIB.jl/builds/409758726#L627
Julia source of the project is here:
https://github.com/cvdlab/LARLIB.jl
Julia 0.6 (Linux/MacOS)
Coverage 0.6.0
Hi,
With the new Coverage release, the coverage for Convex.jl seems to have gone down from 92% to 57%
Looking at https://coveralls.io/builds/1700000 and comparing it to https://coveralls.io/builds/1707677 (both are the same commit on different branches- the former was using the previous version of Coverage), it seems like the number of files covered also went down from 31 to 8.
Would this be a Coverage.jl bug? Thanks!
Coveralls.submit
seems tied to travis, e.g., it depends on ENV["TRAVIS_JOB_ID"]
. What would need to be done to let this be run locally?
Is there a way to vizualize MallocInfo results with LCOV ?
Thanks !
I'm not getting Coveralls reports for Images anymore, but I still get them for HDF5. I don't think this is a settings issue with Coveralls/Travis/etc, though of course it could be. On a lark: could it be a Unicode issue?
tim@diva:~/.julia/v0.3/HDF5/src$ enca -L none plain.jl
7bit ASCII characters
tim@diva:~/.julia/v0.3/HDF5/src$ enca -L none *
blosc_filter.jl: 7bit ASCII characters
datafile.jl: 7bit ASCII characters
HDF5.jl: 7bit ASCII characters
JLD00.jl: 7bit ASCII characters
JLD.jl: 7bit ASCII characters
jld_types.jl: 7bit ASCII characters
plain.jl: 7bit ASCII characters
By contrast:
tim@diva:~/.julia/v0.3/Images/src$ enca -L none *
algorithms.jl: Universal transformation format 8 bits; UTF-8 # Unicode
colortypes.jl: Unrecognized encoding
enca: Cannot read file 'compatibility': Is a directory
connected.jl: 7bit ASCII characters
core.jl: 7bit ASCII characters
edge.jl: Universal transformation format 8 bits; UTF-8 # Unicode
enca: Cannot read file 'gen': Is a directory
Images.jl: 7bit ASCII characters
enca: Cannot read file 'ioformats': Is a directory
io.jl: 7bit ASCII characters
jlimage.c: 7bit ASCII characters
labeledarrays.jl: 7bit ASCII characters
map.jl: 7bit ASCII characters
overlays.jl: 7bit ASCII characters
I have a Julia repository that builds with Julia 0.5- (current master). The self-test succeeds, but no information is uploaded to Codecov.io.
This is my .travis.yml
:
# Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia
os:
- linux
- osx
julia:
- nightly
notifications:
email: false
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("SIMD"); Pkg.test("SIMD"; coverage=true)'
after_success:
- julia -e 'cd(Pkg.dir("SIMD")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
I see this error:
Coverage.MallocInfo[]
Coverage.process_folder: Searching src for .jl files...
Coverage.process_file: Detecting coverage for src/SIMD_bits.jl
Coverage.process_cov: Coverage file(s) for src/SIMD_bits.jl do not exist.
Assuming file has no coverage.
Coverage.process_file: Detecting coverage for src/SIMD.jl
Coverage.process_folder: Skipping SIMD.jl.1878.cov, not a .jl file
Codecov.io API URL:
https://codecov.io/upload/v2?service=travis-org&branch=master&commit=03c1e0c747fae477d6dd7a30469c65fbb033fe85&build=4.1&pull_request=false&job=104298659&slug=eschnett/SIMD.jl
ERROR: MethodError: `wait_readnb` has no method matching wait_readnb(::TCPSocket, ::UInt64)
Closest candidates are:
wait_readnb(::Base.LibuvStream, !Matched::Int64)
in readbytes! at ./stream.jl:898
in f_recv at /home/travis/.julia/v0.5/MbedTLS/src/ssl.jl:102
[inlined code] from /home/travis/.julia/v0.5/MbedTLS/src/error.jl:3
in handshake at /home/travis/.julia/v0.5/MbedTLS/src/ssl.jl:129
in open_stream at /home/travis/.julia/v0.5/Requests/src/streaming.jl:208
in do_stream_request at /home/travis/.julia/v0.5/Requests/src/Requests.jl:339
in do_request at /home/travis/.julia/v0.5/Requests/src/Requests.jl:279
[inlined code] from /home/travis/.julia/v0.5/Requests/src/Requests.jl:279
in post at /home/travis/.julia/v0.5/Requests/src/Requests.jl:400
in submit at /home/travis/.julia/v0.5/Coverage/src/codecovio.jl:66
in eval at ./boot.jl:265
[inlined code] from ./sysimg.jl:14
in process_options at ./client.jl:222
in _start at ./client.jl:301
travis_time:end:2113a31f:start=1453563651676758247,finish=1453563765846776707,duration=114170018460
e.g. https://coveralls.io/jobs/4081886 's SimJulia.jl
So the file is exectued, so a coverage file is generated, but there are no coverable lines, so its going to weigh down the coverage (maybe? not sure how the overall figure is generated)
I found that code wrapped with @parallel
macro is not covered. Is that an issue with all macros?
I would submit a PR if I knew exactly what the intended use was, but this https://github.com/IainNZ/Coverage.jl/blob/master/src/memalloc.jl#L58 caught me when I was trying to write a coverage command line script.
Currently there's quite a bit of output to STDOUT even when everything is successful. Would you accept a PR adding a verbose
flag to process_folder
and clean_folder
that defaults to false
? The behavior would be that if verbose=false
, it only prints output when something unexpected happens.
Codecov is showing missing coverage for few lines but the next executed line has coverage.
https://codecov.io/gh/JuliaGraphs/LightGraphs.jl/compare/da7e055a3173859a294e657be9ac85e10f3a5087...d7ee43a28459f3a6533116a5905d8dd5c44fcd0c/diff
using Coverage
covered, tot = coverage_folder()
results in
ERROR: coverage_folder not defined
I can't find any reference to this function in Coverage.
Julia Version 0.4.0-dev+2529
Commit 322cf26 (2015-01-06 17:18 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin14.0.0)
CPU: Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
julia> Pkg.installed("Coverage")
v"0.0.4"
PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.3) and the nightly build of the unstable version (0.4). The results of this script are used to generate a package listing enhanced with testing results.
Tests pass.
Tests fail, but package loads.
Tests pass.
means that PackageEvaluator found the tests for your package, executed them, and they all passed.
Tests fail, but package loads.
means that PackageEvaluator found the tests for your package, executed them, and they didn't pass. However, trying to load your package with using
worked.
This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.
Test log:
>>> 'Pkg.add("Coverage")' log
WARNING: deprecated syntax "[a=>b, ...]" at /home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/build.jl:42.
Use "Dict(a=>b, ...)" instead.
Submodule 'deps/src/http-parser' (https://github.com/joyent/http-parser.git) registered for path 'deps/src/http-parser'
Cloning into 'deps/src/http-parser'...
Submodule path 'deps/src/http-parser': checked out '80819384450b5511a3d1c424dd92a5843c891364'
make: Entering directory '/home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/src/http-parser'
cc -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -fPIC -c http_parser.c -o libhttp_parser.o
cc -shared -o libhttp_parser.so libhttp_parser.o
make: Leaving directory '/home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/src/http-parser'
WARNING: deprecated syntax "{a=>b, ...}" at /home/idunning/pkgtest/.julia/v0.4/Nettle/deps/build.jl:25.
Use "Dict{Any,Any}(a=>b, ...)" instead.
WARNING: deprecated syntax "[a=>b, ...]" at /home/idunning/pkgtest/.julia/v0.4/Nettle/deps/build.jl:38.
Use "Dict(a=>b, ...)" instead.
WARNING: deprecated syntax "{a=>b, ...}" at /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/build.jl:15.
Use "Dict{Any,Any}(a=>b, ...)" instead.
WARNING: deprecated syntax "{a=>b, ...}" at /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/build.jl:48.
Use "Dict{Any,Any}(a=>b, ...)" instead.
WARNING: deprecated syntax "{a=>b, ...}" at /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/build.jl:53.
Use "Dict{Any,Any}(a=>b, ...)" instead.
WARNING: deprecated syntax "[a=>b, ...]" at /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/build.jl:55.
Use "Dict(a=>b, ...)" instead.
INFO: Installing BinDeps v0.3.7
INFO: Installing Codecs v0.1.3
INFO: Installing Compat v0.2.11
INFO: Installing Coverage v0.0.7
INFO: Installing Dates v0.4.4
INFO: Installing FactCheck v0.2.5
INFO: Installing GnuTLS v0.0.1
INFO: Installing HttpCommon v0.0.11
INFO: Installing HttpParser v0.0.10
INFO: Installing JSON v0.4.0
INFO: Installing JuliaParser v0.6.2
INFO: Installing Nettle v0.1.7
INFO: Installing Requests v0.0.6
INFO: Installing SHA v0.0.3
INFO: Installing URIParser v0.0.3
INFO: Building HttpParser
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/HttpParser
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/HttpParser
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/src
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/usr/lib
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/src
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/src
INFO: Building Nettle
INFO: Building GnuTLS
INFO: Package database updated
>>> 'using Coverage' log
WARNING: deprecated syntax "(String=>String)[a=>b, ...]" at /home/idunning/pkgtest/.julia/v0.4/Requests/src/Requests.jl:34.
Use "Dict{String,String}(a=>b, ...)" instead.
WARNING: deprecated syntax "{a=>b, ...}" at /home/idunning/pkgtest/.julia/v0.4/GnuTLS/src/errormap.jl:155.
Use "Dict{Any,Any}(a=>b, ...)" instead.
Julia Version 0.4.0-dev+3225
Commit 6558327 (2015-02-09 04:52 UTC)
Platform Info:
System: Linux (x86_64-unknown-linux-gnu)
CPU: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
Coverage.MallocInfo[]
WARNING: Set(a,b...) is deprecated, use Set(Any[a,b...]) instead.
in depwarn at ./deprecated.jl:40
in call at deprecated.jl:29
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:54
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:54
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:54
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:52
in include at ./boot.jl:249
in include_from_node1 at loading.jl:128
in process_options at ./client.jl:319
in _start at ./client.jl:403
>>> test log
WARNING: deprecated syntax "(String=>String)[a=>b, ...]" at /home/idunning/pkgtest/.julia/v0.4/Requests/src/Requests.jl:34.
Use "Dict{String,String}(a=>b, ...)" instead.
WARNING: deprecated syntax "{a=>b, ...}" at /home/idunning/pkgtest/.julia/v0.4/GnuTLS/src/errormap.jl:155.
Use "Dict{Any,Any}(a=>b, ...)" instead.
WARNING: Set(a,b...) is deprecated, use Set(Any[a,b...]) instead.
in depwarn at ./deprecated.jl:40
in call at deprecated.jl:29
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:54
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:54
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:54
in include at ./boot.jl:249
in include_from_node1 at ./loading.jl:128
in reload_path at ./loading.jl:152
in _require at ./loading.jl:67
in require at ./loading.jl:52
in include at ./boot.jl:249
in include_from_node1 at loading.jl:128
in process_options at ./client.jl:319
in _start at ./client.jl:403
ERROR: LoadError: UndefVarError: isfuncexpr not defined
in function_body_lines! at /home/idunning/pkgtest/.julia/v0.4/Coverage/src/Coverage.jl:99
in anonymous at /home/idunning/pkgtest/.julia/v0.4/Coverage/src/Coverage.jl:51
in open at ./iostream.jl:137
in amend_coverage_from_src! at /home/idunning/pkgtest/.julia/v0.4/Coverage/src/Coverage.jl:45
in process_file at /home/idunning/pkgtest/.julia/v0.4/Coverage/src/Coverage.jl:125
in anonymous at /home/idunning/pkgtest/.julia/v0.4/Coverage/test/runtests.jl:10
in cd at ./file.jl:20
in include at ./boot.jl:249
in include_from_node1 at loading.jl:128
in process_options at ./client.jl:319
in _start at ./client.jl:403
while loading /home/idunning/pkgtest/.julia/v0.4/Coverage/test/runtests.jl, in expression starting on line 9
Coverage.MallocInfo[]
INFO: Computing test dependencies for Coverage...
INFO: Installing Docile v0.4.1
INFO: Testing Coverage
==============================[ ERROR: Coverage ]===============================
failed process: Process(`/home/idunning/julia04/usr/bin/julia --check-bounds=yes --code-coverage=none --color=no /home/idunning/pkgtest/.julia/v0.4/Coverage/test/runtests.jl`, ProcessExited(1)) [1]
================================================================================
INFO: Removing Docile v0.4.1
ERROR: Coverage had test errors
in error at error.jl:19
in test at pkg/entry.jl:717
in anonymous at pkg/dir.jl:28
in cd at file.jl:20
in cd at pkg/dir.jl:28
in test at pkg.jl:69
in process_options at ./client.jl:241
in _start at ./client.jl:403
>>> end of log
e.g.
This file:
https://github.com/JuliaOpt/JuMP.jl/blob/master/src/print.jl
is the issue in JuMP's case.
@loladiro @staticfloat @cdsousa
Still trying to figure out why, about to start chopping the file to pieces to see if I can isolate it
The Codecov submit function only works from within Travis CI. I found the note below while getting the Repository Upload Token on Codecov:
Note: Token not required for public repositories uploading from Travis, CircleCI or AppVeyor.
From this comment and from inspecting the codecov-bash source it should definitely be possible to support Appveyor. The relevant Appveyor environmental variables can be found here
PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.3) and the nightly build of the unstable version (0.4). The results of this script are used to generate a package listing enhanced with testing results.
Tests pass.
Package doesn't load.
Tests pass.
means that PackageEvaluator found the tests for your package, executed them, and they all passed.
Package doesn't load.
means that PackageEvaluator did not find tests for your package. Additionally, trying to load your package with using
failed.
This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.
Test log:
>>> 'Pkg.add("Coverage")' log
Submodule 'deps/src/http-parser' (https://github.com/joyent/http-parser.git) registered for path 'deps/src/http-parser'
Cloning into 'deps/src/http-parser'...
Submodule path 'deps/src/http-parser': checked out '80819384450b5511a3d1c424dd92a5843c891364'
make: Entering directory '/home/idunning/pkgtest/.julia/v0.3/HttpParser/deps/src/http-parser'
cc -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -fPIC -c http_parser.c -o libhttp_parser.o
cc -shared -o libhttp_parser.so libhttp_parser.o
make: Leaving directory '/home/idunning/pkgtest/.julia/v0.3/HttpParser/deps/src/http-parser'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 1522k 0 9632 0 0 16388 0 0:01:35 --:--:-- 0:01:35 16380
21 1522k 21 320k 0 0 204k 0 0:00:07 0:00:01 0:00:06 204k
85 1522k 85 1306k 0 0 510k 0 0:00:02 0:00:02 --:--:-- 509k
100 1522k 100 1522k 0 0 569k 0 0:00:02 0:00:02 --:--:-- 569k
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for -R flag... using -Wl,-rpath,
Searching for libraries
checking /home/idunning/pkgtest/.julia/v0.3/Nettle/deps/usr/lib... not found
checking /usr/local/lib... added
checking /sw/local/lib... not found
checking /sw/lib... not found
checking /usr/gnu/lib... not found
checking /opt/gnu/lib... not found
... truncated ...
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/builds/nettle
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/builds/nettle
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/builds/nettle
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/builds/nettle
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/downloads
INFO: Directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/downloads already created
INFO: Downloading file ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.14.tar.xz
INFO: Done downloading file ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.14.tar.xz
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/src
INFO: Directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/src already created
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps
INFO: Directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps already created
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/src/gnutls-3.2.14
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/builds/gnutls
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/builds/gnutls
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/builds/gnutls
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.3/GnuTLS/deps/builds/gnutls
================================[ BUILD ERRORS ]================================
WARNING: ICU had build errors.
- packages with build errors remain installed in /home/idunning/pkgtest/.julia/v0.3
- build a package and all its dependencies with `Pkg.build(pkg)`
- build a single package by running its `deps/build.jl` script
================================================================================
INFO: Package database updated
INFO: METADATA is out-of-date a you may not have the latest version of Coverage
INFO: Use `Pkg.update()` to get the latest versions of your packages
>>> 'using Coverage' log
ERROR: could not open file /home/idunning/pkgtest/.julia/v0.3/ICU/src/../deps/deps.jl
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:51
in include at ./boot.jl:245
in include_from_node1 at loading.jl:128
in process_options at ./client.jl:285
in _start at ./client.jl:354
in _start_3B_1699 at /home/idunning/julia03/usr/bin/../lib/julia/sys.so
while loading /home/idunning/pkgtest/.julia/v0.3/ICU/src/ICU.jl, in expression starting on line 54
while loading /home/idunning/pkgtest/.julia/v0.3/Calendar/src/Calendar.jl, in expression starting on line 1
while loading /home/idunning/pkgtest/.julia/v0.3/HttpCommon/src/HttpCommon.jl, in expression starting on line 3
while loading /home/idunning/pkgtest/.julia/v0.3/HttpParser/src/HttpParser.jl, in expression starting on line 9
while loading /home/idunning/pkgtest/.julia/v0.3/Requests/src/Requests.jl, in expression starting on line 6
while loading /home/idunning/pkgtest/.julia/v0.3/Coverage/src/Coverage.jl, in expression starting on line 27
while loading /home/idunning/pkgtest/.julia/v0.3/Coverage/testusing.jl, in expression starting on line 1
>>> test log
no tests to run
>>> end of log
I'm trying to set up code coverage with my MatpowerCases.jl package. I can't get Coveralls to report code coverage; it says it cannot find coverage data. I suspect this problem is related to an error I get when I try to use Coverage locally.
The README instructions worked well for me until I ran covered_lines, total_lines = coverage_folder()
. This was the output:
src/MatpowerCases.jl
Skipped src/MatpowerCases.jl
src/MatpowerCases.jl.cov
Skipped src/MatpowerCases.jl.cov
0-element Array{Any,1}
So Coverage skipped the only .cov
file in src/
. But when I use covered_lines,total_lines = coverage_file("src/MatpowerCases.jl")
, I get this:
(11,13)
which matches visual inspection of the MatpowerCases.jl.cov
file in src/
.
I went digging in the code and found that my .cov
file is being skipped because this line throws an error, so I ran it in a REPL and got this:
julia> new_sf = Coveralls.process_file("src/MatpowerCases.jl.cov","src")
ERROR: `convert` has no method matching convert(::Type{Int64}, ::Nothing)
in setindex! at array.jl:307
in merge_coverage_counts at /home/jkersulis/.julia/v0.3/Coverage/src/Coverage.jl:22
in process_cov_with_pids at /home/jkersulis/.julia/v0.3/Coverage/src/Coverage.jl:83
in process_file at /home/jkersulis/.julia/v0.3/Coverage/src/Coverage.jl:194
So it traces back to this function. Why is my package having this problem?
Using Coverage.jl, my repository has some false missing lines such as end
and comments.
see https://codecov.io/gh/mistguy/Hop.jl/src/8f204ade24270ee1b32a794a94b2078b35cb9a97/src/Hop.jl
I tried to report the issue in Coveralls, but it seems no one is listening there: lemurheavy/coveralls-public#906
What can be done to get this coverage working again? I didn't modify any configuration regarding tests/coverage, it just stopped working.
As a side question, am I correct to say Codecov is offering a better service? I am considering migrating to it.
I previously used Coverage.jl in Bitbucket pipelines without any issues. With the newest update to LibGit2, I am getting an error. I have a private Docker container with all my dependencies. The build script looks like:
# Bitbucket portions
umask 000
git clone --branch="master" --depth 50 https://x-token-auth:[email protected]/MYREPO.jl.git $BUILD_DIR ; git reset --hard ### ; git remote set-url origin [email protected]:MYREPO.git
chmod 777 $BUILD_DIR
# my commands, worked previously
mkdir ~/.julia/v0.6/MYPKG && cp -r ./ ~/.julia/v0.6/MYPKG
julia -e 'Pkg.clone(pwd()); Pkg.build("MYPKG"); Pkg.test("MYPKG"; coverage=true)'
julia -e 'cd(Pkg.dir("MYPKG")); using Coverage; Codecov.submit_local(Codecov.process_folder())'
The testing and file coverage generation goes fine. Where previously it would submit the report, I now get:
ERROR: GitError(Code:ENOTFOUND, Class:Repository, Could not find repository from '/root/.julia/v0.6/MYPKG/..')
Stacktrace:
[1] macro expansion at ./libgit2/error.jl:99 [inlined]
[2] Base.LibGit2.GitRepo(::String) at ./libgit2/repository.jl:10
[3] #submit_local#11(::Array{Any,1}, ::Function, ::Array{Coverage.FileCoverage,1}, ::String) at /root/.julia/v0.6/Coverage/src/codecovio.jl:170
[4] submit_local(::Array{Coverage.FileCoverage,1}) at /root/.julia/v0.6/Coverage/src/codecovio.jl:170
I will investigate this and update if I can find a way to set up the build script in a way that works. Any hints or help is appreciated.
One of my code repos recently stopped submitting reports to Coveralls. I checked out the Travis build, and after passing tests it skips all of the files, assumes they have no coverage, and then fails with a ParseError:
ERROR: ParseError("unexpected end")
in __parse#26__ at ./parse.jl:180
in parse at markdown/Julia/interp.jl:5
in anonymous at /home/travis/.julia/v0.4/Coverage/src/Coverage.jl:149
in open at iostream.jl:114
in amend_coverage_from_src! at /home/travis/.julia/v0.4/Coverage/src/Coverage.jl:145
in process_file at /home/travis/.julia/v0.4/Coverage/src/Coverage.jl:182
in process_folder at /home/travis/.julia/v0.4/Coverage/src/Coverage.jl:204
in process_folder at /home/travis/.julia/v0.4/Coverage/src/Coverage.jl:210
in process_folder at /home/travis/.julia/v0.4/Coverage/src/Coverage.jl:196
in process_options at ./client.jl:257
in _start at ./client.jl:378
I could very well be screwing up something on my end. Any chance you know what the cause is?
My Travis build is here.
I'm getting this warning here: https://travis-ci.org/diegozea/PairwiseListMatrices.jl/jobs/80517859#L831
https://travis-ci.org/IainNZ/Coverage.jl/jobs/69546905
Response
status: Int64 400
headers: Dict{String,String} len 15
Connection: ASCIIString "keep-alive"
Via: ASCIIString "1.1 vegur"
Date: ASCIIString "Sat, 04 Jul 2015 15:16:01 GMT"
Access-Control-Allow-Origin: ASCIIString "*"
http_minor: ASCIIString "1"
Keep-Alive: ASCIIString "1"
status_code: ASCIIString "400"
X-Request-Id: ASCIIString "50894325-25a6-4525-a8c5-89e4bc774b17"
Server: ASCIIString "Cowboy"
Content-Length: ASCIIString "42"
Vary: ASCIIString "Accept-Encoding"
...
data: ASCIIString "template not found at html/errors/400.html"
finished: Bool true
Looks like the error message is screwed so its hard to know what went wrong.
PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their tests (if available) on both the stable version of Julia (0.3) and the nightly build of the unstable version (0.4). The results of this script are used to generate a package listing enhanced with testing results.
Tests pass.
Package doesn't load.
Tests pass.
means that PackageEvaluator found the tests for your package, executed them, and they all passed.
Package doesn't load.
means that PackageEvaluator did not find tests for your package. Additionally, trying to load your package with using
failed.
This issue was filed because your testing status became worse. No additional issues will be filed if your package remains in this state, and no issue will be filed if it improves. If you'd like to opt-out of these status-change messages, reply to this message saying you'd like to and @IainNZ will add an exception. If you'd like to discuss PackageEvaluator.jl please file an issue at the repository. For example, your package may be untestable on the test machine due to a dependency - an exception can be added.
Test log:
>>> 'Pkg.add("Coverage")' log
Submodule 'deps/src/http-parser' (https://github.com/joyent/http-parser.git) registered for path 'deps/src/http-parser'
Cloning into 'deps/src/http-parser'...
Submodule path 'deps/src/http-parser': checked out '80819384450b5511a3d1c424dd92a5843c891364'
make: Entering directory '/home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/src/http-parser'
cc -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -fPIC -c http_parser.c -o libhttp_parser.o
cc -shared -o libhttp_parser.so libhttp_parser.o
make: Leaving directory '/home/idunning/pkgtest/.julia/v0.4/HttpParser/deps/src/http-parser'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
6 1522k 6 98208 0 0 104k 0 0:00:14 --:--:-- 0:00:14 104k
32 1522k 32 499k 0 0 265k 0 0:00:05 0:00:01 0:00:04 265k
100 1522k 100 1522k 0 0 538k 0 0:00:02 0:00:02 --:--:-- 538k
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for -R flag... using -Wl,-rpath,
Searching for libraries
checking /home/idunning/pkgtest/.julia/v0.4/Nettle/deps/usr/lib... not found
checking /usr/local/lib... added
checking /sw/local/lib... not found
checking /sw/lib... not found
checking /usr/gnu/lib... not found
checking /opt/gnu/lib... not found
... truncated ...
INFO: Directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps already created
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/src/nettle-2.7
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/builds/nettle
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/builds/nettle
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/builds/nettle
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/builds/nettle
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/downloads
INFO: Directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/downloads already created
INFO: Downloading file ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.14.tar.xz
INFO: Done downloading file ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.14.tar.xz
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/src
INFO: Directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/src already created
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps
INFO: Directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps already created
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/src/gnutls-3.2.14
INFO: Attempting to Create directory /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/builds/gnutls
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/builds/gnutls
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/builds/gnutls
INFO: Changing Directory to /home/idunning/pkgtest/.julia/v0.4/GnuTLS/deps/builds/gnutls
================================[ BUILD ERRORS ]================================
WARNING: ICU had build errors.
- packages with build errors remain installed in /home/idunning/pkgtest/.julia/v0.4
- build a package and all its dependencies with `Pkg.build(pkg)`
- build a single package by running its `deps/build.jl` script
================================================================================
INFO: Package database updated
>>> 'using Coverage' log
ERROR: could not open file /home/idunning/pkgtest/.julia/v0.4/ICU/src/../deps/deps.jl
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:54
in include at ./boot.jl:245
in include_from_node1 at ./loading.jl:128
in reload_path at loading.jl:152
in _require at loading.jl:67
in require at loading.jl:51
in include at ./boot.jl:245
in include_from_node1 at loading.jl:128
in process_options at ./client.jl:285
in _start at ./client.jl:354
in _start_3B_3500 at /home/idunning/julia04/usr/bin/../lib/julia/sys.so
while loading /home/idunning/pkgtest/.julia/v0.4/ICU/src/ICU.jl, in expression starting on line 54
while loading /home/idunning/pkgtest/.julia/v0.4/Calendar/src/Calendar.jl, in expression starting on line 1
while loading /home/idunning/pkgtest/.julia/v0.4/HttpCommon/src/HttpCommon.jl, in expression starting on line 3
while loading /home/idunning/pkgtest/.julia/v0.4/HttpParser/src/HttpParser.jl, in expression starting on line 9
while loading /home/idunning/pkgtest/.julia/v0.4/Requests/src/Requests.jl, in expression starting on line 6
while loading /home/idunning/pkgtest/.julia/v0.4/Coverage/src/Coverage.jl, in expression starting on line 27
while loading /home/idunning/pkgtest/.julia/v0.4/Coverage/testusing.jl, in expression starting on line 1
>>> test log
no tests to run
>>> end of log
Would require more involved parsing of the coverage report to pick out all method definitions to adjust the coverage stats appropriately.
API looks pretty similar to Coveralls, so should be easy enough.
From a travis build here:
ERROR: nowutc not defined
in process_response at /home/travis/.julia/v0.4/Requests/src/Requests.jl:225
in send_multipart at /home/travis/.julia/v0.4/Requests/src/Requests.jl:515
in do_request at /home/travis/.julia/v0.4/Requests/src/Requests.jl:560
in post at /home/travis/.julia/v0.4/Requests/src/Requests.jl:577
in submit at /home/travis/.julia/v0.4/Coverage/src/Coverage.jl:100
in process_options at ./client.jl:213
in _start at ./client.jl:354
in _start_3B_3603 at /usr/bin/../lib/x86_64-linux-gnu/julia/sys.so
It's unclear to me exactly where this error is coming from, as none of the lines indicated have a nowutc
. This might actually belong in julia Base, but I thought I'd start here, since it happened during Coverage testing.
Cc: @quinnj
Something different about how Base.parse works, perhaps
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.