]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improve build scripts for Jenkins
authorspo <sergey.pokhodenko@opencascade.com>
Mon, 8 Jun 2015 11:33:57 +0000 (14:33 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Tue, 9 Jun 2015 10:19:29 +0000 (13:19 +0300)
make.sh
salome_env.sh
test.sh [new file with mode: 0755]
test_centos.sh [new file with mode: 0755]
test_d6.sh [new file with mode: 0755]

diff --git a/make.sh b/make.sh
index 009f372654b98747952a3e140851640f8e253882..1b5a56e060e394b23b3f671900583621a665e175 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -8,8 +8,7 @@ SRC_DIR=${ROOT_DIR}/sources
 
 BUILD_DIR=build
 INSTALL_DIR=install
-if [ $1 ]
-then
+if [ $1 ]; then
   BUILD_DIR=${BUILD_DIR}-$1
   INSTALL_DIR=${INSTALL_DIR}-$1
 fi
index a270f2563fea00a8580cb13bcc8ea4cef440c7ce..ae918e290996a36059a3b53cd44be2b3f618c513 100644 (file)
@@ -1,13 +1,17 @@
 #!/bin/bash
 
 main() {
+  local salome_version=7.6.0
   local platform="$(lsb_release -is)"
   local release="$(lsb_release -rs)"
-  if [ "${platform}" == "CentOS" ]; then 
-    export INST_ROOT=/dn48/newgeom/common/SALOME-7.5.1_CentOS-6.3
-  elif [ "${platform}" == "Debian" ]; then
-    if   [[ ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-6.0_SOURCES
-    elif [[ ${release} =~ ^8 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-8.0_SOURCES
+  if [[ ${salome_version} == "7.5.1" ]]; then
+    if   [[ "${platform}" == "CentOS" ]]; then export INST_ROOT=/dn48/newgeom/common/SALOME-7.5.1_CentOS-6.3
+    elif [[ "${platform}" == "Debian" && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-6.0_SOURCES
+    elif [[ "${platform}" == "Debian" && ${release} =~ ^8 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-8.0_SOURCES
+    fi
+  elif [[ ${salome_version} == "7.6.0" ]]; then
+    if [[ "${platform}" == "CentOS" ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_CentOS-6.3_SOURCES
+    elif [[ "${platform}" == "Debian" && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_Debian-6.0_SOURCES
     fi
   fi
 }
diff --git a/test.sh b/test.sh
new file mode 100755 (executable)
index 0000000..ec98d25
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Find absolute path to ROOT_DIR
+export ROOT_DIR=$(pwd)/..
+export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
+
+SRC_DIR=${ROOT_DIR}/sources
+
+BUILD_DIR=build
+INSTALL_DIR=install
+if [ $1 ]; then
+  BUILD_DIR=${BUILD_DIR}-$1
+  INSTALL_DIR=${INSTALL_DIR}-$1
+fi
+
+source ${SRC_DIR}/salome_env.sh
+source ${SRC_DIR}/linux_env.sh $1
+mkdir -p ${ROOT_DIR}/${BUILD_DIR}
+cd ${ROOT_DIR}/${BUILD_DIR}
+
+CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release"
+CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/${INSTALL_DIR}"
+CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
+
+ctest 
diff --git a/test_centos.sh b/test_centos.sh
new file mode 100755 (executable)
index 0000000..2efd8b9
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+test.sh centos
diff --git a/test_d6.sh b/test_d6.sh
new file mode 100755 (executable)
index 0000000..da6c624
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+test.sh d6