Skip to main content
deleted 4 characters in body
Source Link
JeanPierre
  • 7.5k
  • 1
  • 21
  • 39

I have written a few simple tests, when iI run them on the buffer inside emacs everything passes.

how ever running this failsHowever, so whats different about the environments that may causewhen I run them in batch mode as shown below, it fails. What can explain this  ?

emacs -batch -l ert -l mytests.el -f ert-run-tests-batch-and-exit

This isHere's the output from one of the failing tests:

Test pp-test-docker-container-names backtrace:
  (let ((container_ids (split-string (dc-docker-run-return "ps -q" "" 
  dc-docker-names()
  (list (dc-docker-names) (quote (nil)))
  (let ((fn-89805 (function equal)) (args-89806 (list (dc-docker-names
  (progn (fset (quote shell-command-to-string) vnew) (let ((fn-89805 (
  (unwind-protect (progn (fset (quote shell-command-to-string) vnew) (
  (let* ((vnew (function (lambda (_) ""))) (old (symbol-function (quot
  (closure (t) nil (let* ((vnew (function (lambda (_) ""))) (old (symb
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test pp-test-docker-container-names "Tes
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
  ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-l" "ert" "-l" "docker-compose.el" "-f" "ert-run-te
  command-line()
  normal-top-level()
Test pp-test-docker-container-names condition:
    (void-function loop)
   FAILED  2/2  pp-test-docker-container-names

Any ideas ?

I have written a few simple tests when i run them on the buffer inside emacs everything passes.

how ever running this fails, so whats different about the environments that may cause this  ?

emacs -batch -l ert -l mytests.el -f ert-run-tests-batch-and-exit

This is the output from one of the failing tests

Test pp-test-docker-container-names backtrace:
  (let ((container_ids (split-string (dc-docker-run-return "ps -q" "" 
  dc-docker-names()
  (list (dc-docker-names) (quote (nil)))
  (let ((fn-89805 (function equal)) (args-89806 (list (dc-docker-names
  (progn (fset (quote shell-command-to-string) vnew) (let ((fn-89805 (
  (unwind-protect (progn (fset (quote shell-command-to-string) vnew) (
  (let* ((vnew (function (lambda (_) ""))) (old (symbol-function (quot
  (closure (t) nil (let* ((vnew (function (lambda (_) ""))) (old (symb
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test pp-test-docker-container-names "Tes
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
  ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-l" "ert" "-l" "docker-compose.el" "-f" "ert-run-te
  command-line()
  normal-top-level()
Test pp-test-docker-container-names condition:
    (void-function loop)
   FAILED  2/2  pp-test-docker-container-names

Any ideas ?

I have written a few simple tests, when I run them on the buffer inside emacs everything passes.

However, when I run them in batch mode as shown below, it fails. What can explain this?

emacs -batch -l ert -l mytests.el -f ert-run-tests-batch-and-exit

Here's the output from one of the failing tests:

Test pp-test-docker-container-names backtrace:
  (let ((container_ids (split-string (dc-docker-run-return "ps -q" "" 
  dc-docker-names()
  (list (dc-docker-names) (quote (nil)))
  (let ((fn-89805 (function equal)) (args-89806 (list (dc-docker-names
  (progn (fset (quote shell-command-to-string) vnew) (let ((fn-89805 (
  (unwind-protect (progn (fset (quote shell-command-to-string) vnew) (
  (let* ((vnew (function (lambda (_) ""))) (old (symbol-function (quot
  (closure (t) nil (let* ((vnew (function (lambda (_) ""))) (old (symb
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test pp-test-docker-container-names "Tes
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
  ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-l" "ert" "-l" "docker-compose.el" "-f" "ert-run-te
  command-line()
  normal-top-level()
Test pp-test-docker-container-names condition:
    (void-function loop)
   FAILED  2/2  pp-test-docker-container-names

Any ideas ?

deleted 10 characters in body; edited tags
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257

I have written a few simple tests when i run them on the buffer inside emacs everything passes.

how ever running this fails, so whats different about the environments that may cause this ?

emacs -batch -l ert -l mytests.el -f ert-run-tests-batch-and-exit

This is the output from one of the failing tests

Test pp-test-docker-container-names backtrace:
  (let ((container_ids (split-string (dc-docker-run-return "ps -q" "" 
  dc-docker-names()
  (list (dc-docker-names) (quote (nil)))
  (let ((fn-89805 (function equal)) (args-89806 (list (dc-docker-names
  (progn (fset (quote shell-command-to-string) vnew) (let ((fn-89805 (
  (unwind-protect (progn (fset (quote shell-command-to-string) vnew) (
  (let* ((vnew (function (lambda (_) ""))) (old (symbol-function (quot
  (closure (t) nil (let* ((vnew (function (lambda (_) ""))) (old (symb
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test pp-test-docker-container-names "Tes
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
  ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-l" "ert" "-l" "docker-compose.el" "-f" "ert-run-te
  command-line()
  normal-top-level()
Test pp-test-docker-container-names condition:
    (void-function loop)
   FAILED  2/2  pp-test-docker-container-names

Any ideas ?

I have written a few simple tests when i run them on the buffer inside emacs everything passes.

how ever running this fails, so whats different about the environments that may cause this ?

emacs -batch -l ert -l mytests.el -f ert-run-tests-batch-and-exit

This is the output from one of the failing tests

Test pp-test-docker-container-names backtrace:
  (let ((container_ids (split-string (dc-docker-run-return "ps -q" "" 
  dc-docker-names()
  (list (dc-docker-names) (quote (nil)))
  (let ((fn-89805 (function equal)) (args-89806 (list (dc-docker-names
  (progn (fset (quote shell-command-to-string) vnew) (let ((fn-89805 (
  (unwind-protect (progn (fset (quote shell-command-to-string) vnew) (
  (let* ((vnew (function (lambda (_) ""))) (old (symbol-function (quot
  (closure (t) nil (let* ((vnew (function (lambda (_) ""))) (old (symb
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test pp-test-docker-container-names "Tes
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
  ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-l" "ert" "-l" "docker-compose.el" "-f" "ert-run-te
  command-line()
  normal-top-level()
Test pp-test-docker-container-names condition:
    (void-function loop)
   FAILED  2/2  pp-test-docker-container-names

Any ideas ?

I have written a few simple tests when i run them on the buffer inside emacs everything passes.

how ever running this fails, so whats different about the environments that may cause this ?

emacs -batch -l ert -l mytests.el -f ert-run-tests-batch-and-exit

This is the output from one of the failing tests

Test pp-test-docker-container-names backtrace:
  (let ((container_ids (split-string (dc-docker-run-return "ps -q" "" 
  dc-docker-names()
  (list (dc-docker-names) (quote (nil)))
  (let ((fn-89805 (function equal)) (args-89806 (list (dc-docker-names
  (progn (fset (quote shell-command-to-string) vnew) (let ((fn-89805 (
  (unwind-protect (progn (fset (quote shell-command-to-string) vnew) (
  (let* ((vnew (function (lambda (_) ""))) (old (symbol-function (quot
  (closure (t) nil (let* ((vnew (function (lambda (_) ""))) (old (symb
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test pp-test-docker-container-names "Tes
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
  ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-l" "ert" "-l" "docker-compose.el" "-f" "ert-run-te
  command-line()
  normal-top-level()
Test pp-test-docker-container-names condition:
    (void-function loop)
   FAILED  2/2  pp-test-docker-container-names

Any ideas ?

Source Link
Oly
  • 593
  • 1
  • 5
  • 15

Why does running my tests with ert-run-tests-batch-and-exit fail

I have written a few simple tests when i run them on the buffer inside emacs everything passes.

how ever running this fails, so whats different about the environments that may cause this ?

emacs -batch -l ert -l mytests.el -f ert-run-tests-batch-and-exit

This is the output from one of the failing tests

Test pp-test-docker-container-names backtrace:
  (let ((container_ids (split-string (dc-docker-run-return "ps -q" "" 
  dc-docker-names()
  (list (dc-docker-names) (quote (nil)))
  (let ((fn-89805 (function equal)) (args-89806 (list (dc-docker-names
  (progn (fset (quote shell-command-to-string) vnew) (let ((fn-89805 (
  (unwind-protect (progn (fset (quote shell-command-to-string) vnew) (
  (let* ((vnew (function (lambda (_) ""))) (old (symbol-function (quot
  (closure (t) nil (let* ((vnew (function (lambda (_) ""))) (old (symb
  #[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\317\320%DC
  funcall(#[0 "\306\307!r\211q\210\310\311\312\313\314\315!\316\"\31
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  #[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\316%DC\2
  funcall(#[0 "r\304 q\210\305 )\306\307\310\311\312\313!\314\"\315\
  ert-run-test([cl-struct-ert-test pp-test-docker-container-names "Tes
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test p
  ert-run-tests(t #[385 "\306\307\"\203D\211\211G\310U\203\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-l" "ert" "-l" "docker-compose.el" "-f" "ert-run-te
  command-line()
  normal-top-level()
Test pp-test-docker-container-names condition:
    (void-function loop)
   FAILED  2/2  pp-test-docker-container-names

Any ideas ?