Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Move komodo test to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInFez committed Feb 17, 2020
1 parent 1640e9a commit 842cfb2
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 42 deletions.
17 changes: 0 additions & 17 deletions Jenkinsfile-komodo

This file was deleted.

12 changes: 0 additions & 12 deletions checkout_komodo_tag.sh

This file was deleted.

21 changes: 21 additions & 0 deletions ci/jenkins/Jenkinsfile-komodo
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pipeline {
agent { label 'si-build' }
parameters {
string(defaultValue: "bleeding-py36", description: 'The komodo relase to be used', name: 'RELEASE_NAME')
string(defaultValue: "/prog/res/komodo", description: 'Root folder for komodo', name: 'KOMODO_ROOT')
string(defaultValue: "/opt/rh/devtoolset-7", description: 'The devtoolset folder', name: 'DEVTOOL')
string(defaultValue: "/prog/sdpsoft", description: 'The SDPSOFT folder', name: 'SDPSOFT')
}
stages{
stage('run tests') {
steps {
sh 'sh ci/jenkins/testkomodo.sh'
}
}
}
post {
cleanup {
deleteDir()
}
}
}
36 changes: 23 additions & 13 deletions testkomodo.sh → ci/jenkins/testkomodo.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
#!/bin/bash
source /project/res/komodo/$KOMODO_VERSION/enable
source /opt/rh/devtoolset-7/enable
GCC_VERSION=7.3.0 CMAKE_VERSION=3.10.2 source /prog/sdpsoft/env.sh
set -e

set -xe
source $KOMODO_ROOT/$RELEASE_NAME/enable
source $DEVTOOL/enable

# find and check out the code that was used to build libres for this komodo relase
echo "checkout tag from komodo"
EV=$(cat $KOMODO_ROOT/$RELEASE_NAME/$RELEASE_NAME | grep "libres:" -A2 | grep "version:")
EV=($EV) # split the string "version: vX.X.X"
EV=${EV[1]} # extract the version
EV=${EV%"+py3"}
echo "Using libres version $EV"
git checkout $EV

GCC_VERSION=7.3.0 CMAKE_VERSION=3.10.2 source $SDPSOFT/env.sh
echo "building c tests"
rm -rf build
mkdir build
Expand All @@ -12,7 +21,7 @@ cmake .. -DBUILD_TESTS=ON\
-DENABLE_PYTHON=OFF\
-DBUILD_APPLICATIONS=ON\
-DCMAKE_INSTALL_PREFIX=install\
-DCMAKE_PREFIX_PATH=/project/res/komodo/$KOMODO_VERSION/root/\
-DCMAKE_PREFIX_PATH=$KOMODO_ROOT/$RELEASE_NAME/root/\
-DCMAKE_C_FLAGS='-Werror=all'\
-DCMAKE_CXX_FLAGS='-Wno-unused-result'
make -j 12
Expand All @@ -21,29 +30,30 @@ rm -r lib64

echo "running ctest"
ctest --output-on-failure

popd

echo "create virtualenv"
ENV=testenv
rm -rf testenv
rm -rf $ENV
mkdir $ENV
python -m virtualenv --system-site-packages $ENV
source $ENV/bin/activate
python -m pip install mock decorator
python -m pip install -r test_requirements.txt


echo "running pytest"
#run in a new folder so that we dont load the other python code from the source, but rather run against komodo
rm -rf tmptest
mkdir tmptest
cp -r python/tests tmptest/tests
pushd tmptest

export ECL_SKIP_SIGNAL=ON
python -m pytest \
--ignore="tests/res/enkf/test_analysis_config.py"\
--ignore="tests/res/enkf/test_res_config.py"\
--ignore="tests/res/enkf/test_site_config.py"\
--ignore="tests/res/enkf/test_workflow_list.py"


--ignore="tests/res/enkf/test_workflow_list.py"\
--ignore="tests/res/enkf/test_hook_manager.py"\
--ignore="tests/legacy"
popd

0 comments on commit 842cfb2

Please sign in to comment.