mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-31 16:46:03 +01:00
Added tests
This commit is contained in:
parent
90474fee2d
commit
a4e49f4939
@ -50,6 +50,11 @@ qmckl_f = $(srcdir)/share/qmckl/fortran/qmckl_f.f90
|
|||||||
fortrandir = $(datadir)/$(PACKAGE_NAME)/fortran/
|
fortrandir = $(datadir)/$(PACKAGE_NAME)/fortran/
|
||||||
fortran_DATA = $(qmckl_f)
|
fortran_DATA = $(qmckl_f)
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = src/libqmckl.la
|
||||||
|
src_libqmckl_la_CPPFLAGS = -I$(srcdir)/src -I$(srcdir)/include
|
||||||
|
src_libqmckl_la_SOURCES = $(qmckl_h) $(qmckl_f) $(C_FILES) $(F_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES)
|
||||||
|
|
||||||
|
|
||||||
export srcdir qmckl_f qmckl_h
|
export srcdir qmckl_f qmckl_h
|
||||||
|
|
||||||
|
|
||||||
@ -58,7 +63,7 @@ if QMCKL_DEVEL
|
|||||||
dist_src_DATA = $(ORG_FILES)
|
dist_src_DATA = $(ORG_FILES)
|
||||||
|
|
||||||
BUILT_SOURCES = $(C_FILES) $(F_FILES) $(FH_FUNC_FILES) $(FH_TYPE_FILES) $(H_FUNC_FILES) $(H_TYPE_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES)
|
BUILT_SOURCES = $(C_FILES) $(F_FILES) $(FH_FUNC_FILES) $(FH_TYPE_FILES) $(H_FUNC_FILES) $(H_TYPE_FILES) $(H_PRIVATE_FUNC_FILES) $(H_PRIVATE_TYPE_FILES)
|
||||||
CLEANFILES += $(BUILT_SOURCES) $(C_TEST_FILES) $(F_TEST_FILES) $(TANGLED_FILES)
|
CLEANFILES += $(BUILT_SOURCES) $(C_TEST_FILES) $(F_TEST_FILES) $(TANGLED_FILES) $(C_TEST_FILES) $(F_TEST_FILES)
|
||||||
|
|
||||||
# ----->
|
# ----->
|
||||||
endif
|
endif
|
||||||
|
@ -38,7 +38,7 @@ AC_PREREQ([2.69])
|
|||||||
AC_INIT([QMCkl],[0.1.1],
|
AC_INIT([QMCkl],[0.1.1],
|
||||||
[https://github.com/TREX-CoE/qmckl/issues], [],
|
[https://github.com/TREX-CoE/qmckl/issues], [],
|
||||||
[https://trex-coe.github.io/qmckl/index.html])
|
[https://trex-coe.github.io/qmckl/index.html])
|
||||||
AM_INIT_AUTOMAKE([color-tests parallel-tests silent-rules 1.11])
|
AM_INIT_AUTOMAKE([subdir-objects color-tests parallel-tests silent-rules 1.11])
|
||||||
AM_MAINTAINER_MODE()
|
AM_MAINTAINER_MODE()
|
||||||
LT_INIT
|
LT_INIT
|
||||||
AC_CONFIG_SRCDIR([Makefile.in])
|
AC_CONFIG_SRCDIR([Makefile.in])
|
||||||
|
@ -15,7 +15,7 @@ function make_src()
|
|||||||
|
|
||||||
cd ${srcdir}
|
cd ${srcdir}
|
||||||
|
|
||||||
declare -A DEPS DEPS_ORG
|
declare -A DEPS DEPS_ORG DEPS_TEST
|
||||||
|
|
||||||
C_FILES=
|
C_FILES=
|
||||||
F_FILES=
|
F_FILES=
|
||||||
@ -30,15 +30,15 @@ function make_src()
|
|||||||
TANGLED_FILES=
|
TANGLED_FILES=
|
||||||
|
|
||||||
for org in org/*.org ; do
|
for org in org/*.org ; do
|
||||||
tangled="\$(srcdir)/${org%.org}.tangled"
|
i=$(basename ${org%.org})
|
||||||
|
tangled="\$(srcdir)/org/${i}.tangled"
|
||||||
i=${org%.org}
|
|
||||||
c_test_o="\$(srcdir)/src/test_${i}.o"
|
c_test_o="\$(srcdir)/src/test_${i}.o"
|
||||||
f_test_o="\$(srcdir)/src/test_${i}_f.o"
|
f_test_o="\$(srcdir)/src/test_${i}_f.o"
|
||||||
c_test="\$(srcdir)/src/test_${i}.c"
|
c_test="\$(srcdir)/src/test_${i}.c"
|
||||||
f_test="\$(srcdir)/src/test_${i}_f.f90"
|
f_test="\$(srcdir)/src/test_${i}_f.f90"
|
||||||
|
|
||||||
i="\$(srcdir)/src/${i#org/}"
|
i="\$(srcdir)/src/${i}"
|
||||||
|
|
||||||
c="${i}.c"
|
c="${i}.c"
|
||||||
o="${i}.o"
|
o="${i}.o"
|
||||||
h_func="${i}_func.h"
|
h_func="${i}_func.h"
|
||||||
@ -113,16 +113,16 @@ function make_src()
|
|||||||
|
|
||||||
grep -q "(eval c_test)" $org
|
grep -q "(eval c_test)" $org
|
||||||
if [[ $? -eq 0 ]] ; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
DEPS["$c_test"]="${tangled} "
|
DEPS_TEST["${c_test}"]="${tangled} "
|
||||||
DEPS["$c_test_o"]+=" $c_test $o"
|
DEPS_TEST["${c_test_o}"]+=" ${c_test} $o"
|
||||||
C_TEST_FILES+=" $c_test"
|
C_TEST_FILES+=" ${c_test}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
grep -q "(eval f_test)" $org
|
grep -q "(eval f_test)" $org
|
||||||
if [[ $? -eq 0 ]] ; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
DEPS["$f_test"]+="${tangled} "
|
DEPS_TEST["${f_test}"]+="${tangled} "
|
||||||
DEPS["$f_test_o"]+=" $f_test $fo"
|
DEPS_TEST["${f_test_o}"]+=" ${f_test} $fo"
|
||||||
F_TEST_FILES+=" $f_test"
|
F_TEST_FILES+=" ${f_test}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -187,7 +187,14 @@ function make_src()
|
|||||||
echo "## Source dependencies" >> ${OUTPUT}
|
echo "## Source dependencies" >> ${OUTPUT}
|
||||||
echo >> ${OUTPUT}
|
echo >> ${OUTPUT}
|
||||||
for f in ${!DEPS[@]} ; do
|
for f in ${!DEPS[@]} ; do
|
||||||
echo ${f}: ${DEPS[$f]}
|
echo "${f}: ${DEPS[$f]}"
|
||||||
|
done | sort >> ${OUTPUT}
|
||||||
|
|
||||||
|
echo >> ${OUTPUT}
|
||||||
|
echo "## Test files" >> ${OUTPUT}
|
||||||
|
echo >> ${OUTPUT}
|
||||||
|
for f in ${!DEPS_TEST[@]} ; do
|
||||||
|
echo "${f}: ${DEPS_TEST[$f]} \$(qmckl_h) \$(srcdir)/src/libqmckl.la"
|
||||||
done | sort >> ${OUTPUT}
|
done | sort >> ${OUTPUT}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user