Remove '..' directory dependency in test Makefile (#487)
The 'test/Makefile' had the '..' directory in the include path, which caused the 'HYPRE_config.h' file to be included from two different places (in '..' and in 'install'). In the spack autotest, this caused a conflict. * Check that 'git describe' works in autoconf build * Updated versioncheck tests to work when 'git describe' fails * Updated CMake build to work when 'git describe' fails * Update autotest filters to ignore error messages from 'git describe'
This commit is contained in:
parent
5622749ab2
commit
aadfd86de4
@ -4,3 +4,4 @@ include/fortran_matrix.h
|
||||
include/multivector.h
|
||||
include/interpreter.h
|
||||
include/temp_multivector.h
|
||||
fatal: No names found, cannot describe anything.
|
||||
|
||||
1
AUTOTEST/cmake.filters
Normal file
1
AUTOTEST/cmake.filters
Normal file
@ -0,0 +1 @@
|
||||
fatal: No names found, cannot describe anything.
|
||||
@ -0,0 +1 @@
|
||||
fatal: No names found, cannot describe anything.
|
||||
@ -41,12 +41,16 @@ if (EXISTS ${HYPRE_SOURCE_DIR}/../.git)
|
||||
execute_process(COMMAND git -C ${HYPRE_SOURCE_DIR} rev-parse --abbrev-ref HEAD
|
||||
OUTPUT_VARIABLE develop_branch
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(HYPRE_DEVELOP_STRING ${develop_string})
|
||||
set(HYPRE_DEVELOP_NUMBER ${develop_number})
|
||||
if (develop_branch MATCHES "master")
|
||||
set(HYPRE_DEVELOP_BRANCH ${develop_branch})
|
||||
if (${develop_string} MATCHES ".*")
|
||||
set(HYPRE_DEVELOP_STRING ${develop_string})
|
||||
set(HYPRE_DEVELOP_NUMBER ${develop_number})
|
||||
if (develop_branch MATCHES "master")
|
||||
set(HYPRE_DEVELOP_BRANCH ${develop_branch})
|
||||
else ()
|
||||
message(STATUS "NOTE: On branch ${develop_branch}, not the main development branch")
|
||||
endif ()
|
||||
else ()
|
||||
message(STATUS "NOTE: On branch ${develop_branch}, not the main development branch")
|
||||
message(STATUS "NOTE: Could not describe development branch")
|
||||
endif ()
|
||||
else ()
|
||||
message(STATUS "NOTE: Could not find .git directory")
|
||||
|
||||
@ -106,16 +106,23 @@ AC_SUBST(HYPRE_BUGS)
|
||||
AC_SUBST(HYPRE_SRCDIR)
|
||||
|
||||
AC_CHECK_FILE([$HYPRE_SRCDIR/../.git],
|
||||
[develop_string=$(git -C $HYPRE_SRCDIR describe --match 'v*' --long --abbrev=9)
|
||||
develop_lastag=$(git -C $HYPRE_SRCDIR describe --match 'v*' --abbrev=0)
|
||||
develop_number=$(git -C $HYPRE_SRCDIR rev-list --count $develop_lastag..HEAD)
|
||||
develop_branch=$(git -C $HYPRE_SRCDIR rev-parse --abbrev-ref HEAD)
|
||||
AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_STRING, ["$develop_string"], [Develop branch string])
|
||||
AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_NUMBER, [$develop_number], [Develop branch commit number])
|
||||
AS_IF([test "x$develop_branch" = "xmaster"],
|
||||
[AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_BRANCH, ["$develop_branch"], [Main development branch?])],
|
||||
[AC_MSG_NOTICE([NOTE: On branch $develop_branch, not the main development branch])]
|
||||
)],
|
||||
[
|
||||
develop_string=$(git -C $HYPRE_SRCDIR describe --match 'v*' --long --abbrev=9)
|
||||
develop_lastag=$(git -C $HYPRE_SRCDIR describe --match 'v*' --abbrev=0)
|
||||
develop_number=$(git -C $HYPRE_SRCDIR rev-list --count $develop_lastag..HEAD)
|
||||
develop_branch=$(git -C $HYPRE_SRCDIR rev-parse --abbrev-ref HEAD)
|
||||
AS_IF([test -n "$develop_string"],
|
||||
[
|
||||
AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_STRING, ["$develop_string"], [Develop branch string])
|
||||
AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_NUMBER, [$develop_number], [Develop branch commit number])
|
||||
AS_IF([test "x$develop_branch" = "xmaster"],
|
||||
[AC_DEFINE_UNQUOTED(HYPRE_DEVELOP_BRANCH, ["$develop_branch"], [Main development branch?])],
|
||||
[AC_MSG_NOTICE([NOTE: On branch $develop_branch, not the main development branch])]
|
||||
)
|
||||
],
|
||||
[AC_MSG_NOTICE([NOTE: Could not describe development branch])]
|
||||
)
|
||||
],
|
||||
[AC_MSG_NOTICE([NOTE: Could not find .git directory])]
|
||||
)
|
||||
|
||||
|
||||
18
src/configure
vendored
18
src/configure
vendored
@ -2701,10 +2701,13 @@ eval ac_res=\$$as_ac_File
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
|
||||
$as_echo "$ac_res" >&6; }
|
||||
if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
|
||||
|
||||
develop_string=$(git -C $HYPRE_SRCDIR describe --match 'v*' --long --abbrev=9)
|
||||
develop_lastag=$(git -C $HYPRE_SRCDIR describe --match 'v*' --abbrev=0)
|
||||
develop_number=$(git -C $HYPRE_SRCDIR rev-list --count $develop_lastag..HEAD)
|
||||
develop_branch=$(git -C $HYPRE_SRCDIR rev-parse --abbrev-ref HEAD)
|
||||
develop_lastag=$(git -C $HYPRE_SRCDIR describe --match 'v*' --abbrev=0)
|
||||
develop_number=$(git -C $HYPRE_SRCDIR rev-list --count $develop_lastag..HEAD)
|
||||
develop_branch=$(git -C $HYPRE_SRCDIR rev-parse --abbrev-ref HEAD)
|
||||
if test -n "$develop_string"; then :
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HYPRE_DEVELOP_STRING "$develop_string"
|
||||
@ -2715,7 +2718,7 @@ cat >>confdefs.h <<_ACEOF
|
||||
#define HYPRE_DEVELOP_NUMBER $develop_number
|
||||
_ACEOF
|
||||
|
||||
if test "x$develop_branch" = "xmaster"; then :
|
||||
if test "x$develop_branch" = "xmaster"; then :
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HYPRE_DEVELOP_BRANCH "$develop_branch"
|
||||
@ -2726,6 +2729,13 @@ else
|
||||
$as_echo "$as_me: NOTE: On branch $develop_branch, not the main development branch" >&6;}
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: NOTE: Could not describe development branch" >&5
|
||||
$as_echo "$as_me: NOTE: Could not describe development branch" >&6;}
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: NOTE: Could not find .git directory" >&5
|
||||
$as_echo "$as_me: NOTE: Could not find .git directory" >&6;}
|
||||
|
||||
@ -14,7 +14,6 @@ CXXDEFS = -DNOFEI -DHYPRE_TIMING -DMPICH_SKIP_MPICXX
|
||||
|
||||
C_COMPILE_FLAGS = \
|
||||
-I$(srcdir)\
|
||||
-I$(srcdir)/..\
|
||||
-I${HYPRE_BUILD_DIR}/include\
|
||||
$(SUPERLU_INCLUDE)\
|
||||
$(DSUPERLU_INCLUDE)\
|
||||
@ -23,7 +22,6 @@ C_COMPILE_FLAGS = \
|
||||
|
||||
CXX_COMPILE_FLAGS = \
|
||||
-I$(srcdir)\
|
||||
-I$(srcdir)/..\
|
||||
-I$(srcdir)/../FEI_mv/fei-base\
|
||||
-I${HYPRE_BUILD_DIR}/include\
|
||||
$(SUPERLU_INCLUDE)\
|
||||
@ -33,7 +31,6 @@ CXX_COMPILE_FLAGS = \
|
||||
|
||||
F77_COMPILE_FLAGS = \
|
||||
-I$(srcdir)\
|
||||
-I$(srcdir)/..\
|
||||
-I${HYPRE_BUILD_DIR}/include\
|
||||
${CINCLUDES}
|
||||
|
||||
|
||||
@ -12,19 +12,20 @@ TNAME=`basename $0 .sh`
|
||||
|
||||
grep "Using HYPRE_DEVELOP_STRING" ${TNAME}.out.1 > ${TNAME}.testdata
|
||||
|
||||
echo -n > ${TNAME}.testdatacheck
|
||||
if [ -d ../../../.git ]; then
|
||||
DEVSTRING=`git describe --match 'v*' --long --abbrev=9`
|
||||
DEVSTRING=`git describe --match 'v*' --long --abbrev=9 2>/dev/null`
|
||||
DEVNUMBER=`echo $DEVSTRING | awk -F- '{print $2}'`
|
||||
DEVBRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
if [ "$DEVBRANCH" != "master" ]; then
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
else
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
if [ -n "$DEVSTRING" ]; then
|
||||
if [ "$DEVBRANCH" != "master" ]; then
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
else
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -n > ${TNAME}.testdatacheck
|
||||
fi
|
||||
diff ${TNAME}.testdata ${TNAME}.testdatacheck >&2
|
||||
|
||||
|
||||
@ -12,19 +12,20 @@ TNAME=`basename $0 .sh`
|
||||
|
||||
grep "Using HYPRE_DEVELOP_STRING" ${TNAME}.out.1 > ${TNAME}.testdata
|
||||
|
||||
echo -n > ${TNAME}.testdatacheck
|
||||
if [ -d ../../../.git ]; then
|
||||
DEVSTRING=`git describe --match 'v*' --long --abbrev=9`
|
||||
DEVSTRING=`git describe --match 'v*' --long --abbrev=9 2>/dev/null`
|
||||
DEVNUMBER=`echo $DEVSTRING | awk -F- '{print $2}'`
|
||||
DEVBRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
if [ "$DEVBRANCH" != "master" ]; then
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
else
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
if [ -n "$DEVSTRING" ]; then
|
||||
if [ "$DEVBRANCH" != "master" ]; then
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
else
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -n > ${TNAME}.testdatacheck
|
||||
fi
|
||||
diff ${TNAME}.testdata ${TNAME}.testdatacheck >&2
|
||||
|
||||
|
||||
@ -12,19 +12,20 @@ TNAME=`basename $0 .sh`
|
||||
|
||||
grep "Using HYPRE_DEVELOP_STRING" ${TNAME}.out.1 > ${TNAME}.testdata
|
||||
|
||||
echo -n > ${TNAME}.testdatacheck
|
||||
if [ -d ../../../.git ]; then
|
||||
DEVSTRING=`git describe --match 'v*' --long --abbrev=9`
|
||||
DEVSTRING=`git describe --match 'v*' --long --abbrev=9 2>/dev/null`
|
||||
DEVNUMBER=`echo $DEVSTRING | awk -F- '{print $2}'`
|
||||
DEVBRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
if [ "$DEVBRANCH" != "master" ]; then
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
else
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
if [ -n "$DEVSTRING" ]; then
|
||||
if [ "$DEVBRANCH" != "master" ]; then
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (not main development branch)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
else
|
||||
echo "Using HYPRE_DEVELOP_STRING: $DEVSTRING (main development branch $DEVBRANCH)" \
|
||||
> ${TNAME}.testdatacheck
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -n > ${TNAME}.testdatacheck
|
||||
fi
|
||||
diff ${TNAME}.testdata ${TNAME}.testdatacheck >&2
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user