Skip to content

Commit 6a4e935

Browse files
committed
Run tests in debug mode.
1 parent 4af132e commit 6a4e935

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ jobs:
6565
julia --project=deps -e 'using Pkg; Pkg.instantiate()'
6666
julia --project=deps deps/build_local.jl
6767
# test
68-
- uses: julia-actions/julia-runtest@v1
68+
- name: Run tests
69+
run: |
70+
julia --project -e 'using Pkg; Pkg.test(; julia_args=`-g2`)'
6971
# process results
7072
- uses: julia-actions/julia-processcoverage@v1
7173
- uses: codecov/codecov-action@v1

src/core/instructions.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function identify(::Type{Instruction}, ref::API.LLVMValueRef)
1313
return instruction_opcodes[opcode]
1414
end
1515

16-
@inline function refcheck(::Type{T}, ref::API.LLVMValueRef) where T<:Instruction
16+
function refcheck(::Type{T}, ref::API.LLVMValueRef) where T<:Instruction
1717
ref==C_NULL && throw(UndefRefError())
18-
@static if Base.JLOptions().debug_level >= 2
18+
if Base.JLOptions().debug_level >= 2
1919
T′ = identify(Instruction, ref)
2020
if T != T′
2121
error("invalid conversion of $T′ instruction reference to $T")

src/core/metadata.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ function identify(::Type{Metadata}, ref::API.LLVMMetadataRef)
1212
return metadata_kinds[kind]
1313
end
1414

15-
@inline function refcheck(::Type{T}, ref::API.LLVMMetadataRef) where T<:Metadata
15+
function refcheck(::Type{T}, ref::API.LLVMMetadataRef) where T<:Metadata
1616
ref==C_NULL && throw(UndefRefError())
17-
@static if Base.JLOptions().debug_level >= 2
17+
if Base.JLOptions().debug_level >= 2
1818
T′ = identify(Metadata, ref)
1919
if T != T′
2020
error("invalid conversion of $T′ metadata reference to $T")

src/core/type.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ function identify(::Type{LLVMType}, ref::API.LLVMTypeRef)
1414
return type_kinds[kind]
1515
end
1616

17-
@inline function refcheck(::Type{T}, ref::API.LLVMTypeRef) where T<:LLVMType
17+
function refcheck(::Type{T}, ref::API.LLVMTypeRef) where T<:LLVMType
1818
ref==C_NULL && throw(UndefRefError())
19-
@static if Base.JLOptions().debug_level >= 2
19+
if Base.JLOptions().debug_level >= 2
2020
T′ = identify(LLVMType, ref)
2121
if T != T′
2222
error("invalid conversion of $T′ type reference to $T")

src/core/value.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ function identify(::Type{Value}, ref::API.LLVMValueRef)
1515
return value_kinds[kind]
1616
end
1717

18-
@inline function refcheck(::Type{T}, ref::API.LLVMValueRef) where T<:Value
18+
function refcheck(::Type{T}, ref::API.LLVMValueRef) where T<:Value
1919
ref==C_NULL && throw(UndefRefError())
20-
@static if Base.JLOptions().debug_level >= 2
20+
if Base.JLOptions().debug_level >= 2
2121
T′ = identify(Value, ref)
2222
if T != T′
2323
error("invalid conversion of $T′ value reference to $T")

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ using LLVM
1010
using LLVMExtra_jll
1111
using Test
1212

13+
if Base.JLOptions().debug_level < 2
14+
@warn "It is recommended to run the LLVM.jl test suite with -g2"
15+
end
16+
1317
@info "Using libLLVMExtra from $(LLVM.API.libLLVMExtra)"
1418

1519
@testset "LLVM" begin

0 commit comments

Comments
 (0)