Skip to content

Commit 142eefd

Browse files
committed
Fix running tests locally
1 parent b464a47 commit 142eefd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/flopscomp.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22
using Metal, GPUArrays, LinearAlgebra, Printf, AppleAccelerate
33

4-
@static if !haskey(ENV, "CI")
4+
testing = (@isdefined TESTING) && TESTING
5+
6+
@static if !testing
57
using Plots
68
using Plots.Measures
79
end
@@ -180,6 +182,6 @@ function plot_results(res, Fs=["MPS", "MPSGraph", "MPSGraph (ANE)"]; outpath=not
180182
return finalplot
181183
end
182184

183-
if haskey(ENV, "CI")
185+
if testing
184186
runcomparison(Ns=[50, 64, 100, 128, 250, 256, 500, 512])
185187
end

test/examples.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ cd(examples_dir) do
1919
@testset for example in examples
2020
mod = @eval module $(gensym()) end
2121
@eval mod begin
22+
const TESTING=true
2223
redirect_stdout(devnull) do
2324
include($example)
2425
end

0 commit comments

Comments
 (0)