mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 03:40:56 -08:00
If a test case fails, show the output of the test case that failed, so that it isn't lost if the test suite is running on a build server such as travis ci. (works on os x.)
Copied from Perforce Change: 182040 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
68c312f9ba
commit
69ef2cbe09
3 changed files with 5 additions and 6 deletions
|
|
@ -239,12 +239,11 @@ TESTCASES=abqtest amcss amcsshe amcssth amsss amssshe apss arenacv awlut \
|
|||
messtest mpmss mpsicv poolncv qs sacss segsmss steptest \
|
||||
walkt0
|
||||
testrun: $(TESTCASES)
|
||||
OUTPUT=$$(mktemp /tmp/mps.log.XXXXXX); \
|
||||
OUTPUT=$$(mktemp -d /tmp/mps.log.XXXXXX); \
|
||||
echo "Logging test output to $$OUTPUT"; \
|
||||
$(^:%=(TESTCASE=$(PFM)/$(VARIETY)/%; \
|
||||
echo "\n\n-- Running $$TESTCASE at $$(date) --" >> $$OUTPUT && \
|
||||
echo "Running $$TESTCASE" && \
|
||||
$$TESTCASE >> $$OUTPUT) &&) true
|
||||
echo "Running $$TESTCASE" && \
|
||||
$$TESTCASE > $$OUTPUT/$$TEST || (cat $$OUTPUT/$$TEST; exit 1)) &&) true
|
||||
|
||||
# These convenience targets allow one to type "make foo" to build target
|
||||
# foo in selected varieties (or none, for the latter rule).
|
||||
|
|
|
|||
|
|
@ -2453,7 +2453,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# bttest & teletest cannot be run unattended\n# mv2test cannot be run because MV2 is broken\n# amcssth doesn't work on OS X (job001621)\nTESTCASES=\"abqtest amcss amcsshe amsss amssshe apss arenacv awlut \\\n awluthe btcv cbstest finalcv finaltest lockcov locv \\\n messtest mpmss mpsicv poolncv qs sacss segsmss steptest \\\n walkt0\"\nOUTPUT=$(mktemp /tmp/mps.log.XXXXXX)\necho \"Logging test output to $OUTPUT\"\nfor TEST in $TESTCASES; do\n TESTCASE=$TARGET_BUILD_DIR/$TEST\n printf \"\\n\\n-- Running $TESTCASE at $(date) --\\n\" >> $OUTPUT\n echo \"Running $TEST ($CONFIGURATION)\"\n $TESTCASE >> $OUTPUT || exit 1\ndone\necho \"All tests pass.\"\n\n# Coverage\nif [ \"$CONFIGURATION\" == \"Debug\" ]; then\n (cd xc/$PROJECT.build/$CONFIGURATION/$PROJECT.build/Objects-normal/x86_64 &&\n gcov mps.c 2>>$OUTPUT) |\n python gcovfmt.py $OUTPUT\nfi";
|
||||
shellScript = "# bttest & teletest cannot be run unattended\n# mv2test cannot be run because MV2 is broken\n# amcssth doesn't work on OS X (job001621)\nTESTCASES=\"abqtest amcss amcsshe amsss amssshe apss arenacv awlut \\\n awluthe btcv cbstest finalcv finaltest lockcov locv \\\n messtest mpmss mpsicv poolncv qs sacss segsmss steptest \\\n walkt0\"\nOUTPUT=$(mktemp -d /tmp/mps.log.XXXXXX)\necho \"Logging test output to $OUTPUT\"\nfor TEST in $TESTCASES; do\n TESTCASE=$TARGET_BUILD_DIR/$TEST\n echo \"Running $TEST ($CONFIGURATION)\"\n $TESTCASE > $OUTPUT/$TEST || (cat $OUTPUT/$TEST; exit 1)\ndone\necho \"All tests pass.\"\n\n# Coverage\nif [ \"$CONFIGURATION\" == \"Debug\" ]; then\n (cd xc/$PROJECT.build/$CONFIGURATION/$PROJECT.build/Objects-normal/x86_64 &&\n gcov mps.c 2> $OUTPUT/gcov) |\n python ../tool/gcovfmt.py $OUTPUT/coverage\nfi";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ def main():
|
|||
else:
|
||||
out = stdout
|
||||
fmt1 = "{:<16s} {:<7s} {:<7s} {:<7s}\n"
|
||||
fmt2 = "{:<16s} {:7d} {:7d} {:7.2f}\n"
|
||||
fmt2 = "{:<16s} {:7d} {:7d} {:6.2f}%\n"
|
||||
underlines = "---------------- ------- ------- -------".split()
|
||||
out.write(fmt1.format(*"File Lines Covered Percent".split()))
|
||||
out.write(fmt1.format(*underlines))
|
||||
Loading…
Add table
Add a link
Reference in a new issue