@@ -82,6 +82,37 @@ function para_run_legacy {
8282# Export functions for use with `parallel` below.
8383export -f para_run_legacy run_legacy _time
8484
85+ function verify_make_source_tree {
86+ # The agent and server-side sub-trees have individual ways to create the
87+ # source tree for a tar ball. This function executes that step for the
88+ # given sub-tree.
89+ #
90+ # Arguments:
91+ # _major -- Name of the sub-tree to execute the "make install"
92+ #
93+ # Returns the exit status of the "make install" execution, or the exit
94+ # status dependent command steps (e.g. make, cd, etc.).
95+ local _major=${1}
96+ local _rc
97+
98+ if [[ ! -d ${_toxenvdir} /src ]]; then
99+ mkdir ${_toxenvdir} /src || return ${?}
100+ fi
101+ local _dir=${_toxenvdir} /src/${_major}
102+ rm -rf ${_dir}
103+ mkdir ${_dir} || return ${?}
104+
105+ printf -- " \n\n\nVerifying %s source tree build\n\n" " ${_major^} "
106+ (cd ${_major} && make DESTDIR=${_dir} install)
107+ _rc=${?}
108+ if [[ ${_rc} -ne 0 ]]; then
109+ printf -- " \n%s source tree build failed with '%s'\n\n" " ${_major^} " " ${_rc} "
110+ else
111+ printf -- " \n%s source tree build succeeded\n\n" " ${_major^} "
112+ fi
113+ return ${_rc}
114+ }
115+
85116rc=0
86117
87118if [[ -n " ${COV_REPORT_XML} " ]]; then
@@ -128,6 +159,9 @@ trap "rm -f ${_para_jobs_file}" EXIT INT TERM
128159
129160let count=0
130161for _major in ${major_list} ; do
162+ # Verify the Agent or Server Makefile functions correctly.
163+ verify_make_source_tree ${_major} || rc=1
164+
131165 if [[ " ${_major} " == " agent" ]]; then
132166 # The parallel program is really cool. The usage of `parallel` is
133167 # internal and automated; only test code depends on this tool, and we,
@@ -151,7 +185,7 @@ for _major in ${major_list}; do
151185 run_legacy ${_major} bin ${posargs} || rc=1
152186 fi
153187 else
154- printf -- " Logic bomb! Unrecognized major test sub-set, '%s'\n" " ${_major} " >&2
188+ printf -- " Error - unrecognized major test sub-set, '%s'\n" " ${_major} " >&2
155189 rc=1
156190 fi
157191done
0 commit comments