Skip to content

Commit b5b6d7b

Browse files
Liozouc42f
andauthored
Fix nightly CI tests (#810)
* Update test for julia >= v1.6 to reflect change in show(typealias) * Band-aid to fix nightly tests by marking failing allocation test as test_broken * Updated for julia#36962 and julia#37302 * Add version range so we revisit ambiguities in 1.6.0-rc Co-authored-by: Chris Foster <chris42f@gmail.com>
1 parent ad583c9 commit b5b6d7b

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

test/ambiguities.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@ const allowable_ambiguities =
1010
0
1111
end
1212

13-
@test length(detect_ambiguities(Base, LinearAlgebra, StaticArrays)) <= allowable_ambiguities
13+
if v"1.6.0-DEV.816" <= VERSION < v"1.6.0-rc"
14+
# Revisit in 1.6.0-rc1 or before. See
15+
# https://github.com/JuliaLang/julia/pull/36962
16+
# https://github.com/JuliaLang/julia/issues/36951
17+
@test_broken length(detect_ambiguities(#=LinearAlgebra, =#StaticArrays)) <= allowable_ambiguities
18+
else
19+
@test length(detect_ambiguities(Base, LinearAlgebra, StaticArrays)) <= allowable_ambiguities
20+
end

test/core.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
@testset "Type parameter errors" begin
2020
# (not sure what type of exception these should be?)
2121
@test_throws Exception SVector{1.0,Int}((1,))
22-
@test_throws DimensionMismatch("No precise constructor for SArray{Tuple{2},$Int,1,2} found. Length of input was 1.") SVector{2,Int}((1,))
22+
@static if VERSION < v"1.6-"
23+
@test_throws DimensionMismatch("No precise constructor for SArray{Tuple{2},$Int,1,2} found. Length of input was 1.") SVector{2,Int}((1,))
24+
else
25+
@test_throws DimensionMismatch("No precise constructor for SVector{2, $Int} found. Length of input was 1.") SVector{2,Int}((1,))
26+
end
2327
@test_throws Exception SVector{1,3}((1,))
2428

2529
@test_throws Exception SMatrix{1.0,1,Int,1}((1,))

test/matrix_multiply_add.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,16 @@ function test_multiply_add(N1,N2,ArrayType=MArray)
7777
mul!(b,At,c,1.0,2.0)
7878
@test b 5A'c
7979

80-
@test_noalloc mul!(c,A,b)
80+
@static if VERSION < v"1.5-"
81+
@test_noalloc mul!(c,A,b)
82+
else
83+
if !(ArrayType <: SizedArray)
84+
@test_noalloc mul!(c,A,b)
85+
else
86+
mul!(c,A,b)
87+
@test_broken(@allocated(mul!(c,A,b)) == 0)
88+
end
89+
end
8190
bmark = @benchmark mul!($c,$A,$b,$α,$β) samples=10 evals=10
8291
@test minimum(bmark).allocs == 0
8392
# @test_noalloc mul!(c, A, b, α, β) # records 32 bytes

0 commit comments

Comments
 (0)