From 1f08279e1b20bd1e07132b6ee0a25a154811615a Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 13 Jul 2017 16:40:07 +0200 Subject: [PATCH] ; Improve tramp-tests traces --- test/Makefile.in | 6 +++--- test/lisp/net/tramp-tests.el | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/Makefile.in b/test/Makefile.in index 11373db8ca9..4e1a120d5c2 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -136,7 +136,8 @@ endif $(AM_V_ELC)$(emacs) -f batch-byte-compile $< ## Save logs, and show logs for failed tests. -WRITE_LOG = > $@ 2>&1 || { STAT=$$?; cat $@; exit $$STAT; } +WRITE_LOG = $(if $(and ${NIX_STORE}, $(findstring tramp, $@)), |& tee $@, > $@ 2>&1) \ + || { STAT=$$?; cat $@; exit $$STAT; } ifeq ($(TEST_LOAD_EL), yes) testloadfile = $*.el @@ -147,8 +148,7 @@ endif %.log: %.elc $(AM_V_at)${MKDIR_P} $(dir $@) $(AM_V_GEN)HOME=/nonexistent $(emacs) -l ert -l $(testloadfile) \ - --eval "(ert-run-tests-batch-and-exit ${SELECTOR_ACTUAL})" \ - $(if $(and ${NIX_STORE}, $(findstring tramp, $(testloadfile))), , ${WRITE_LOG}) + --eval "(ert-run-tests-batch-and-exit ${SELECTOR_ACTUAL})" ${WRITE_LOG} ifeq (@HAVE_MODULES@, yes) maybe_exclude_module_tests := diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 8001d9433a0..263e1359066 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -3787,9 +3787,15 @@ process sentinels. They shall not disturb each other." (should-not (file-attributes file)) (should (file-attributes file))) ;; Send string to process. + (tramp--test-message + "Trace 1 action %d %s %s" count buf (current-time-string)) (process-send-string proc (format "%s\n" (buffer-name buf))) + (tramp--test-message + "Trace 2 action %d %s %s" count buf (current-time-string)) (accept-process-output proc 0.1 nil 0) ;; Regular operation. + (tramp--test-message + "Trace 3 action %d %s %s" count buf (current-time-string)) (if (= count 2) (should-not (file-attributes file)) (should (file-attributes file))) -- 2.39.2