5011b739391b6a1b6129d473b6c050010baf1f6f braney Sat Sep 19 17:57:37 2026 -0700 testRegistry: a registry of which unit test defends which ticket A bug ticket has no way to say whether a test now defends its fix, and a test has no way to say which bug it came from. The two questions are asked from opposite ends and neither the tree nor Redmine answers either one. utils/testRegistry/registry.tsv is that table, hand written, one row per ticket per test, starting at v504. Unit tests only: the browser-page regression tests are the docent suite, refs #38252, which already names each script for its ticket, and a docent column here says which ticket has one of those too. Each row says why a unit test is the right test, because "the fix is in a library file" is wrong in both directions. A wording fix in hg/lib needs no unit test, and a performance rewrite inside hgTracks needs one badly, since nothing else can tell that the slow path has come back. The three reasons are invisible, perf and library, and a perf row says what has to be measured -- queries, passes, allocations, bytes -- never wall-clock seconds. testRegistry reads it: ticket, test, release, why, needed, unwatched, tickets, check. No network and no database, so the check can run anywhere. check is why the table is checked in rather than derived. A registry that quietly names files nobody has, saying a bug is covered when it is not, is worse than no registry, so check fails the build the day a row rots. Its own tests are in tests/, with one row of input/bad.tsv per complaint check can make, and utils/makefile runs the whole thing so it reaches make test from src. Today: 37 tickets, 12 covered by 11 tests, 25 waiting. refs #38391 diff --git src/utils/makefile src/utils/makefile index dc0f4d9b9d2..56cbea02d95 100644 --- src/utils/makefile +++ src/utils/makefile @@ -1,303 +1,307 @@ # Build all directories in utils kentSrc = .. include ${kentSrc}/inc/localEnvironment.mk include ${kentSrc}/inc/common.mk # note: lists such as the following need to be defined *before* # they are used in the wildcard target rules. An oddity of gnu make # define the list of user applications to build # These will be distributed as part of the user apps build and we provide them # as binaries and collect usage messages # These are C programs, so make clean will be run UTILS_APPLIST = \ addCols \ ave \ aveCols \ bamToPsl \ bedClip \ bedGraphToBigWig \ bedJoinTabOffset \ bedToBigBed \ bigBedInfo \ bigBedNamedItems \ bigBedSummary \ bigBedToBed \ bedCommonRegions \ bedGeneParts \ bedGraphPack \ bedPileUps \ bedRemoveOverlap \ bedRestrictToPositions \ bigWigAverageOverBed \ bigWigCat \ bigWigCorrelate \ bigWigCluster \ bigWigInfo \ bigWigMerge \ bigWigSummary \ bigWigToBedGraph \ bigWigToWig \ calc \ catDir \ catUncomment \ chopFaLines \ colTransform \ countChars \ endsInLf \ clusterMatrixToBarChartBed \ cpgIslandExt \ faAlign \ fastqToFa \ fastqStatsAndSubsample \ faCmp \ faCount \ faFilterN \ faFilter \ faFrag \ faNoise \ faOneRecord \ faPolyASizes \ faRandomize \ faRc \ faSize \ faSomeRecords \ faSplit \ faToFastq \ faToTab \ faToTwoBit \ faTrans \ findMotif \ headRest \ htmlCheck \ matrixClusterColumns \ matrixMarketToTsv \ matrixNormalize \ matrixToBarChartBed \ newProg \ newPythonProg \ nibFrag \ nibSize \ paraFetch \ paraSync \ pslMap \ pslMapPostChain \ pslPosTarget \ pslProtToRnaCoords \ pslRc \ pslRemoveFrameShifts \ pslScore \ pslSpliceJunctions \ pslSwap \ pslToPslx \ randomLines \ raToTab \ raToLines \ rmFaDups \ rowsToCols \ sizeof \ spacedToTab \ splitFile \ splitFileByColumn \ strexCalc \ stringify \ subChar \ subColumn \ tabFmt \ tailLines \ textHistogram \ tickToDate \ timing \ toLower \ toUpper \ trackDbIndexBb \ twoBitDup \ twoBitInfo \ twoBitToFa \ wigCorrelate \ wigToBigWig \ wordLine \ # list of utilities to build of interest only at UCSC # These are C tools and will run a make clean on each # These are not part of the user apps build. UCSC_APPS = \ addCols \ aNotB \ aveCols \ ccCp \ convolve \ detab \ dnsInfo \ faFlyBaseToUcsc \ faGapLocs \ faGapSizes \ faNcbiToUcsc \ faRenameRecords \ faSimplify \ faToNib \ faTrimPolyA \ faTrimRead \ fixCr \ gapSplit \ gitTools \ gffPeek \ git-reports \ htmlPics \ jkUniq \ lineCount \ nt4Frag \ pslToXa \ scrambleFa \ subs \ tabToMmHash \ tableSum \ textHist2 \ udcCleanup \ undupFa \ upper \ vcfFilter \ venn \ verticalSplitSqlTable \ weedLines # These are parts of the user apps build, so they will land on hgdownload # These are not C programs, so no clean up USER_APP_SCRIPTS = \ bedJoinTabOffset.py \ expMatrixToBarchartBed \ barChartMaxLimit \ ucscApiClient \ tdbRename \ tdbSort \ webSync \ chromToUcsc \ bigHeat \ bigGuessDb \ hubtools # Scripts that are not distributed outside of UCSC # They are not part of the user-apps build SCRIPT_FILES = \ agpToLift \ apacheLogParse \ bedCollapse.pl \ bedFixBlockOverlaps \ bedOverlapMerge \ bedSingleCover.pl \ bedBetween \ doLocusName \ extToolsChromeParse \ iSync \ lodToBedScore \ matrixMerge \ mkMafFrames.pl \ patSeqFilterBulkAndAnnotate \ patSeqSummarizeDocs \ pslProtCnv \ pslSameGene \ tabRepl \ uniprotToTab \ ggTables \ ggGeneClasses \ ggGpmlToTab \ ggKgmlToTab \ ggMsrToTab \ ggPidToTab \ ggPpiToTab \ genePredCompare \ ggSpfToTab \ bedNamePickFirst \ bedBestTranscript \ genePredToBed \ cgiSmokeTest \ phegenToBed \ bigMaxPercDiff \ cancerMafToBigBed \ pq \ bedAppendPaperInfo \ googleSheetToBigBed \ doClinvarLift \ codeReviewAi.py \ redmineCli \ browserRace \ ts \ ${USER_APP_SCRIPTS} # List of all directories to build ALL_APPS = $(UTILS_APPLIST) $(UCSC_APPS) # all: builds all utilities here all: $(ALL_APPS:%=%.all) $(USER_APP_SCRIPTS:%=%.userAppScript) %.all: cd $* && echo $* && $(MAKE) # userApps: builds the user application specific programs .PHONY: userApps userApps: $(UTILS_APPLIST:%=%.userApp) $(USER_APP_SCRIPTS:%=%.userAppScript) %.userApp: cd $* && echo $* && $(MAKE) %.userAppScript: @rm -f ${DESTDIR}${BINDIR}/$* @if test -d $* ; \ then \ chmod +x $*/$*; \ echo cp -p $*/$* ${DESTDIR}${BINDIR}; \ cp -p $*/$* ${DESTDIR}${BINDIR}; \ else \ chmod +x $*; \ echo cp -p $*/$* ${DESTDIR}${BINDIR}; \ cp -p $* ${DESTDIR}${BINDIR}/$*; \ fi scripts: $(SCRIPT_FILES:%=%.scripts) %.scripts: @rm -f ${SCRIPTS}/$* @if test -d $* ; \ then \ chmod +x $*/$*; \ echo cp -p $*/$* ${SCRIPTS}; \ cp -p $*/$* ${SCRIPTS}; \ else \ chmod +x $*; \ echo cp -p $* ${SCRIPTS}; \ cp -p $* ${SCRIPTS}; \ fi testAll: $(ALL_APPS:%=%.testAll) %.testAll: @test -s $*/tests/makefile && (echo $*; cd $* && $(MAKE) test) || true test: testAll cd faToTwoBit && ${MAKE} test cd twoBitToFa && ${MAKE} test cd twoBitInfo && ${MAKE} test cd bedGeneParts && ${MAKE} test +# testRegistry is not an app, so the testAll rule above cannot reach it. Its test checks +# that every row of the ticket-to-test registry still names a test that is in the tree, +# refs #38391. + cd testRegistry && ${MAKE} test clean: $(ALL_APPS:%=%.clean) touch non-empty-rm.o - find . -name \*.o -print | xargs rm %.clean: cd $* && echo $* && $(MAKE) clean BAD_DIRS= \ ccCpLock \ est2genomeToPsl \ geneStarts \ jimgrep \ jkShell \ wigAsciiToBinary \ cCp