Skip to content

test: add --repeat option to tools/test.py

  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

Manual backport from master to 4.x stream, original commit message follows.

I often want to run a test many times to see if a failure can be recreated and I believe this is a common use case. We even have this job in the CI https://ci.nodejs.org/job/node-stress-single-test/configure but often you want to run it on a specific machine.

This patch adds the --repeat option so that you can repeat the selected set of tests a number of times. Given existing options in test.py this will allow you to run one or more tests for the number of repeats specified. For example:

tools/test.py -j8 --repeat 1000 parallel/test-process-exec-argv

runs the test-process-exec-argv test 1000 times, running 8 copies in parallel

tools/test.py --repeat 2

would run the entire test suite twice.

PR-URL: https://github.com/nodejs/node/pull/6700 Reviewed-By: Ben Noorhduis info@bnoordhuis.nl Reviewed-By: James M Snell jasnell@gmail.com Reviewed-By: Fedor Indutny fedor@indutny.com Reviewed-By: thefourtheye - Sakthipriyan Vairamani thechargingvolcano@gmail.com Reviewed-By: joaocgreis - João Reis reis@janeasystems.com Reviewed-By: Johan Bergström bugs@bergstroem.nu

Merge request reports

Loading