How can I set a timeout that doesn't consider the time of the last output?

The docs say:

timeout: if a command runs this many seconds without output, kill it (default:600s)

I can determine that my tests are in a bad state if they take a certain amount of total time (about 20 minutes). However the tests continue to produce output sporadically, so a timeout based on the last output will not be useful.

Is there a CircleCI-approved way to give this kind of timeout? Right now, I’m giving the timeout command a shot:

test:
  override:
    timeout 20m bundle exec rspec spec --format progress
2 Likes