make tests a more reliable

This commit is contained in:
Fabian 2025-09-11 20:01:44 -03:00
parent 4e15afcd77
commit 0669f7a477

View file

@ -553,9 +553,9 @@ if(cluster.isPrimary)
on_text: "Compress okay", on_text: "Compress okay",
run: run:
RUN_SLOW_TESTS ? RUN_SLOW_TESTS ?
"./v86-in-v86.js | tee /dev/stderr | grep -m1 'Files send via emulator appear in' ; sleep 2; echo v86-in-v86 okay\n" "./v86-in-v86.js | tee /dev/stderr | grep -m1 'Files send via emulator appear in' ; sleep 2; echo; echo v86-in-v86 okay\n"
: :
"./v86-in-v86.js | tee /dev/stderr | grep -m1 'Kernel command line:' ; sleep 2; echo v86-in-v86 okay\n", "./v86-in-v86.js | tee /dev/stderr | grep -m1 'Kernel command line:' ; sleep 2; echo; echo v86-in-v86 okay\n",
}, },
{ {
on_text: "v86-in-v86 okay", on_text: "v86-in-v86 okay",
@ -1533,8 +1533,8 @@ function run_test(test, done)
timeouts.push( timeouts.push(
setTimeout(() => { setTimeout(() => {
if(VERBOSE) console.error("Sending '%s'", action.run); if(VERBOSE) console.error("Sending '%s'", action.run);
if(typeof action.run[0] === "string") emulator.keyboard_send_text(action.run, 5); if(typeof action.run[0] === "string") emulator.keyboard_send_text(action.run, 10);
else emulator.keyboard_send_scancodes(action.run, 5); else emulator.keyboard_send_scancodes(action.run, 10);
}, action.after || 0) }, action.after || 0)
); );
} }
@ -1589,8 +1589,8 @@ function run_test(test, done)
timeouts.push( timeouts.push(
setTimeout(() => { setTimeout(() => {
if(VERBOSE) console.error("Sending '%s'", action.run); if(VERBOSE) console.error("Sending '%s'", action.run);
if(typeof action.run[0] === "string") emulator.keyboard_send_text(action.run, 5); if(typeof action.run[0] === "string") emulator.keyboard_send_text(action.run, 10);
else emulator.keyboard_send_scancodes(action.run, 5); else emulator.keyboard_send_scancodes(action.run, 10);
}, action.after || 0) }, action.after || 0)
); );
} }