c80f2909a9df53021fb01b455b122414ad73c961 braney Sun Sep 20 06:51:14 2026 -0700 move bedItemRgbTester to hg/cgilib/tests, beside the code it tests I said in the last commit that hg/cgilib had no tests directory. It does, and I should have looked rather than inferred. bedCart.c lives in hg/cgilib, so its test belongs there, and the header comment saying otherwise is fixed. Worth knowing about that directory: its test target ran nothing. annoGratorTest is commented out because it needs assemblies and tables the directory cannot assume, so `make test` there printed "tested all" and did no work -- and hg/makefile has been running it all along through TEST_EXTRA. bedItemRgbTest is now the one test it does run. refs #36212, refs #38391 diff --git src/hg/cgilib/tests/makefile src/hg/cgilib/tests/makefile index 24e9a6a9384..b4cd77c4595 100644 --- src/hg/cgilib/tests/makefile +++ src/hg/cgilib/tests/makefile @@ -1,28 +1,42 @@ kentSrc = ../../.. include ../../../inc/common.mk L += ${MYSQLLIBS} -lm MYLIBDIR = ../../../lib/${MACHTYPE} MYLIBS = ${MYLIBDIR}/jkhgapcgi.a ${MYLIBDIR}/jkhgap.a ${MYLIBDIR}/jkweb.a BIN_DIR = bin/${MACHTYPE} all: ${BIN_DIR}/annoGratorTester +# annoGratorTest is left out: it needs assemblies and tables this directory cannot assume. +# Until bedItemRgbTest arrived (refs #38391) that made `make test` here a no-op that printed +# "tested all", which hg/makefile has been running all along through TEST_EXTRA. #test: annoGratorTest -test: +test: bedItemRgbTest rm -rf output echo tested all mkdirs: @${MKDIR} output ${BIN_DIR} +# Two runs, because the last step of the rule reads hg.conf's alwaysItemRgb and a mirror may +# turn it off. +bedItemRgbTest: mkdirs + ${CC} ${CC_PROG_OPTS} -o ${BIN_DIR}/bedItemRgbTester bedItemRgbTester.c ${MYLIBS} $L + echo "include ${HOME}/.hg.conf" > output/rgbOn.conf + echo "include ${HOME}/.hg.conf" > output/rgbOff.conf + echo "alwaysItemRgb=off" >> output/rgbOff.conf + HGDB_CONF=output/rgbOn.conf ${BIN_DIR}/bedItemRgbTester > output/bedItemRgbTest + HGDB_CONF=output/rgbOff.conf ${BIN_DIR}/bedItemRgbTester >> output/bedItemRgbTest + diff expected/bedItemRgbTest output/bedItemRgbTest + annoGratorTest: ${BIN_DIR}/annoGratorTester mkdirs ${MAKE} -f annoGratorTests.mk test ${BIN_DIR}/annoGratorTester: annoGratorTester.o ${MYLIBS} @${MKDIR} ${BIN_DIR} ${CC} ${COPT} ${CFLAGS} -o $@ $< ${MYLIBS} ${L} clean: rm -rf *.o bin output *.tmp loader udcCache