Restored versioncheck tests and fixed to work with no '.git' directory (#485)
This commit is contained in:
parent
5a2ccd9898
commit
04fac1cbbb
12
src/test/TEST_ij/versioncheck.jobs
Executable file
12
src/test/TEST_ij/versioncheck.jobs
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
||||||
|
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Check the version header file variables
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
mpirun -np 1 ./ij > versioncheck.out.1
|
||||||
|
|
||||||
35
src/test/TEST_ij/versioncheck.sh
Executable file
35
src/test/TEST_ij/versioncheck.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
||||||
|
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
TNAME=`basename $0 .sh`
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Check the HYPRE_DEVELOP variables
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
grep "Using HYPRE_DEVELOP_STRING" ${TNAME}.out.1 > ${TNAME}.testdata
|
||||||
|
|
||||||
|
if [ -d ../../../.git ]; then
|
||||||
|
DEVSTRING=`git describe --match 'v*' --long --abbrev=9`
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n > ${TNAME}.testdatacheck
|
||||||
|
fi
|
||||||
|
diff ${TNAME}.testdata ${TNAME}.testdatacheck >&2
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# remove temporary files
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
rm -f ${TNAME}.testdata*
|
||||||
12
src/test/TEST_sstruct/versioncheck.jobs
Executable file
12
src/test/TEST_sstruct/versioncheck.jobs
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
||||||
|
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Check the version header file variables
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
mpirun -np 1 ./sstruct > versioncheck.out.1
|
||||||
|
|
||||||
35
src/test/TEST_sstruct/versioncheck.sh
Executable file
35
src/test/TEST_sstruct/versioncheck.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
||||||
|
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
TNAME=`basename $0 .sh`
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Check the HYPRE_DEVELOP variables
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
grep "Using HYPRE_DEVELOP_STRING" ${TNAME}.out.1 > ${TNAME}.testdata
|
||||||
|
|
||||||
|
if [ -d ../../../.git ]; then
|
||||||
|
DEVSTRING=`git describe --match 'v*' --long --abbrev=9`
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n > ${TNAME}.testdatacheck
|
||||||
|
fi
|
||||||
|
diff ${TNAME}.testdata ${TNAME}.testdatacheck >&2
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# remove temporary files
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
rm -f ${TNAME}.testdata*
|
||||||
12
src/test/TEST_struct/versioncheck.jobs
Executable file
12
src/test/TEST_struct/versioncheck.jobs
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
||||||
|
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Check the version header file variables
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
mpirun -np 1 ./struct > versioncheck.out.1
|
||||||
|
|
||||||
35
src/test/TEST_struct/versioncheck.sh
Executable file
35
src/test/TEST_struct/versioncheck.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
||||||
|
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
TNAME=`basename $0 .sh`
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Check the HYPRE_DEVELOP variables
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
grep "Using HYPRE_DEVELOP_STRING" ${TNAME}.out.1 > ${TNAME}.testdata
|
||||||
|
|
||||||
|
if [ -d ../../../.git ]; then
|
||||||
|
DEVSTRING=`git describe --match 'v*' --long --abbrev=9`
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n > ${TNAME}.testdatacheck
|
||||||
|
fi
|
||||||
|
diff ${TNAME}.testdata ${TNAME}.testdatacheck >&2
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# remove temporary files
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
rm -f ${TNAME}.testdata*
|
||||||
Loading…
Reference in New Issue
Block a user