# function library for Comfignat's testcases # Copyright 2013 B. Persson, Bjorn@Rombobeorn.se # # This material is provided as is, with absolutely no warranty expressed # or implied. Any use is at your own risk. # # Permission is hereby granted to use or copy this testsuite # for any purpose, provided the above notices are retained on all copies. # Permission to modify the code and to distribute modified code is granted, # provided the above notices are retained, and a notice that the code was # modified is included with the above copyright notice. common_setup () { # When the locations file specifies a separate build directory, initialize # the build directory and go there. When the source directory is also the # build directory, just go to that directory. cd "${srcdir}" if [ "${relative_builddir}" != . ] ; then echo "${builddir}"/Makefile >>"${file_list}" make configure builddir="${relative_builddir}" cd "${relative_builddir}" fi } expect_configuration () { # If "always" is passed, the testcase is always expected to leave a # configuration file. If this is called without "always", a configuration # file is expected only in a separate build directory. if [ "$1" = always -o "${relative_builddir}" != . ] ; then echo "${builddir}"/comfignat_configuration.mk >>"${file_list}" fi }