Fuzz testing debug tool

Add code to run a fuzz tester, simulating (more-or-less) random
keyboard mashing. There's no option to turn it on, you need to
set iflags.debug_fuzzer on via a debugger or something along
those lines.
This commit is contained in:
Pasi Kallinen
2018-11-08 15:55:49 +02:00
parent 4f541fe216
commit 0bb6754998
14 changed files with 76 additions and 3 deletions
+4
View File
@@ -608,6 +608,8 @@ level_tele()
char buf[BUFSZ];
boolean force_dest = FALSE;
if (iflags.debug_fuzzer)
goto random_levtport;
if ((u.uhave.amulet || In_endgame(&u.uz) || In_sokoban(&u.uz))
&& !wizard) {
You_feel("very disoriented for a moment.");
@@ -750,6 +752,8 @@ level_tele()
killer.name[0] = 0; /* still alive, so far... */
if (iflags.debug_fuzzer && newlev < 0)
goto random_levtport;
if (newlev < 0 && !force_dest) {
if (*u.ushops0) {
/* take unpaid inventory items off of shop bills */