#!/bin/bash # Milestone 6 smoke sweep: the 27 titles of tests/smoke_sweep.txt on the board (PyPy, # user's boot ROMs), PicoDrive and BlastEm (detectors), 1,200 frames. Outputs in # $SMOKE_DIR (default reference/m6); triage.py reads the same variable. cd /data/emu/sega32x-python || exit 1 M=reference/m6; R=${SMOKE_DIR:-$M}; B=/data/emu/images/x55/bios; D="/data/emu/source/myrient.erista.me/files/No-Intro/Sega - 32X" PICO=reference/build/picodrive/picodrive_libretro.so; PY=.venv-pypy/bin/python # Presses counted from each emulator's first picture (worklog Session 15): the boots differ. FRAMES=1200; PRESS=(--press-from-picture 550:start:6 --press-from-picture 850:start:6) DET=$(seq -s, 2 2 $FRAMES) BLAST=/data/emu/megadrive-python/reference/build-blastem-libretro/blastem_libretro.so mkdir -p $R/board $R/pico $R/blastem $R/logs $M/roms git rev-parse --short HEAD > $R/at.txt; uptime > $R/load-start.txt # The loop reads from a process substitution, not a pipe, so the jobs are this shell's and # the wait below waits for them. while read -r name; do slug=$(echo "$name" | tr -c 'A-Za-z0-9\n' '_') # The console the cartridge's region wants (a USA release runs on the Genesis). case "$name" in *USA*|*World*) machine=genesis ;; *Europe*) machine=megadrive ;; *Japan*) machine=megadrive-japan ;; *) machine=genesis ;; esac rom=$M/roms/$slug.bin [ -f "$rom" ] || .venv-pypy/bin/python -c "import sys; from megadrive_python.cartridge import load_image; open(sys.argv[2],'wb').write(load_image(sys.argv[1]))" "$D/$name.zip" "$rom" ( s=$(date +%s) nice .venv/bin/python scripts/libretro_frames.py $PICO "$rom" $R/pico/$slug --frames $DET --bios-dir $M/bios "${PRESS[@]}" > $R/logs/$slug-pico.log 2>&1 echo "EXIT $? $(( $(date +%s) - s )) s" >> $R/logs/$slug-pico.log s=$(date +%s) nice .venv/bin/python scripts/libretro_frames.py $BLAST "$rom" $R/blastem/$slug --frames $DET --bios-dir $M/bios-blastem "${PRESS[@]}" > $R/logs/$slug-blastem.log 2>&1 echo "EXIT $? $(( $(date +%s) - s )) s" >> $R/logs/$slug-blastem.log s=$(date +%s) nice $PY scripts/run_32x.py "$D/$name.zip" --machine $machine --bios-dir $B --frames $FRAMES --out $R/board/$slug --png-every 100 --report-every 50 "${PRESS[@]}" > $R/logs/$slug-board.log 2>&1 echo "EXIT $? $(( $(date +%s) - s )) s" >> $R/logs/$slug-board.log ) & done < <(grep -v '^#' tests/smoke_sweep.txt | grep .) wait uptime > $R/load-end.txt