05faf6b30a29e2260029a5d385a992c3481bcae1
braney
  Fri Sep 11 12:54:27 2026 -0700
hgSession: run the tests directory, refs #38340

hg/makefile's %.testAll rule runs "make test" in the app directory once that app
has a tests/makefile, and swallows the result with "|| true".  hgSession had no
test target, so the backupParseTest added with the #38340 fix errored out and
was silently skipped.  It passed only when run by hand.

Same three lines hubApi uses.

Note for anyone adding a tests directory under hg/: seventeen other apps there
have one and no test target, so whatever is in them is not running either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

diff --git src/hg/hgSession/makefile src/hg/hgSession/makefile
index 72879e14d53..5a70496f303 100644
--- src/hg/hgSession/makefile
+++ src/hg/hgSession/makefile
@@ -2,15 +2,17 @@
 include ../../inc/common.mk
 
 L += -lm ${MYSQLLIBS}
 MYLIBDIR = ../../lib/${MACHTYPE}
 MYLIBS =  ${MYLIBDIR}/jkhgapcgi.a ${MYLIBDIR}/jkhgap.a ${MYLIBDIR}/jkweb.a
 
 A = hgSession
 
 O = $A.o backup.o
 
 include ../../inc/cgi_build_rules.mk
 
 compile: $O 
 	${CC} -o $A${EXE} -g $O ${MYLIBS} ${L} 
 
+test::
+	cd tests && ${MAKE} test