From c5425801382ee6649f2e46f0ceb3ad4551aa7b9f Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Tue, 13 Oct 2020 00:16:12 +0200 Subject: [PATCH 1/7] Parallelize unit test execution - Unit tests are still running serially on Travis, because we cannot derive a correct coverage report otherwise. --- ci-scripts/ci-runner.bash | 14 ++++++++------ requirements.txt | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ci-scripts/ci-runner.bash b/ci-scripts/ci-runner.bash index 88a8743250..dac25e18de 100644 --- a/ci-scripts/ci-runner.bash +++ b/ci-scripts/ci-runner.bash @@ -144,7 +144,7 @@ echo "[INFO] Running unit tests on $(hostname) in ${CI_FOLDER}" if [ $CI_GENERIC -eq 1 ]; then # Run unit tests for the public release echo "[INFO] Running unit tests with generic settings" - checked_exec ./test_reframe.py \ + checked_exec ./test_reframe.py --workers=auto --forked \ -W=error::reframe.core.exceptions.ReframeDeprecationWarning -ra checked_exec ! ./bin/reframe.py --system=generic -l 2>&1 | \ grep -- '--- Logging error ---' @@ -169,21 +169,23 @@ elif [ $CI_TUTORIAL -eq 1 ]; then else # Run unit tests with the scheduler backends tempdir=$(mktemp -d -p $SCRATCH) + export TMPDIR=$tempdir if [[ $(hostname) =~ dom ]]; then PATH_save=$PATH export PATH=/apps/dom/UES/karakasv/slurm-wrappers/bin:$PATH for backend in slurm pbs torque; do echo "[INFO] Running unit tests with ${backend}" - checked_exec ./test_reframe.py --rfm-user-config=config/cscs-ci.py \ + checked_exec ./test_reframe.py --workers=auto --forked \ + --rfm-user-config=config/cscs-ci.py \ -W=error::reframe.core.exceptions.ReframeDeprecationWarning \ - --rfm-user-system=dom:${backend} --basetemp=$tempdir -ra + --rfm-user-system=dom:${backend} -ra done export PATH=$PATH_save else echo "[INFO] Running unit tests" - checked_exec ./test_reframe.py --rfm-user-config=config/cscs-ci.py \ - -W=error::reframe.core.exceptions.ReframeDeprecationWarning \ - --basetemp=$tempdir -ra + checked_exec ./test_reframe.py --workers=auto --forked \ + --rfm-user-config=config/cscs-ci.py \ + -W=error::reframe.core.exceptions.ReframeDeprecationWarning -ra fi if [ $CI_EXITCODE -eq 0 ]; then diff --git a/requirements.txt b/requirements.txt index 3b4d79e1fa..5e8483bf98 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ importlib_metadata jsonschema pytest>=5.0.0 +pytest-parallel coverage setuptools wcwidth From 02673d7fed8f934357dc87b1888d7d08565fa21d Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 14 Oct 2020 10:54:32 +0200 Subject: [PATCH 2/7] Fine tune pytest requirements --- requirements.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5e8483bf98..84a1d090ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,9 @@ importlib_metadata jsonschema -pytest>=5.0.0 +pytest>=5.0.0,<6.0.0 +pytest-forked pytest-parallel +pytest-xdist coverage setuptools wcwidth From 2598495adb2191e405dd0c1ca157a7c1e47358cc Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 14 Oct 2020 11:03:51 +0200 Subject: [PATCH 3/7] Add comments in requirements.txt --- requirements.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/requirements.txt b/requirements.txt index 84a1d090ea..7e47fe8762 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,14 @@ importlib_metadata jsonschema + +# pytest >= 6.0.0 gives errors during installation pytest>=5.0.0,<6.0.0 pytest-forked pytest-parallel + +# pytest-xdist is needed to provide the parallel unit test infrastructure pytest-xdist + coverage setuptools wcwidth From c9bb85d330151f8f98380e49df4b2c2e01bdfbfb Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 14 Oct 2020 13:57:29 +0200 Subject: [PATCH 4/7] Remove unnecessary module loads in ci scripts --- ci-scripts/ci-runner.bash | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ci-scripts/ci-runner.bash b/ci-scripts/ci-runner.bash index dac25e18de..5dfc5a8de4 100644 --- a/ci-scripts/ci-runner.bash +++ b/ci-scripts/ci-runner.bash @@ -125,13 +125,6 @@ if [ "X${MODULEUSE}" != "X" ]; then module use ${MODULEUSE} fi -if [[ $(hostname) =~ tsa ]]; then - # FIXME: Temporary workaround until we have a reframe module on Tsa - module load python -else - module load reframe -fi - # Bootstrap ReFrame ./bootstrap.sh @@ -169,6 +162,7 @@ elif [ $CI_TUTORIAL -eq 1 ]; then else # Run unit tests with the scheduler backends tempdir=$(mktemp -d -p $SCRATCH) + echo "[INFO] export TMPDIR=$tempdir" export TMPDIR=$tempdir if [[ $(hostname) =~ dom ]]; then PATH_save=$PATH From 6e01c640ca4e89874cec088a536c2b43e28ffcea Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 14 Oct 2020 14:05:40 +0200 Subject: [PATCH 5/7] Restore module load for Kesch only --- ci-scripts/ci-runner.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci-scripts/ci-runner.bash b/ci-scripts/ci-runner.bash index 5dfc5a8de4..877ab7bbc2 100644 --- a/ci-scripts/ci-runner.bash +++ b/ci-scripts/ci-runner.bash @@ -125,6 +125,10 @@ if [ "X${MODULEUSE}" != "X" ]; then module use ${MODULEUSE} fi +if [[ $(hostname) =~ kesch ]]; then + module load reframe +fi + # Bootstrap ReFrame ./bootstrap.sh From f184a29783e6eb9e64a21e3e9fad21254acd7cbf Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 14 Oct 2020 17:31:32 +0200 Subject: [PATCH 6/7] Pin requirements versions --- requirements.txt | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7e47fe8762..7729fe4ba3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,8 @@ -importlib_metadata -jsonschema - -# pytest >= 6.0.0 gives errors during installation -pytest>=5.0.0,<6.0.0 -pytest-forked -pytest-parallel - -# pytest-xdist is needed to provide the parallel unit test infrastructure -pytest-xdist - -coverage -setuptools -wcwidth +importlib_metadata==2.0.0 +jsonschema==3.2.0 +pytest==6.1.1 +pytest-forked==1.3.0 +pytest-parallel==0.1.0 +coverage==5.3 +setuptools==50.3.0 +wcwidth==0.2.5 From cfbe8154b23848f01b795f54f4463912155603c8 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 14 Oct 2020 20:08:58 +0200 Subject: [PATCH 7/7] Pin documentation requirements versions --- docs/requirements.txt | 62 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index c89f2cbe8e..07fe3d4988 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,31 +1,31 @@ -alabaster>=0.7.10 -argh>=0.26.2 -Babel>=2.5.1 -certifi>=2017.7.27.1 -chardet>=3.0.4 -docutils>=0.14 -idna>=2.6 -imagesize>=0.7.1 -Jinja2>=2.9.6 -jsonschema -livereload>=2.5.1 -pathtools>=0.1.2 -port-for==0.3.1 -Pygments>=2.2.0 -pytz>=2017.2 -PyYAML>=3.12 -recommonmark>=0.4.0 -requests>=2.18.4 -setuptools>=31.0.1 -six>=1.11.0 -snowballstemmer>=1.2.1 -Sphinx>=3.0 -sphinx-autobuild>=0.7.1 -sphinx-bootstrap-theme>=0.5.3 -sphinx-fakeinv>=1.0.0 -sphinx-rtd-theme>=0.2.4 -sphinxcontrib-websupport>=1.0.1 -sphinxcontrib-versioning>=2.2.1 -tornado>=4.5.2 -urllib3>=1.22 -watchdog>=0.8.3 +alabaster==0.7.12 +argh==0.26.2 +Babel==2.8.0 +certifi==2020.6.20 +chardet==3.0.4 +docutils==0.16 +idna==2.10 +imagesize==1.2.0 +Jinja2==2.11.2 +jsonschema==3.2.0 +livereload==2.6.3 +pathtools==0.1.2 +port-for==0.4 +Pygments==2.7.1 +pytz==2020.1 +PyYAML==5.3.1 +recommonmark==0.6.0 +requests==2.24.0 +setuptools==50.3.0 +six==1.15.0 +snowballstemmer==2.0.0 +Sphinx==3.2.1 +sphinx-autobuild==2020.9.1 +sphinx-bootstrap-theme==0.7.1 +sphinx-fakeinv==1.0.0 +sphinx-rtd-theme==0.5.0 +sphinxcontrib-websupport==1.2.4 +sphinxcontrib-versioning==2.2.1 +tornado==6.0.4 +urllib3==1.25.10 +watchdog==0.10.3