]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
ci : fix and re-enable tests
authorGeorgi Gerganov <redacted>
Fri, 21 Oct 2022 12:27:30 +0000 (15:27 +0300)
committerGeorgi Gerganov <redacted>
Fri, 21 Oct 2022 12:27:30 +0000 (15:27 +0300)
CMakeLists.txt
whisper.cpp

index c1cdd437d79e7d2c5b9d18ce03ba91c1b56e3187..5ae5ba714460307e46e9cd0179e4590853675cb3 100644 (file)
@@ -171,8 +171,8 @@ if (WHISPER_STANDALONE)
     endif ()
 
     # TODO: temporary disabled
-    #if (WHISPER_BUILD_TESTS)
-    #    enable_testing()
-    #    add_subdirectory(tests)
-    #endif ()
+    if (WHISPER_BUILD_TESTS)
+        enable_testing()
+        add_subdirectory(tests)
+    endif ()
 endif ()
index 2d2b8cedcb173644b4153dba698911dfac216a75..55422b2d939163d0e39b1df82d404281da0e6441 100644 (file)
@@ -2477,6 +2477,12 @@ int whisper_full(
                     }
                     break;
                 }
+
+                // TESTS: if no tensors are loaded, it means we are running tests
+                if (ctx->model.tensors.size()) {
+                    seek_delta = 100*WHISPER_CHUNK_SIZE;
+                    break;
+                }
             }
 
             if (done) {