diff --git a/LLama.Unittest/BeamTests.cs b/LLama.Unittest/BeamTests.cs index 86399c42..6ae0adbf 100644 --- a/LLama.Unittest/BeamTests.cs +++ b/LLama.Unittest/BeamTests.cs @@ -28,7 +28,6 @@ public sealed class BeamTests _model.Dispose(); } - //[Fact(Skip = "Very very slow in CI")] [Fact] public void BasicBeam() { diff --git a/LLama.Unittest/IgnoreOnCIFact.cs b/LLama.Unittest/IgnoreOnCIFact.cs new file mode 100644 index 00000000..c26bfd6c --- /dev/null +++ b/LLama.Unittest/IgnoreOnCIFact.cs @@ -0,0 +1,22 @@ +namespace LLama.Unittest; + +/// +/// Extend Fact attributes to know if we are running on release or debug. The assumption is that on CI we run on Release +/// +public class IgnoreOnCiFact : FactAttribute +{ + public IgnoreOnCiFact() { + if( IsRelease()) { + Skip = "Ignore on CI"; + } + } + + private static bool IsRelease() + { + #if DEBUG + return false; + #else + return true; + #endif + } +} \ No newline at end of file diff --git a/LLama.Unittest/LLavaWeightsTests.cs b/LLama.Unittest/LLavaWeightsTests.cs index 8eaf81bc..bf75f022 100644 --- a/LLama.Unittest/LLavaWeightsTests.cs +++ b/LLama.Unittest/LLavaWeightsTests.cs @@ -33,7 +33,7 @@ namespace LLama.Unittest _lLavaWeights.Dispose(); } - [Fact(Skip = "Very very slow in CI")] + [IgnoreOnCiFact] public void EmbedImageAsFileName() { int n_past = 0; @@ -41,7 +41,7 @@ namespace LLama.Unittest Assert.True( _lLavaWeights.EvalImageEmbed( _context, emb, ref n_past ) ); } - [Fact(Skip = "Very very slow in CI")] + [IgnoreOnCiFact] public void EmbedImageAsBinary() { int n_past = 0;