From ba976cb1b1a71b7c87c2003768d74db8c5afc3ff Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:15:33 +0100 Subject: allow undo to Both, log current state to console --- rtt-module.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtt-module.js b/rtt-module.js index 5fe60ba..6c35fd2 100755 --- a/rtt-module.js +++ b/rtt-module.js @@ -140,7 +140,7 @@ module.exports.fuzz = function(fuzzerInputData) { } if (action === "undo") { - if (state.active !== active) { + if (state.active !== active && state.active !== "Both") { log_crash(replay, state, view, step, active) throw new UndoActiveError(`undo caused active to switch from ${active} to ${state.active}`) } @@ -160,9 +160,9 @@ function log_crash(replay, state, view, step, active, action=undefined, args=und console.log("VIEW", view) console.log("SETUP", replay[0].split("\t")[2]) if (action !== undefined) { - console.log(`STEP=${step} ACTIVE=${active} ACTION: ${action} ` + JSON.stringify(args)) + console.log(`STEP=${step} ACTIVE=${active} STATE=${state?.state} ACTION: ${action} ` + JSON.stringify(args)) } else { - console.log(`STEP=${step} ACTIVE=${active}`) + console.log(`STEP=${step} ACTIVE=${active} STATE=${state?.state}`) } // console.log("STATE & REPLAY dumped to 'crash-state.json' and 'crash-replay.txt'") fs.writeFileSync("crash-state.json", JSON.stringify(state)) -- cgit v1.2.3