Skip to content

Commit d46274e

Browse files
hhaenselhhaensel
andauthored
allow Cthulhu v3 (#457)
Co-authored-by: hhaensel <helmut.haensel@gmx.com>
1 parent d9a77ad commit d46274e

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ SCPyPlotExt = "PyPlot"
3333
[compat]
3434
AbstractTrees = "0.4"
3535
CodeTracking = "1.3.9, 2, 3"
36-
Cthulhu = "2.17.6"
36+
Cthulhu = "2.17.6, 3"
3737
FlameGraphs = "1"
3838
InteractiveUtils = "1"
3939
JET = "0.9, 0.10, 0.11"

test/extensions/cthulhu.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ using Cthulhu.Testing
66
using Pkg
77
using Test
88

9+
@static if Base.pkgversion(Cthulhu) < v"3.0.0-"
10+
const VirtualTerminal = FakeTerminal
11+
end
12+
913
# NOTE: the Cthulhu test is handled specially in `.github/workflows/ci.yml`
1014

1115
macro with_try_stderr(out, expr)
@@ -56,7 +60,7 @@ end
5660
tree = last(trees)
5761
sig, root = only(tree.mt_backedges)
5862

59-
term = FakeTerminal()
63+
term = VirtualTerminal()
6064
t = @async begin
6165
@with_try_stderr term.output redirect_stderr(term.error) do
6266
ascend(term, root)
@@ -80,7 +84,7 @@ end
8084
itrigs = inference_triggers(tinf; exclude_toplevel=false)
8185
itrig = last(itrigs)
8286

83-
term = FakeTerminal()
87+
term = VirtualTerminal()
8488
t = @async begin
8589
@with_try_stderr term.output ascend(term, itrig; interruptexc=false)
8690
end

0 commit comments

Comments
 (0)