Skip to content

Commit

Permalink
Fixed what has changed in master to make it work with the new test-suite
Browse files Browse the repository at this point in the history
Also activated parallel tests. This might crash as some tests might still fail in parallel
  • Loading branch information
giovannipizzi committed Mar 30, 2017
1 parent fb629b1 commit a6706ba
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 61 deletions.
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ addons:
- openmpi-bin
- libopenmpi-dev
env:
## Uncomment the following line if you want to run also the interface tests
# - W90TESTSWITHINTERFACE=true
- W90TESTSWITHINTERFACE=false W90BINARYPARALLEL=false
- W90TESTSWITHINTERFACE=false W90BINARYPARALLEL=true
- W90BINARYPARALLEL=false
- W90BINARYPARALLEL=true
install:
# Possibly install QE and other interface code
- ./test-suite2/tools/external-codes/get-external-codes.sh
# Install Wannier
- ./test-suite/travis_copy_make.inc.sh
- make -j default
- ./test-suite2/tools/configure_travis_compilation.sh
- make -j default w90chk2chk
script:
- ./test-suite2/tools/run_tests_travis.sh
git:
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions test-suite2/tools/configure_travis_compilation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

#Stop the full script if one line crashes
set -e

## Set here, if needed, the location of the executables
TESTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd "$TESTDIR"

# Move the correct make.inc to prepare compilation
if [ "$W90BINARYPARALLEL" == "true" ]
then
cp config/TravisCI/make.inc.gfort+openmpi ../make.inc
else
cp config/TravisCI/make.inc.gfort ../make.inc
fi
13 changes: 0 additions & 13 deletions test-suite2/tools/external-codes/get-external-codes.sh

This file was deleted.

22 changes: 0 additions & 22 deletions test-suite2/tools/external-codes/get-quantum-espresso.sh

This file was deleted.

25 changes: 7 additions & 18 deletions test-suite2/tools/run_tests_travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,14 @@ set -e

## Set here, if needed, the location of the executables
TESTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
export ESPRESSO_ROOT="${TESTDIR}/tools/external-codes/espresso/"

cd "$TESTDIR"

## Get the external codes, but only if the environment variable
## W90TESTSWITHINTERFACE is set to true
if [ "$W90TESTSWITHINTERFACE" == "true" ]
then
# Only tests involving interfaces
./run_tests --category=interface_only
elif [ "$W90TESTSWITHINTERFACE" == "false" ]
then
# Only wannier tests
./run_tests --category=wannier_only
elif [ "$W90TESTSWITHINTERFACE" == "all" ]
# Default: serial, no mpirun. Run these in any case
./run_tests --category=default
if [ "$W90BINARYPARALLEL" == "true" ]
then
# Only wannier tests
./run_tests --category=all
else
# By default: run default tests
./run_tests -d
# If running in parallel: run also the tests in parallel
# I hardcode this to four, in case change it or set it as an ENV
# var in the .travis.yml
make ./run_tests --category=default --num-procs=4
fi

0 comments on commit a6706ba

Please sign in to comment.