@@ -35,12 +35,13 @@ using OrderedCollections: OrderedSet
35
35
36
36
using DynamicPPL: getargs_dottilde, getargs_tilde, Selector
37
37
38
+ const GROUP = get (ENV , " GROUP" , " All" )
38
39
Random. seed! (100 )
39
40
40
41
include (" test_util.jl" )
41
42
42
- @testset " DynamicPPL.jl" begin
43
- @testset " interface " begin
43
+ @testset verbose = true " DynamicPPL.jl" begin
44
+ if GROUP == " All " || GROUP == " Group1 "
44
45
include (" utils.jl" )
45
46
include (" compiler.jl" )
46
47
include (" varnamedvector.jl" )
@@ -50,15 +51,60 @@ include("test_util.jl")
50
51
include (" sampler.jl" )
51
52
include (" independence.jl" )
52
53
include (" distribution_wrappers.jl" )
53
- include (" contexts.jl" )
54
- include (" context_implementations.jl" )
55
54
include (" logdensityfunction.jl" )
56
55
include (" linking.jl" )
57
- include (" threadsafe.jl" )
58
56
include (" serialization.jl" )
59
57
include (" pointwise_logdensities.jl" )
60
58
include (" lkj.jl" )
59
+ end
60
+
61
+ if GROUP == " All" || GROUP == " Group2"
62
+ include (" contexts.jl" )
63
+ include (" context_implementations.jl" )
64
+ include (" threadsafe.jl" )
61
65
include (" debug_utils.jl" )
66
+ @testset " compat" begin
67
+ include (joinpath (" compat" , " ad.jl" ))
68
+ end
69
+ @testset " extensions" begin
70
+ include (" ext/DynamicPPLMCMCChainsExt.jl" )
71
+ include (" ext/DynamicPPLJETExt.jl" )
72
+ end
73
+ @testset " ad" begin
74
+ include (" ext/DynamicPPLForwardDiffExt.jl" )
75
+ include (" ext/DynamicPPLMooncakeExt.jl" )
76
+ include (" ad.jl" )
77
+ end
78
+ @testset " prob and logprob macro" begin
79
+ @test_throws ErrorException prob " ..."
80
+ @test_throws ErrorException logprob " ..."
81
+ end
82
+ @testset " doctests" begin
83
+ DocMeta. setdocmeta! (
84
+ DynamicPPL,
85
+ :DocTestSetup ,
86
+ :(using DynamicPPL, Distributions);
87
+ recursive= true ,
88
+ )
89
+ doctestfilters = [
90
+ # Older versions will show "0 element Array" instead of "Type[]".
91
+ r" (Any\[\] |0-element Array{.+,[0-9]+})" ,
92
+ # Older versions will show "Array{...,1}" instead of "Vector{...}".
93
+ r" (Array{.+,\s ?1}|Vector{.+})" ,
94
+ # Older versions will show "Array{...,2}" instead of "Matrix{...}".
95
+ r" (Array{.+,\s ?2}|Matrix{.+})" ,
96
+ # Errors from macros sometimes result in `LoadError: LoadError:`
97
+ # rather than `LoadError:`, depending on Julia version.
98
+ r" ERROR: (LoadError:\s )+" ,
99
+ # Older versions do not have `;;]` but instead just `]` at end of the line
100
+ # => need to treat `;;]` and `]` as the same, i.e. ignore them if at the end of a line
101
+ r" (;;){0,1}\] $" m ,
102
+ # Ignore the source of a warning in the doctest output, since this is dependent on host.
103
+ # This is a line that starts with "└ @ " and ends with the line number.
104
+ r" └ @ .+:[0-9]+" ,
105
+ ]
106
+ doctest (DynamicPPL; manual= false , doctestfilters= doctestfilters)
107
+ end
62
108
end
63
109
64
110
@testset " compat" begin
0 commit comments