Attempting to build and/or run a subset of tests fails in some directories. For example, invoking make as shown below to build and run just the test-bcopy test fails with the subsequent error. This is because the Makefile in those directories contains the following lines: tests-special += $(objpfx)tst-svc-cmp.out $(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out Adding the .out file to the tests-special variable then unconditionally attempts the create it but because the file depends on tst-svc.out which cannot be derived from the value of the tests variable the recipe fails. $ nice make subdirs=string tests=test-bcopy check ... make[2]: *** No rule to make target `/build/glibc-trunk/power8/string/tst-svc.out', needed by `/build/glibc-trunk/power8/string/tst-svc-cmp.out'. Stop. make[2]: Leaving directory `/src/glibc-trunk/string' make[1]: *** [string/tests] Error 2 make[1]: Leaving directory `/src/glibc-trunk' make: *** [check] Error 2 make: Leaving directory `/build/glibc-trunk/power8'
It's not obvious that "make tests=whatever" is expected to work, as opposed to the tests variable being strictly internal to the makefiles. My inclination would be to support "make subdir/some-test.out" to run a particular test (whether one from tests or tests-special), much like you can do "make subdir/tests" now.