[csw-devel] SF.net SVN: gar:[7745] csw/mgar/gar/v2-checkpkg/bin/checkpkg

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Dec 24 18:29:41 CET 2009


Revision: 7745
          http://gar.svn.sourceforge.net/gar/?rev=7745&view=rev
Author:   wahwah
Date:     2009-12-24 17:29:41 +0000 (Thu, 24 Dec 2009)

Log Message:
-----------
mGAR v2-checkpkg: delayed log file display from plugins

Modified Paths:
--------------
    csw/mgar/gar/v2-checkpkg/bin/checkpkg

Modified: csw/mgar/gar/v2-checkpkg/bin/checkpkg
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg	2009-12-24 17:18:41 UTC (rev 7744)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg	2009-12-24 17:29:41 UTC (rev 7745)
@@ -538,12 +538,16 @@
 	extra_options="--debug"
 fi
 debugmsg "plugindir: '$plugindir'"
+log_files=""
 if [[ -d "$plugindir" ]]; then
 	# echo plugin dir exists
 	for plugin in "${plugindir}"/checkpkg-*; do
 		if [[ -x "${plugin}" ]]; then
 			debugmsg "Executing: ${plugin} $extra_options -e \"${EXTRACTDIR}\" ${pkgnames}"
-			${plugin} $extra_options -e "${EXTRACTDIR}" ${pkgnames}
+			plugin_base_name=`basename ${plugin}`
+			plugin_log="${EXTRACTDIR}/${plugin_base_name}.log"
+			log_files="${log_files} ${plugin_log}"
+			${plugin} $extra_options -e "${EXTRACTDIR}" ${pkgnames} > "${plugin_log}" 2>&1
 			if [[ "$?" -ne 0 ]]; then
 				print "TEST: ${plugin} [FAIL]"
 				test_suite_ok=0
@@ -558,8 +562,22 @@
 	debugmsg "plugin dir does not exist"
 fi
 
+echo
+for log_file in ${log_files}; do
+	if [[ -s "${log_file}" ]]; then
+		echo "LOG START: ${log_file}"
+		echo
+		cat "${log_file}"
+		echo
+		echo "LOG END: ${log_file}"
+	fi
+done
+echo
+
 if [[ ${test_suite_ok} -ne 1 ]]; then
 	errmsg "One or more tests have failed."
+else
+	print "All tests were successful."
 fi
 
 print ""


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list