mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
menu_explore_build_list was one handler call: every playlist parsed, every RDB walked, every category sorted - on the frame thread when Threaded Tasks is off. The build is now begin/step/end/abort over three phases (playlists through the resumable playlist parser, RDB cursor items, one sort per step), consulting a budget between work items; build_list is begin + one unbudgeted step + end, so the two cannot drift. The explore init task steps it under the shared per-frame I/O window and aborts cleanly on cancel. Harness samples/menu/explore_build writes a collection of playlists and databases, checks the index built one item per step hashes the same as the one built in one go, and that the real task returns unfinished across checks and installs the same index.
37 lines
1.1 KiB
Makefile
37 lines
1.1 KiB
Makefile
# See build.sh: this harness links the shipping RetroArch objects with
|
|
# only main() replaced, so it needs the project's own build rather than
|
|
# a source list of its own.
|
|
#
|
|
# SAN= selects which tree build to link, as the suite passes it:
|
|
# SAN=address (default) -> make SANITIZER=address,undefined DEBUG=1
|
|
# SAN=thread -> make SANITIZER=thread DEBUG=1
|
|
# SAN=none -> plain release build
|
|
# The matching tree build must exist first; build.sh says so if not.
|
|
TARGET := explore_build_test
|
|
SAN ?= address
|
|
|
|
ifeq ($(SAN),address)
|
|
MAKE_ARGS := SANITIZER=address,undefined DEBUG=1
|
|
else ifeq ($(SAN),thread)
|
|
MAKE_ARGS := SANITIZER=thread DEBUG=1
|
|
else
|
|
MAKE_ARGS :=
|
|
endif
|
|
|
|
all:
|
|
@MAKE_ARGS="$(MAKE_ARGS)" ./build.sh
|
|
|
|
check: all
|
|
@ASAN_OPTIONS=detect_leaks=0:abort_on_error=1 \
|
|
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 \
|
|
TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1 \
|
|
./$(TARGET) > check.log 2>&1; rc=$$?; \
|
|
grep -vE '^\[(INFO|DEBUG|WARN|ERROR)\]' check.log; rm -f check.log; \
|
|
exit $$rc
|
|
|
|
clean:
|
|
rm -f $(TARGET) retroarch_nomain.o harness_main.o \
|
|
retroarch_nomain.d harness_main.d
|
|
|
|
.PHONY: all check clean
|