FEATURE: testHarness: improvements. Author: Martin Beaudoin. Merge: Henrik Rusche.

testHarness: adding the source code git revision number to the Build Name.

See here for an example:
http://openfoam-extend.sourceforge.net/CDash/index.php?project=foam-extend-3.1&date=2015-05-28
This commit is contained in:
Henrik Rusche 2015-06-01 18:06:50 +02:00
commit f83a771395
6 changed files with 22 additions and 49 deletions

View file

@ -124,6 +124,13 @@ if(GIT_FOUND)
OUTPUT_VARIABLE GIT_BRANCH_NAME
)
message("Git branch: ${GIT_BRANCH_NAME}")
# We also add the git rev number to the build name
EXEC_PROGRAM(git
ARGS rev-parse --short=12 HEAD
OUTPUT_VARIABLE GIT_REV_NUMBER
)
message("Git rev: ${GIT_REV_NUMBER}")
if (GIT_BRANCH_NAME STREQUAL "")
message("No git-branch. Mercurial?")
EXEC_PROGRAM(hg
@ -136,6 +143,7 @@ if(GIT_FOUND)
message("Git branch (mercurial): ${GIT_BRANCH_NAME}")
endif()
SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}")
SET(BUILDNAME "${BUILDNAME}-git-rev=${GIT_REV_NUMBER}")
endif()
# Some last minute cleanup

View file

@ -125,7 +125,7 @@ then
# Scotch 6.0.4
#
[ ! -z "$WM_THIRD_PARTY_USE_SCOTCH_604" ] && {
echo "Building Scotch 6.0.0"
echo "Building Scotch 6.0.4"
( rpm_make -p scotch-6.0.4 -s scotch-6.0.4.spec -u http://gforge.inria.fr/frs/download.php/file/34618/scotch_6.0.4.tar.gz )
}
# Scotch 6.0.0

View file

@ -1,44 +0,0 @@
diff -ruN scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib
--- scotch_6.0.0/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 1969-12-31 19:00:00.000000000 -0500
+++ scotch_6.0.0/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib 2010-10-31 15:44:58.000000000 -0400
@@ -0,0 +1,22 @@
+EXE =
+LIB = .dylib
+OBJ = .o
+
+MAKE = make
+AR = gcc
+ARFLAGS = -shared -dynamiclib -undefined dynamic_lookup -o
+
+CAT = cat
+CCS = gcc
+CCP = mpicc
+CCD = mpicc
+CFLAGS = -O3 -fPIC -DCOMMON_TIMING_OLD -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME
+LDFLAGS = -lz -lm
+LIBLDFLAGS = -dynamiclib -undefined dynamic_lookup
+CP = cp
+LEX = flex
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = ranlib
+YACC = bison -y
diff -ruN scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib scotch_5.1.10b/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib
--- scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2010-08-07 00:02:42.000000000 -07
--- scotch_6.0.0_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2011-09-06 17:46:49.000000000 +0100
+++ scotch_6.0.0/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2013-11-26 12:24:24.689990673 +0000
@@ -8,10 +8,10 @@
CAT = cat
CCS = gcc
CCP = mpicc
-CCD = gcc
-CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict
+CCD = mpicc -I$(MPI_HOME)/include
+CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -Xlinker --no-as-needed
CLIBFLAGS = -shared -fPIC
-LDFLAGS = -lz -lm -lrt
+LDFLAGS = -lpthread -lz -lm -lrt
CP = cp
LEX = flex -Pscotchyy -olex.yy.c
LN = ln

View file

@ -84,7 +84,7 @@ Patch1: scotch-6.0.4_patch_darwin
%{summary}
%prep
%setup -q -n %{name}_6.0.0
%setup -q -n %{name}_%{version}
%ifos darwin
%patch1 -p1

View file

@ -89,7 +89,8 @@ setenv WM_THIRD_PARTY_USE_METIS_510 1
setenv WM_THIRD_PARTY_USE_PARMGRIDGEN_10 1
setenv WM_THIRD_PARTY_USE_LIBCCMIO_261 1
setenv WM_THIRD_PARTY_USE_MESQUITE_212 1
setenv WM_THIRD_PARTY_USE_SCOTCH_604 1
#setenv WM_THIRD_PARTY_USE_SCOTCH_604 1
setenv WM_THIRD_PARTY_USE_SCOTCH_600 1
setenv WM_THIRD_PARTY_USE_PARMETIS_403 1
setenv WM_THIRD_PARTY_USE_PYFOAM_064 1
setenv WM_THIRD_PARTY_USE_HWLOC_1101 1

View file

@ -124,6 +124,13 @@ if(GIT_FOUND)
OUTPUT_VARIABLE GIT_BRANCH_NAME
)
message("Git branch: ${GIT_BRANCH_NAME}")
# We also add the git rev number to the build name
EXEC_PROGRAM(git
ARGS rev-parse --short=12 HEAD
OUTPUT_VARIABLE GIT_REV_NUMBER
)
message("Git rev: ${GIT_REV_NUMBER}")
if (GIT_BRANCH_NAME STREQUAL "")
message("No git-branch. Mercurial?")
EXEC_PROGRAM(hg
@ -136,6 +143,7 @@ if(GIT_FOUND)
message("Git branch (mercurial): ${GIT_BRANCH_NAME}")
endif()
SET(BUILDNAME "${BUILDNAME}-git-branch=${GIT_BRANCH_NAME}")
SET(BUILDNAME "${BUILDNAME}-git-rev=${GIT_REV_NUMBER}")
endif()
# Some last minute cleanup