05c7e605c01e595561c32690eb44a7512041e540 braney Wed Sep 23 09:34:08 2026 -0700 hubCheck: reject a bigBed type line that declares fewer than three fields, refs #36940 hgc already stops on "type bigBed 1" or "type bigBed 2", but hubCheck passed both, so a hub author only found out when a user clicked an item. Check the declared count against the minimum of three next to the existing check against the file's field count. A bare "type bigBed" does not reach this code and is unchanged. Adds a fieldCountTooFew test with bigBed 1 and bigBed 2 tracks. diff --git src/hg/utils/hubCheck/tests/makefile src/hg/utils/hubCheck/tests/makefile index 6e251d6b7a4..24ac7ce051b 100644 --- src/hg/utils/hubCheck/tests/makefile +++ src/hg/utils/hubCheck/tests/makefile @@ -1,21 +1,21 @@ kentSrc = ../../../.. include ../../../../inc/common.mk hubCheck = ${DESTBINDIR}/hubCheck -test:: one two errors supertrackChild genomesErrors badType badSubgroups autoScale noLongLabel badGroups goodGroups noCompositeGroup allowWarnings seqNameCheck noSeqNameCheck selfParent dotInName fieldCountMismatch relPath missingFile +test:: one two errors supertrackChild genomesErrors badType badSubgroups autoScale noLongLabel badGroups goodGroups noCompositeGroup allowWarnings seqNameCheck noSeqNameCheck selfParent dotInName fieldCountMismatch fieldCountTooFew relPath missingFile one: mkout -${hubCheck} input/hub1.txt > output/output1.txt diff expected/output1.txt output/output1.txt two: mkout -${hubCheck} input/hub2.txt > output/output2.txt 2> /dev/null diff expected/output2.txt output/output2.txt supertrackChild: mkout -${hubCheck} input/supertrackChild.txt > output/supertrackChild.txt 2> /dev/null diff expected/supertrackChild.txt output/supertrackChild.txt errors: mkout -${hubCheck} input/manyErrorsHub.txt > output/manyErrors.output.txt 2>/dev/null @@ -65,30 +65,34 @@ -${hubCheck} -noSeqNameCheck input/seqNameHub.txt > output/noSeqNameCheck.output.txt 2>/dev/null diff expected/noSeqNameCheck.output.txt output/noSeqNameCheck.output.txt selfParent: mkout -${hubCheck} input/selfParent.txt > output/selfParent.output.txt 2>/dev/null diff expected/selfParent.output.txt output/selfParent.output.txt dotInName: mkout -${hubCheck} input/dotInName.txt > output/dotInName.output.txt 2>/dev/null diff expected/dotInName.output.txt output/dotInName.output.txt fieldCountMismatch: mkout -cd input && ${hubCheck} fieldCountMismatch.txt > ../output/fieldCountMismatch.output.txt 2>/dev/null diff expected/fieldCountMismatch.output.txt output/fieldCountMismatch.output.txt +fieldCountTooFew: mkout + -cd input && ${hubCheck} fieldCountTooFew.txt > ../output/fieldCountTooFew.output.txt 2>/dev/null + diff expected/fieldCountTooFew.output.txt output/fieldCountTooFew.output.txt + # A hub reached by a relative path, with its data file in a subdirectory below # hub.txt. Deliberately NOT run from inside input/, because the point is to check # that the hub directory is prepended to bigDataUrl once and not twice. The # expected output is a field count mismatch, which hubCheck can only report if it # found and opened the file. relPath: mkout -${hubCheck} input/relPath/hub.txt > output/relPath.output.txt 2>/dev/null diff expected/relPath.output.txt output/relPath.output.txt # A bigDataUrl that does not exist has to be reported. hubCheck used to prune such a # track out of the list before it ever got checked, and then exited 0 saying nothing. missingFile: mkout -${hubCheck} input/relPath/missingFile.txt > output/missingFile.output.txt 2>/dev/null diff expected/missingFile.output.txt output/missingFile.output.txt