From e87ec0c0132a74932f469816979137fe40fe3323 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Mon, 10 Apr 2017 02:48:38 +0800 Subject: [PATCH] [Tests] Try to detect & use more threads in local --- .../install from source with thread parameter | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/installation_node/install from source with thread parameter b/test/installation_node/install from source with thread parameter index 1b3faae..a3dcd1a 100755 --- a/test/installation_node/install from source with thread parameter +++ b/test/installation_node/install from source with thread parameter @@ -25,8 +25,11 @@ nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_T # Remove the stuff we're clobbering. [ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION -# Install from source with 2 make jobs (and swapped arg order) -nvm install -j 2 -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed" +# Speed up test for non-CI environment which may have more CPU threads +[ -z "${CI-}"] && nvm_get_make_jobs + +# Install from source with multiple make jobs (and swapped arg order) +nvm install -j ${NVM_MAKE_JOBS-:2} -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed" # Check [ -d ../../$NVM_TEST_VERSION ]