Replace
$(PIPE) "./sage -t --sagenb $(TESTDIRS) 2>&1" "tee -a test.log"
by
./sage -t --all --logfile=logs/test.log
and analogous for other test targets.
Apply attachment: 14328_makefile_doctest_opts.patch to SAGE_ROOT, and apply attachment: trac_14328-scripts.patch to local/bin.
CC: @roed314 @nexttime
Component: build
Author: Jeroen Demeyer, John Palmieri
Reviewer: R. Andrew Ohana
Merged: sage-5.9.beta4
Issue created by migration from https://trac.sagemath.org/ticket/14328