diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 2c4206b..d042330 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -22,14 +22,14 @@ jobs: pip install -r tests-requirements.txt pip install -r requirements.txt npm install -g remark-cli remark-validate-links - - name: Run sequential tests + - name: Run with 1 worker run: | ./tests.sh env: DOTDROP_FORCE_NODEBUG: yes DOTDROP_NOBANNER: yes DOTDROP_WORKERS: 1 - - name: Run parallel tests + - name: Run with 4 workers run: | ./tests.sh env: diff --git a/docs/usage.md b/docs/usage.md index 7ab489e..75c6d42 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -236,8 +236,8 @@ For more options, see the usage with `dotdrop --help`. ## Concurrency -The command line switch `-w`/`--workers`, if set to a value greater than one, allowing to use -multiple concurrent workers to execute an operation. It can be applied to the following +The command line switch `-w`/`--workers`, if set to a value greater than one, enables the use +of multiple concurrent workers to execute an operation. It can be applied to the following commands: * `install` diff --git a/test-ng.sh b/test-ng.sh index d9d8542..f004a7c 100755 --- a/test-ng.sh +++ b/test-ng.sh @@ -36,7 +36,9 @@ if [ -z ${GITHUB_WORKFLOW} ]; then else ## CI/CD export COVERAGE_FILE="${cur}/.coverage" - tests-ng/tests-launcher.py + # running multiple jobs in parallel sometimes + # messes with the results on remote servers + tests-ng/tests-launcher.py 1 fi # clear workdir diff --git a/tests-ng/chmod-compare.sh b/tests-ng/chmod-compare.sh index 035227f..6cf2ac3 100755 --- a/tests-ng/chmod-compare.sh +++ b/tests-ng/chmod-compare.sh @@ -128,9 +128,10 @@ chmod 700 ${fnormal} chmod 700 ${flink} set +e -cnt=`cd ${ddpath} | ${bin} compare -c ${cfg} -p p1 2>&1 | grep 'modes differ' | wc -l` +out=`cd ${ddpath} | ${bin} compare -c ${cfg} -p p1 2>&1` +cnt=$(echo "${out}" | grep 'modes differ' | wc -l) set -e -[ "${cnt}" != "5" ] && echo "compare modes failed (${cnt})" && exit 1 +[ "${cnt}" != "5" ] && echo "${out}" && echo "compare modes failed (${cnt}, expecting 5)" && exit 1 echo "OK" exit 0 diff --git a/tests-ng/tests-launcher.py b/tests-ng/tests-launcher.py index d68345a..010e20f 100755 --- a/tests-ng/tests-launcher.py +++ b/tests-ng/tests-launcher.py @@ -15,11 +15,12 @@ from halo import Halo LOG_FILE = '/tmp/dotdrop-tests-launcher.log' +GITHUB_ENV = 'GITHUB_WORKFLOW' def is_cicd(): """are we in a CICD env (github actions)""" - return 'GITHUB_WORKFLOW' in os.environ + return GITHUB_ENV in os.environ def run_test(logfd, path): @@ -74,7 +75,7 @@ def main(): if not is_cicd(): logfd = open(LOG_FILE, 'w', encoding='utf-8') if max_jobs: - logfd.write(f'start with {max_jobs} parallel worker(s)\n') + logfd.write(f'run tests with {max_jobs} parallel job(s)\n') logfd.write(f'running {len(tests)} test(s)\n') logfd.flush()