[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] 63 failures for org-test-run-all-tests in an Emacs GUI
From: |
Sebastien Vauban |
Subject: |
Re: [O] 63 failures for org-test-run-all-tests in an Emacs GUI |
Date: |
Fri, 30 Jan 2015 15:09:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) |
Nicolas Goaziou wrote:
> Sebastien Vauban writes:
>
>> Here is a patch you can apply with no problem -- just checked it on
>> a fresh copy of master.
>
> Thanks.
>
> I can apply it but it introduces test failures.
>
> FAILED ob-shell/generic-uses-no-arrays
> FAILED ob-shell/generic-uses-no-assoc-arrays
> FAILED ob-tangle/continued-code-blocks-w-noweb-ref
> FAILED test-ob/specific-colnames
>
> Could you look into it?
I only see 3 problems right now (not `test-ob/specific-colnames'
anymore!?).
Regarding `ob-tangle/continued-code-blocks-w-noweb-ref', it's because
some `babel.shell' is now created (from a tangle operation) and is
inserted in the test in question:
┌────
│ (ert-deftest ob-tangle/continued-code-blocks-w-noweb-ref ()
│ "Test that the :noweb-ref header argument is used correctly."
│ (org-test-at-id "54d68d4b-1544-4745-85ab-4f03b3cbd8a0"
│ (let ((tangled
│ "df|sed '1d'|awk '{print $5 \" \" $6}'|sort -n |tail -1|awk '{print
$2}'"))
│ (org-narrow-to-subtree)
│ (org-babel-tangle)
│ (with-temp-buffer
│ (insert-file-contents "babel.shell") ; <<<< was babel.sh
│ (goto-char (point-min))
│ (should (re-search-forward (regexp-quote tangled) nil t)))
│ (delete-file "babel.shell")))) ; <<<< was babel.sh
└────
Changing the file extension in the above test makes the problem
disappears, though I'm not sure it's the cleanest way to do it: the
shell block should be tangled to a file with the `sh' extension in the
first place, but why isn't it still the case?
Regarding `ob-shell/generic-uses-no-arrays' and
`ob-shell/generic-uses-no-assoc-arrays', they both make use of the code
block defined in the file `testing/examples/ob-shell-test.org':
┌────
│ * Array tests
│ :PROPERTIES:
│ :ID: 0ba56632-8dc1-405c-a083-c204bae477cf
│ :END:
│ ** Generic shell: no arrays
│ #+begin_src shell :exports results :var array=sample_array
│ # ^^^ was sh only
│ echo ${array}
│ #+end_src
└────
Still, I don't understand what's wrong in the tests, for example here
in `ob-shell/generic-uses-no-arrays':
┌────
│ ; A list of tests using the samples in ob-shell-test.org
│ (ert-deftest ob-shell/generic-uses-no-arrays ()
│ "No arrays for generic"
│ (org-test-at-id "0ba56632-8dc1-405c-a083-c204bae477cf"
│ (org-babel-next-src-block)
│ (should (equal "one two three" (org-babel-execute-src-block)))))
└────
Any hint?
PS- Two tests are defined under the same name:
--8<---------------cut here---------------start------------->8---
./test-ob-shell.el:63:(ert-deftest ob-shell/generic-uses-no-assoc-arrays ()
./test-ob-shell.el:76:(ert-deftest ob-shell/generic-uses-no-assoc-arrays ()
--8<---------------cut here---------------end--------------->8---
Isn't there any protection mechanism against test name duplicates?
Best regards,
Seb