Fossil SCM
Split the artifact-parse failure count from the overall failure count in test-integrity.
Commit
593fb3f7e1aa24d36ccc58e4de3d4c89bf682acafc3b203417e19aad56198f71
Parent
ab59ac7f9f2fdae…
1 file changed
+4
-1
+4
-1
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -1005,10 +1005,11 @@ | ||
| 1005 | 1005 | int n1 = 0; |
| 1006 | 1006 | int n2 = 0; |
| 1007 | 1007 | int nErr = 0; |
| 1008 | 1008 | int total; |
| 1009 | 1009 | int nCA = 0; |
| 1010 | + int nParseErr = 0; /* Number of --parse failures */ | |
| 1010 | 1011 | int nPhantom = 0; |
| 1011 | 1012 | int anCA[10]; |
| 1012 | 1013 | int bParse = find_option("parse",0,0)!=0; |
| 1013 | 1014 | int bDbOnly = find_option("db-only","d",0)!=0; |
| 1014 | 1015 | int bQuick = find_option("quick",0,0)!=0; |
| @@ -1087,12 +1088,13 @@ | ||
| 1087 | 1088 | for(i=0; i<n && z[i] && z[i]!='\n' && i<(int)sizeof(zFirstLine)-1; i++){} |
| 1088 | 1089 | memcpy(zFirstLine, z, i); |
| 1089 | 1090 | zFirstLine[i] = 0; |
| 1090 | 1091 | p = manifest_parse(&content, 0, &err); |
| 1091 | 1092 | 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", | |
| 1093 | 1094 | zUuid, blob_str(&err)); |
| 1095 | + nParseErr++; | |
| 1094 | 1096 | if( strncmp(blob_str(&err), "line 1:", 7)==0 ){ |
| 1095 | 1097 | fossil_print("\"%s\"\n", zFirstLine); |
| 1096 | 1098 | } |
| 1097 | 1099 | }else{ |
| 1098 | 1100 | anCA[p->type]++; |
| @@ -1114,10 +1116,11 @@ | ||
| 1114 | 1116 | } |
| 1115 | 1117 | if( bParse ){ |
| 1116 | 1118 | static const char *const azType[] = { 0, "manifest", "cluster", |
| 1117 | 1119 | "control", "wiki", "ticket", "attachment", "event" }; |
| 1118 | 1120 | int i; |
| 1121 | + fossil_print("%d control artifacts failed to parse\n", nParseErr); | |
| 1119 | 1122 | fossil_print("%d total control artifacts\n", nCA); |
| 1120 | 1123 | for(i=1; i<count(azType); i++){ |
| 1121 | 1124 | if( anCA[i] ) fossil_print(" %d %ss\n", anCA[i], azType[i]); |
| 1122 | 1125 | } |
| 1123 | 1126 | } |
| 1124 | 1127 |
| --- 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 |