Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Feb 2012 05:34:02 +0000 (UTC)
From:      Max Khon <fjoe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r231544 - in head: tools/regression/usr.bin/make/execution/joberr usr.bin/make
Message-ID:  <201202120534.q1C5Y2S1066951@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fjoe
Date: Sun Feb 12 05:34:01 2012
New Revision: 231544
URL: http://svn.freebsd.org/changeset/base/231544

Log:
  Include target names in diagnostic output.
  
  Submitted by:	Garrett Cooper

Modified:
  head/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1
  head/usr.bin/make/job.c

Modified: head/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1
==============================================================================
--- head/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1	Sun Feb 12 05:14:12 2012	(r231543)
+++ head/tools/regression/usr.bin/make/execution/joberr/expected.stdout.1	Sun Feb 12 05:34:01 2012	(r231544)
@@ -1,90 +1,90 @@
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
+*** [do-check-joberr] Error code 1
 Error: build failed
-*** Error code 1
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
-*** Error code 2 (ignored)
+*** [do-check-joberr] Error code 1
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)
+*** [check-joberr] Error code 2 (ignored)

Modified: head/usr.bin/make/job.c
==============================================================================
--- head/usr.bin/make/job.c	Sun Feb 12 05:14:12 2012	(r231543)
+++ head/usr.bin/make/job.c	Sun Feb 12 05:34:01 2012	(r231544)
@@ -954,17 +954,19 @@ JobFinish(Job *job, int *status)
 						lastNode = job->node;
 					}
 					fprintf(out,
-					    "*** Completed successfully\n");
+					    "*** [%s] Completed successfully\n",
+					    job->node->name);
 				}
 			} else {
 				if (usePipes && job->node != lastNode) {
 					MESSAGE(out, job->node);
 					lastNode = job->node;
 				}
-				fprintf(out, "*** Error code %d%s\n",
+				fprintf(out, "*** [%s] Error code %d%s\n",
+					job->node->name,
 					WEXITSTATUS(*status),
 					(job->flags & JOB_IGNERR) ?
-					"(ignored)" : "");
+					" (ignored)" : "");
 
 				if (job->flags & JOB_IGNERR) {
 					*status = 0;
@@ -1005,7 +1007,8 @@ JobFinish(Job *job, int *status)
 						MESSAGE(out, job->node);
 						lastNode = job->node;
 					}
-					fprintf(out, "*** Continued\n");
+					fprintf(out, "*** [%s] Continued\n",
+					    job->node->name);
 				}
 				if (!(job->flags & JOB_CONTINUING)) {
 					DEBUGF(JOB, ("Warning: process %jd was not "
@@ -1029,7 +1032,8 @@ JobFinish(Job *job, int *status)
 					lastNode = job->node;
 				}
 				fprintf(out,
-				    "*** Signal %d\n", WTERMSIG(*status));
+				    "*** [%s] Signal %d\n", job->node->name,
+				    WTERMSIG(*status));
 				fflush(out);
 			}
 		}
@@ -1056,7 +1060,8 @@ JobFinish(Job *job, int *status)
 			MESSAGE(out, job->node);
 			lastNode = job->node;
 		}
-		fprintf(out, "*** Stopped -- signal %d\n", WSTOPSIG(*status));
+		fprintf(out, "*** [%s] Stopped -- signal %d\n",
+		    job->node->name, WSTOPSIG(*status));
 		job->flags |= JOB_RESUME;
 		TAILQ_INSERT_TAIL(&stoppedJobs, job, link);
 		fflush(out);
@@ -3034,13 +3039,15 @@ Compat_RunCommand(LstNode *cmdNode, GNod
 			if (status == 0) {
 				return (0);
   			} else {
-				printf("*** Error code %d", status);
+				printf("*** [%s] Error code %d",
+				    gn->name, status);
   			}
 		} else if (WIFSTOPPED(reason)) {
 			status = WSTOPSIG(reason);
 		} else {
 			status = WTERMSIG(reason);
-			printf("*** Signal %d", status);
+			printf("*** [%s] Signal %d",
+			    gn->name, status);
   		}
   
 		if (ps.errCheck) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202120534.q1C5Y2S1066951>