Fossil SCM

Split the artifact-parse failure count from the overall failure count in test-integrity.

stephan 2026-11-13 15:41 UTC trunk
Commit 593fb3f7e1aa24d36ccc58e4de3d4c89bf682acafc3b203417e19aad56198f71
1 file changed +4 -1
+4 -1
--- src/content.c
+++ src/content.c
@@ -1005,10 +1005,11 @@
10051005
int n1 = 0;
10061006
int n2 = 0;
10071007
int nErr = 0;
10081008
int total;
10091009
int nCA = 0;
1010
+ int nParseErr = 0; /* Number of --parse failures */
10101011
int nPhantom = 0;
10111012
int anCA[10];
10121013
int bParse = find_option("parse",0,0)!=0;
10131014
int bDbOnly = find_option("db-only","d",0)!=0;
10141015
int bQuick = find_option("quick",0,0)!=0;
@@ -1087,12 +1088,13 @@
10871088
for(i=0; i<n && z[i] && z[i]!='\n' && i<(int)sizeof(zFirstLine)-1; i++){}
10881089
memcpy(zFirstLine, z, i);
10891090
zFirstLine[i] = 0;
10901091
p = manifest_parse(&content, 0, &err);
10911092
if( p==0 ){
1092
- fossil_print("manifest_parse failed for %s:\n%s\n",
1093
+ fossil_print("\nmanifest_parse failed for %s:\n%s\n",
10931094
zUuid, blob_str(&err));
1095
+ nParseErr++;
10941096
if( strncmp(blob_str(&err), "line 1:", 7)==0 ){
10951097
fossil_print("\"%s\"\n", zFirstLine);
10961098
}
10971099
}else{
10981100
anCA[p->type]++;
@@ -1114,10 +1116,11 @@
11141116
}
11151117
if( bParse ){
11161118
static const char *const azType[] = { 0, "manifest", "cluster",
11171119
"control", "wiki", "ticket", "attachment", "event" };
11181120
int i;
1121
+ fossil_print("%d control artifacts failed to parse\n", nParseErr);
11191122
fossil_print("%d total control artifacts\n", nCA);
11201123
for(i=1; i<count(azType); i++){
11211124
if( anCA[i] ) fossil_print(" %d %ss\n", anCA[i], azType[i]);
11221125
}
11231126
}
11241127
--- src/content.c
+++ src/content.c
@@ -1005,10 +1005,11 @@
1005 int n1 = 0;
1006 int n2 = 0;
1007 int nErr = 0;
1008 int total;
1009 int nCA = 0;
 
1010 int nPhantom = 0;
1011 int anCA[10];
1012 int bParse = find_option("parse",0,0)!=0;
1013 int bDbOnly = find_option("db-only","d",0)!=0;
1014 int bQuick = find_option("quick",0,0)!=0;
@@ -1087,12 +1088,13 @@
1087 for(i=0; i<n && z[i] && z[i]!='\n' && i<(int)sizeof(zFirstLine)-1; i++){}
1088 memcpy(zFirstLine, z, i);
1089 zFirstLine[i] = 0;
1090 p = manifest_parse(&content, 0, &err);
1091 if( p==0 ){
1092 fossil_print("manifest_parse failed for %s:\n%s\n",
1093 zUuid, blob_str(&err));
 
1094 if( strncmp(blob_str(&err), "line 1:", 7)==0 ){
1095 fossil_print("\"%s\"\n", zFirstLine);
1096 }
1097 }else{
1098 anCA[p->type]++;
@@ -1114,10 +1116,11 @@
1114 }
1115 if( bParse ){
1116 static const char *const azType[] = { 0, "manifest", "cluster",
1117 "control", "wiki", "ticket", "attachment", "event" };
1118 int i;
 
1119 fossil_print("%d total control artifacts\n", nCA);
1120 for(i=1; i<count(azType); i++){
1121 if( anCA[i] ) fossil_print(" %d %ss\n", anCA[i], azType[i]);
1122 }
1123 }
1124
--- src/content.c
+++ src/content.c
@@ -1005,10 +1005,11 @@
1005 int n1 = 0;
1006 int n2 = 0;
1007 int nErr = 0;
1008 int total;
1009 int nCA = 0;
1010 int nParseErr = 0; /* Number of --parse failures */
1011 int nPhantom = 0;
1012 int anCA[10];
1013 int bParse = find_option("parse",0,0)!=0;
1014 int bDbOnly = find_option("db-only","d",0)!=0;
1015 int bQuick = find_option("quick",0,0)!=0;
@@ -1087,12 +1088,13 @@
1088 for(i=0; i<n && z[i] && z[i]!='\n' && i<(int)sizeof(zFirstLine)-1; i++){}
1089 memcpy(zFirstLine, z, i);
1090 zFirstLine[i] = 0;
1091 p = manifest_parse(&content, 0, &err);
1092 if( p==0 ){
1093 fossil_print("\nmanifest_parse failed for %s:\n%s\n",
1094 zUuid, blob_str(&err));
1095 nParseErr++;
1096 if( strncmp(blob_str(&err), "line 1:", 7)==0 ){
1097 fossil_print("\"%s\"\n", zFirstLine);
1098 }
1099 }else{
1100 anCA[p->type]++;
@@ -1114,10 +1116,11 @@
1116 }
1117 if( bParse ){
1118 static const char *const azType[] = { 0, "manifest", "cluster",
1119 "control", "wiki", "ticket", "attachment", "event" };
1120 int i;
1121 fossil_print("%d control artifacts failed to parse\n", nParseErr);
1122 fossil_print("%d total control artifacts\n", nCA);
1123 for(i=1; i<count(azType); i++){
1124 if( anCA[i] ) fossil_print(" %d %ss\n", anCA[i], azType[i]);
1125 }
1126 }
1127

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button