284ccd608f06ac8c0222b56011aaf22bc7889d77
braney
  Sat Sep 26 12:12:04 2026 -0700
hg/lib tests: VCF INFO filters and colors, and trackHubSkipHubName on names with no second underscore, refs #37617, #37618, #38414

vcfInfoFilterTester reads a five-line VCF and builds each filter and color map from a
hand-made trackDb and cart: filter.*, filterText.* and filterValues.* on INFO fields and
on vep sub-fields, colorByInfo with the first-declared value winning, and the warning for
each setting the VCF header cannot support.  trackHubSkipHubNameTester checks where the
returned pointer lands before reading through it.

diff --git src/hg/lib/tests/makefile src/hg/lib/tests/makefile
index ad760a8ae3a..aead40b5610 100644
--- src/hg/lib/tests/makefile
+++ src/hg/lib/tests/makefile
@@ -15,31 +15,32 @@
 	${BIN_DIR}/binTest \
 	${BIN_DIR}/customTrackTester \
 	${BIN_DIR}/hgvsTester \
 	${BIN_DIR}/sqlCheck 
 # annoGratorTester is left out, like the annoGratorTest target below.  A commented
 # line inside the list above would comment out every entry after it, because the
 # backslash on the line before joins them into one line.
 
 ${BIN_DIR}/%: %.c ${MYLIBS}
 	@${MKDIR} ${BIN_DIR}
 	${CC} ${CC_PROG_OPTS} -o $@ $*.c ${MYLIBS} $L
 
 #test: binTest spDbTest hdbTest genePredTest pslReaderTest annoGratorTest customTrackTest hgvsTest
 test: binTest quickLiftTest sessionDataTest trashDirTest mallocTopPadTest \
 	hVarSubstHtmlTest dataVersionPathTest genarkLiftOverTest \
-	snapshotTypeTest sessionDirTest geoMirrorSelfTest asForDbTest spDbTest hdbTest genePredTest pslReaderTest customTrackTest hgvsTest
+	snapshotTypeTest sessionDirTest geoMirrorSelfTest asForDbTest vcfInfoFilterTest \
+	trackHubSkipHubNameTest spDbTest hdbTest genePredTest pslReaderTest customTrackTest hgvsTest
 	rm -r output
 	echo tested all
 
 mkdirs:
 	@${MKDIR} output ${BIN_DIR}
 
 loaders:
 	ln -sf ${CGI_BIN}/loader .
 
 spDbTest: ${BIN_DIR}/spDbTest mkdirs
 	${BIN_DIR}/spDbTest sp121210 Q9FFH7 > output/spDbTest
 	${BIN_DIR}/spDbTest sp121210 P29312 >> output/spDbTest
 	diff expected/spDbTest output/spDbTest
 
 hdbTest: ${BIN_DIR}/hdbTest mkdirs
@@ -160,21 +161,33 @@
 	echo "central.db=hgcentralregress" >> output/regress.conf
 	echo "login.cookieSalt=testSaltForRegressRuns" >> output/regress.conf
 	HGDB_CONF=output/regress.conf ${BIN_DIR}/hubSpaceKeysTester > output/hubSpaceKeysTest
 	diff expected/hubSpaceKeysTest output/hubSpaceKeysTest
 # It runs as soon as central.user has UPDATE and DELETE on hgcentralregress; see
 # makeHgCentralRegress.sh for the grant.  Add it to the test target on that day.
 
 # The conf a CGI reads, not the developer's own: isGenArk() needs genarkHubPrefix, which is
 # set in the shared one.
 asForDbTest: mkdirs
 	${CC} ${CC_PROG_OPTS} -o ${BIN_DIR}/asForDbTester asForDbTester.c ${MYLIBS} $L
 	echo "include /usr/local/apache/cgi-bin/hg.conf" > output/genark.conf
 	HGDB_CONF=output/genark.conf ${BIN_DIR}/asForDbTester > output/asForDbTest 2>&1
 	diff expected/asForDbTest output/asForDbTest
 
+# The warnings for filters a VCF cannot support are part of what is checked, so the tester
+# prints them in line with its other output rather than on stderr.
+vcfInfoFilterTest: mkdirs
+	${CC} ${CC_PROG_OPTS} -o ${BIN_DIR}/vcfInfoFilterTester vcfInfoFilterTester.c ${MYLIBS} $L
+	${BIN_DIR}/vcfInfoFilterTester > output/vcfInfoFilterTest
+	diff expected/vcfInfoFilterTest output/vcfInfoFilterTest
+
+trackHubSkipHubNameTest: mkdirs
+	${CC} ${CC_PROG_OPTS} -o ${BIN_DIR}/trackHubSkipHubNameTester trackHubSkipHubNameTester.c ${MYLIBS} $L
+	${BIN_DIR}/trackHubSkipHubNameTester > output/trackHubSkipHubNameTest
+	diff expected/trackHubSkipHubNameTest output/trackHubSkipHubNameTest
+
 sqlCheck: ${BIN_DIR}/sqlCheck mkdirs
 	${MAKE} -f sqlCheck.mk test BIN_DIR=${BIN_DIR} OUT_DIR=output
 
 
 clean:
 	rm -rf *.o bin output *.tmp loader udcCache