open-dust/cairo-foundry

prevent infinite loop in tests

tdelabro opened this issue · 4 comments

Right now if a test contains an infinite loop, it will endlessly loop.
We should cap the time we want to spend on each test and stop the test if this time is exceeded.

We can take a --max-step argument in the CLI, with a default value so that if not passed it will still be one.

Then we can check the current number of steps (already recorded in vm.current_step) against a max step value we initialized inside theexecution_scopes

Can I get assigned to this 😁

Hey @hurrikaanig , how are things going with this one? Did you solved your problem with the cairoVM?
Can I help you?

Hey ! The getter for current_step got merged last saturday, so it should be good now. I'll continue working on this today

closed by #110