gregorio-project / gregorio-test

A repository of tests for Gregorio
GNU General Public License v3.0
5 stars 3 forks source link

Define number of processors #322

Closed rpspringuel closed 6 years ago

rpspringuel commented 6 years ago

An undefined variable $processors was being used to pass the number of processors to xargs in order to run multiple tests in parallel. This change renames the variable to $NPROCESSORS, defines a default value (the number of addressable processors reported by the system) and allows the user to change that number with a setting in gregorio-test.rc

Addresses #321

rpspringuel commented 6 years ago

Done.

rpspringuel commented 6 years ago

Changes up, but I noticed that the original definition of $processors dumped stderr to /dev/null. Should I do the same for the new definitions?

henryso commented 6 years ago

I don't think it's necessary to dump stderr to /dev/null in the newer method. The main reason for doing that before was to hide the nasty message should there be no nproc on the system. In the code you added, you are detecting the operating environment so you would want the user to know if there is a problem running sysctl or nproc.