Commit 60a78aed authored by Rich Trott's avatar Rich Trott Committed by James M Snell
Browse files

tools: make --repeat work with -j in test.py

The repeat option in test.py did not work as expected if `-j` was set to
more than one. Repeated tests running at the same time could share temp
directories and cause test failures. This was observed with:

    tools/test.py -J --repeat=10 parallel/test-fs-watch-recursive

By using copy.deepCopy(), the repeated tests are separate objects and
not references to the same objects. Setting `thread_id` on one of them
will now not change the `thread_id` on all of them. And `thread_id` is
how the temp directory (and common.PORT as well) are determined.

Refs: https://github.com/nodejs/node/pull/9228
PR-URL: https://github.com/nodejs/node/pull/9249


Reviewed-By: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: default avatarGibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarSantiago Gimeno <santiago.gimeno@gmail.com>
parent 443e2185
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment