Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

marks_media test reads the cache only (--cached-only), as CI does: a new image without its committed entry fails on the PC and laptop too, not only in CI (0.11.12 staging went red on CI alone)

islandmedc0b6d1b4a7ff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09f7b670..89e1b838 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -799,8 +799,9 @@ if(SCULPTFORGE_BUILD_TESTS)
${CMAKE_CURRENT_SOURCE_DIR})
add_test(NAME public_email_self_test COMMAND ${Python3_EXECUTABLE} -I ${CMAKE_CURRENT_SOURCE_DIR}/tools/check_public_email.py --self-test)
# The same marks read off the pixels of every tracked image and video (OCR, cached by file hash), and the deploy's
- # takedown of flagged ones (tools/media_takedown.py).
- add_test(NAME marks_media COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/check_marks_media.py
+ # takedown of flagged ones (tools/media_takedown.py). --cached-only reads it as CI does (no OCR there), so a new image
+ # without its committed cache entry fails here too, not only in CI (0.11.12 staging).
+ add_test(NAME marks_media COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/check_marks_media.py --cached-only
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_test(NAME marks_media_self_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/check_marks_media.py --self-test)
add_test(NAME media_takedown_self_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/media_takedown.py --self-test)
diff --git a/tools/check_marks_media.py b/tools/check_marks_media.py
index db178957..168be37f 100644
--- a/tools/check_marks_media.py
+++ b/tools/check_marks_media.py
@@ -13,6 +13,7 @@ Files listed in tools/marks_media_pending.txt (shots waiting to be re-recorded)
check_marks_media.py check every tracked image and video (ctest: marks_media)
check_marks_media.py FILE... check these files (any path), print every hit with its frame time
check_marks_media.py --jobs N parallel OCR jobs (default 3: the laptop's heavy-job budget)
+ check_marks_media.py --cached-only the cache only, as CI reads it (no OCR there): a new image fails here too
check_marks_media.py --self-test
"""
import hashlib
@@ -142,7 +143,8 @@ def main(argv):
jobs = int(argv[argv.index("--jobs") + 1]) if "--jobs" in argv else 3
explicit = [a for a in argv if not a.startswith("--") and not a.isdigit()]
mark_re = check_marks.load_marks()
- have_ocr = bool(shutil.which("tesseract") and shutil.which("ffmpeg"))
+ # --cached-only: as CI (no tesseract there), so a new image fails until its entry is committed, on every machine.
+ have_ocr = "--cached-only" not in argv and bool(shutil.which("tesseract") and shutil.which("ffmpeg"))
cache = {} if explicit else load_cache() # named files are read afresh, so their words can be shown
if not explicit and check_marks.tracked_files() is None:
print("check_marks_media: skipped, git can't list the tracked files here")