From 195e5c5e5697b3dd1dbf2ff1012da8396091b183 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 14 Oct 2019 07:15:36 -0400 Subject: [PATCH] configure: Save output from test modules compilation. Currently configure script doesn't support any logging mechanism. To make easy debugging possible, output from all failed compilation attempts is stored. Signed-off-by: Michal Mielewczyk --- configure.d/conf_framework | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.d/conf_framework b/configure.d/conf_framework index c679f20..7ad15ae 100644 --- a/configure.d/conf_framework +++ b/configure.d/conf_framework @@ -34,6 +34,7 @@ compile_module(){ config_file=$1 test_module_dir=$SCRIPTPATH/configure.d/${config_file}_dir + test_module_log=$SCRIPTPATH/configure.d/.${config_file}.log test_module_file=$test_module_dir/test_mod.c test_module_obj=$test_module_dir/test_mod.o @@ -54,12 +55,19 @@ compile_module(){ EOF ####################################### - make -C $test_module_dir KERNEL_DIR=${KERNEL_DIR} &> /dev/null + echo "### $2 ###" >> $test_module_log + + make -C $test_module_dir KERNEL_DIR=${KERNEL_DIR} &>> $test_module_log local ret=$? rm -Rf $test_module_dir + if [ $ret -eq 0 ] + then + rm -f $test_module_log + fi + return $ret }