Commit 78671a1c authored by Remi Perenon's avatar Remi Perenon
Browse files

Test build scripts

parent f6e9f634
Pipeline #3426 canceled with stages
in 8 minutes and 9 seconds
......@@ -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,17 @@ 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
status = $?
if [ $status -ne 0 ]; then
echo -e "$ROUGE" "Failed to build MDANSE" "$NORMAL"
exit $status
fi
/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 install 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
......@@ -6,8 +6,9 @@ ROUGE="\\033[1;31m"
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 "Failed to extract python"
echo -e "$ROUGE""One or several unit tests failed"
exit $status
fi
......@@ -17,9 +18,12 @@ 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 Test_*.py
if [ $? -ne 0 ]; then
status=$?
status = $?
if [ $status -ne 0 ]; then
echo -e "$ROUGE""One or several functional tests failed"
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
......@@ -22,9 +22,11 @@ cd Tests/FunctionalTests/Jobs
rm -rf Test_*
python BuildJobTests.py
nosetests --verbosity=3 --exe Test_*.py
if [ $? -ne 0 ]; then
status=$?
status = $?
if [ $status -ne 0 ]; then
echo -e "$ROUGE""One or several functional tests failed"
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,10 +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=$?
echo $status
status = $?
if [ $status -ne 0 ]; then
echo "Failed to build MDANSE"
echo $PATH
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
......@@ -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