GNU bug report logs -
#76446
[Patch Debbugs] Infrastructure Improvements
Previous Next
Full log
View this message in rfc822 format
Morgan Smith <Morgan.J.Smith <at> outlook.com> writes:
> --- a/Makefile
> +++ b/Makefile
> @@ -24,7 +24,7 @@ doc: $(INFOMANUALS)
> build: $(TARGET)
>
> check: build $(TESTTARGET)
> - @$(EMACS) -Q --batch -L . -l $(TESTSOURCE) -f ert-run-tests-batch-and-exit
> + @$(EMACS) -Q --batch -L . $(foreach file,$(TESTSOURCE), -l $(file)) -f ert-run-tests-batch-and-exit
We might be better with
--8<---------------cut here---------------start------------->8---
@$(EMACS) -Q --batch -L . -L ./test -l $(TESTSOURCE) -f ert-run-tests-batch-and-exit
--8<---------------cut here---------------end--------------->8---
> --- /dev/null
> +++ b/test/debbugs-test-helpers.el
> @@ -0,0 +1,146 @@
> +(defconst debbugs-test--bug-status-soap-return
> +(defconst debbugs-test--bug-status
Perhaps we should move these data into an ert-resource file (or two).
> +(defmacro ert-deftest--debbugs (name args docstring &rest body)
> + "The same as `ert-deftest' but runs setup and teardown functions."
> + (declare
> + (doc-string 3)
> + (indent 2))
> + `(ert-deftest ,name ,args ,docstring
> + (debbugs-test--setup)
> + ,@body
> + (debbugs-test--teardown)))
In order to ensure that debbugs-test--teardown is called even in case of
errors, we could use
(unwind-protect
(progn
(debbugs-test--setup)
,@body)
(debbugs-test--teardown))
> --- a/test/debbugs-tests.el
> +++ b/test/debbugs-tests.el
> @@ -27,118 +27,7 @@
> ;;; Code:
>
> (require 'debbugs)
> +(require 'debbugs-test-helpers "./test/debbugs-test-helpers")
(require 'debbugs-test-helpers) should be sufficient with the proposed
change in the Makefile.
Best regards, Michael.
This bug report was last modified 71 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.