Commit 8e4940bf authored by eric pellegrini's avatar eric pellegrini
Browse files

Merge branch 'feature-functional_tests_enhancing' into 'develop'

Feature functional tests enhancing

See merge request !8
parents 850a86b0 74c401fa
Pipeline #3435 failed with stages
in 17 minutes and 49 seconds
stages:
- build
- test
- ci
- deploy
# trusty pipeline
build:trusty:
stage: build
ci:trusty:
stage: ci
script:
- ./BuildServer/Debian/run_build.sh
- ./BuildServer/Debian/run_tests.sh
allow_failure: false
only:
- triggers
......@@ -24,24 +24,6 @@ build:trusty:
tags:
- ubuntu14.04
test:trusty:
stage: test
script:
- ./BuildServer/Debian/run_tests.sh
allow_failure: false
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
dependencies:
- build:trusty
tags:
- ubuntu14.04
deploy:trusty:
stage: deploy
script:
......@@ -50,6 +32,8 @@ deploy:trusty:
- triggers
- tags
- develop
dependencies:
- ci:trusty
when: on_success
artifacts:
paths:
......@@ -59,10 +43,11 @@ deploy:trusty:
# osx pipeline
build:osx:
stage: build
ci:osx:
stage: ci
script:
- ./BuildServer/Darwin/Scripts/run_build.sh
- ./BuildServer/Darwin/Scripts/run_tests.sh
allow_failure: false
only:
- triggers
......@@ -79,24 +64,6 @@ build:osx:
tags:
- macmini2
test:osx:
stage: test
script:
- ./BuildServer/Darwin/Scripts/run_tests.sh
allow_failure: false
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
dependencies:
- build:osx
tags:
- macmini2
deploy:osx:
stage: deploy
script:
......@@ -105,6 +72,8 @@ deploy:osx:
- triggers
- tags
- develop
dependencies:
- ci:osx
when: on_success
artifacts:
paths:
......@@ -112,14 +81,17 @@ deploy:osx:
tags:
- macmini2
# # windows 7 pipeline
# windows 7 pipeline
build:windows:
stage: build
ci:windows:
stage: ci
script:
- c:\cygwin64\bin\bash -c "dos2unix.exe ./BuildServer/Windows/run_build.sh"
- c:\cygwin64\bin\bash -c "chmod a+x ./BuildServer/Windows/run_build.sh"
- c:\cygwin64\bin\bash -c "./BuildServer/Windows/run_build.sh"
- c:\cygwin64\bin\bash -c "dos2unix.exe ./BuildServer/Windows/run_tests.sh"
- c:\cygwin64\bin\bash -c "chmod a+x ./BuildServer/Windows/run_tests.sh"
- c:\cygwin64\bin\bash -c "./BuildServer/Windows/run_tests.sh"
allow_failure: false
only:
- triggers
......@@ -136,26 +108,6 @@ build:windows:
tags:
- windows
test:windows:
stage: test
script:
- c:\cygwin64\bin\bash -c "dos2unix.exe ./BuildServer/Windows/run_tests.sh"
- c:\cygwin64\bin\bash -c "chmod a+x ./BuildServer/Windows/run_tests.sh"
- c:\cygwin64\bin\bash -c "./BuildServer/Windows/run_tests.sh"
allow_failure: false
only:
- triggers
- tags
- /^feature-.*$/
- /^release-.*$/
- /^hotfix-.*$/
- /^bugfix-.*$/
- develop
dependencies:
- build:windows
tags:
- windows
deploy:windows:
stage: deploy
script:
......@@ -166,6 +118,8 @@ deploy:windows:
- triggers
- tags
- develop
dependencies:
- ci:windows
when: on_success
artifacts:
paths:
......
......@@ -12,7 +12,6 @@ BLEU="\\033[1;34m"
##Select the build target
# take the latest version of nmoldyn available on the forge
echo -e "$BLEU""Getting last MDANSE revision" "$NORMAL"
......@@ -37,4 +36,10 @@ rm -rf /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-pack
# Build and install MDANSE to the homebrewed python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py build >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py install >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE" "Failed to build MDANSE" "$NORMAL"
exit $status
fi
exit 0
\ No newline at end of file
......@@ -38,10 +38,10 @@ cd BuildServer/Darwin/Scripts
/usr/local/bin/python build.py py2app
rc=$?
if [[ $rc != 0 ]]; then
status=$?
if [[ $status != 0 ]]; then
echo -e "$ROUGE""Cannot build app." "$NORMAL"
exit 1
exit $status
fi
cd ../Build
......@@ -84,4 +84,4 @@ chmod 777 ../Scripts/change_dylib_path.sh
../Tools/create-dmg/create-dmg --background "../Resources/background.jpg" --volname "MDANSE" --window-pos 200 120 --window-size 800 400 --icon MDANSE.app 200 190 --hide-extension MDANSE.app --app-drop-link 600 185 "${MDANSE_DMG}" ./dist
exit
exit 0
......@@ -2,23 +2,31 @@
ROUGE="\\033[1;31m"
cd $CI_PROJECT_DIR
export PYTHONPATH=${CI_PROJECT_DIR}/build/lib.macosx-10.6-intel-2.7
# Performs the unit tests
cd Tests/UnitTests
/Library/Frameworks/Python.framework/Versions/2.7/bin/nosetests --verbosity=3 -P .
# Exit now if unable to run tests
if [ $? -ne 0 ]; then
status = $?
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE""One or several unit tests failed"
exit status
exit $status
fi
cd ../..
# Performs the functional tests
cd Tests/FunctionalTests/Jobs
rm -rf Test_*
/Library/Frameworks/Python.framework/Versions/2.7/bin/python BuildJobTests.py
/Library/Frameworks/Python.framework/Versions/2.7/bin/nosetests --verbosity=3 --exe -P .
if [ $? -ne 0 ]; then
status=$?
/Library/Frameworks/Python.framework/Versions/2.7/bin/nosetests --verbosity=3 --exe Test_*.py
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE""One or several functional tests failed"
exit status
exit $status
fi
cd ../../..
exit 0
\ No newline at end of file
......@@ -24,3 +24,10 @@ echo -e "$BLEU""Commit id = ${COMMIT_ID}<--" "$NORMAL"
echo "$BLEU""Building MDANSE" "$NORMAL"
python setup.py build
status=$?
if [ $status -ne 0 ]; then
echo "Failed to build MDANSE"
exit $status
fi
exit 0
\ No newline at end of file
......@@ -71,3 +71,5 @@ sed -i "s/Installed-Size:.*/Installed-Size: $((1+(instSize/1024)))/g" ${DEBIAN_R
export TMPDIR=.
fakeroot dpkg-deb -b ${DEBIAN_ROOT_DIR} ${DEBIAN_ROOT_DIR}/MDANSE-${VERSION_NAME}-${DISTRO}-${ARCH}.deb
exit 0
\ No newline at end of file
......@@ -10,20 +10,23 @@ export PYTHONPATH=${CI_PROJECT_DIR}/build/lib.linux-x86_64-2.7
cd Tests/UnitTests
nosetests --verbosity=3 -P .
# Exit now if unable to run tests
status=$?
if [ $? -ne 0 ]; then
status = $?
echo -e "$ROUGE""One or several unit tests failed"
exit status
exit $status
fi
cd ../..
# Performs the functional tests
cd Tests/FunctionalTests/Jobs
rm -rf Test_*
python BuildJobTests.py
nosetests --verbosity=3 --exe -P .
if [ $? -ne 0 ]; then
status=$?
nosetests --verbosity=3 --exe Test_*.py
status=$?
if [ $status -ne 0 ]; then
echo -e "$ROUGE""One or several functional tests failed"
exit status
exit $status
fi
exit 0
\ No newline at end of file
......@@ -61,10 +61,10 @@ echo "Extracting python ${PYTHON_MSI_WIN} in ${TARGET_DIR}"
cmd /c "msiexec /L* pythonlog.txt /qn /a ${PYTHON_MSI_WIN} TARGETDIR=${TARGET_DIR}"
# Exit now if something goes wrong
if [ $? -ne 0 ]; then
status=$?
status=$?
if [ $status -ne 0 ]; then
echo "Failed to extract python"
exit status
exit $status
fi
#Clean up python a bit, to keep the package size down
......@@ -210,8 +210,10 @@ cd ${SCRIPT_DIR}
cmd /V:ON /E:ON /C "setup_and_build.bat" "${CI_PROJECT_DIR_WIN}" "${TARGET_DIR}" ${MSVC_BUILD_TARGET}
# Exit now if unable to build
if [ $? -ne 0 ]; then
status=$?
status=$?
if [ $status -ne 0 ]; then
echo "Failed to build MDANSE"
exit status
exit $status
fi
exit 0
\ No newline at end of file
......@@ -48,3 +48,4 @@ echo "Creating nsis installer for target ${BUILD_TARGET}..."
makensis /V4 /ONSISlog.txt /DVERSION=${VERSION_NAME} /DARCH=${BUILD_TARGET} /DTARGET_DIR="${TARGET_DIR}" MDANSE_installer.nsi
exit 0
\ No newline at end of file
......@@ -11,8 +11,9 @@ cd %testsPath%
set testsPath=%2\Tests\FunctionalTests\Jobs
cd %testsPath%
del Test_*
%1\python.exe BuildJobTests.py
%1\python.exe %1\Scripts\nosetests --verbosity=3 -P %testsPath%
%1\python.exe %1\Scripts\nosetests --verbosity=3 %testsPath%\Test_*.py
exit %errorlevel%
\ No newline at end of file
......@@ -17,9 +17,10 @@ echo "Running tests"
cmd /V:ON /E:ON /C "run_tests.bat" "${TARGET_DIR}" "${CI_PROJECT_DIR_WIN}"
# Exit now if unable to run tests
if [ $? -ne 0 ]; then
status=$?
status=$?
if [ $status -ne 0 ]; then
echo "Failed to extract python"
echo "One or several unit tests failed"
exit status
fi
exit 0
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment