Subject: Re: [Syfi] [Branch ~syfi-core/fenics-syfi/main] Rev 554: Enable previously failing geometry test for syfi.

From: Johannes Ring <[email-masked]>
Date: Tue, 22 May 2012 13:38:39 +0200

I have added this log file to the buildbot now and on the buildslaves
with Python 2.6 (lucid-amd64 and linux64-exp), it complains about a
missing 'discover' module. However, the check stage is successfully
completed.

Johannes

On Tue, May 22, 2012 at 11:43 AM,  <[email-masked]> wrote:
> ------------------------------------------------------------
> revno: 554
> committer: Martin Sandve Alnæs <[email-masked]>
> branch nick: work
> timestamp: Tue 2012-05-22 11:40:56 +0200
> message:
>  Enable previously failing geometry test for syfi.
>  Let run_tests.py write test log to file for use with buildbot.
> added:
>  tests/python/test
> modified:
>  tests/python/run_tests.py
>  tests/python/test_sfc/test_quadjit.py
>  tests/python/test_syfi/test_geometry.py
>
>
> --
> lp:fenics-syfi
> https://code.launchpad.net/~syfi-core/fenics-syfi/main
>
> You are subscribed to branch lp:fenics-syfi.
> To unsubscribe from this branch go to https://code.launchpad.net/~syfi-core/fenics-syfi/main/+edit-subscription
>
> === modified file 'tests/python/run_tests.py'
> --- tests/python/run_tests.py   2012-05-21 13:36:00 +0000
> +++ tests/python/run_tests.py   2012-05-22 09:40:56 +0000
> @@ -1,3 +1,8 @@
>  #!/usr/bin/env python
> -import os, sys
> -sys.exit(os.system("python -m unittest discover"))
> +import commands, sys
> +s, o = commands.getstatusoutput("python -m unittest discover")
> +if s != 0:
> +    f = open('python_tests.log', 'w')
> +    f.write(o)
> +    f.close()
> +sys.exit(s)
>
> === added file 'tests/python/test'
> --- tests/python/test   1970-01-01 00:00:00 +0000
> +++ tests/python/test   2012-05-22 09:40:56 +0000
> @@ -0,0 +1,2 @@
> +#!/bin/bash
> +python -m unittest discover
>
> === modified file 'tests/python/test_sfc/test_quadjit.py'
> --- tests/python/test_sfc/test_quadjit.py       2012-05-21 13:36:00 +0000
> +++ tests/python/test_sfc/test_quadjit.py       2012-05-22 09:40:56 +0000
> @@ -42,3 +42,5 @@
>         A = assemble_on_cell(form, "triangle", coeffs=[], elements=[element,element])
>         # TODO: Assert correct result
>
> +    def test_fail(self):
> +        self.assertTrue(False)
>
> === modified file 'tests/python/test_syfi/test_geometry.py'
> --- tests/python/test_syfi/test_geometry.py     2012-05-21 13:38:13 +0000
> +++ tests/python/test_syfi/test_geometry.py     2012-05-22 09:40:56 +0000
> @@ -68,7 +68,7 @@
>         for i in range(6):
>             self._validate_rectangle(cell.rectangle(i), dim)
>
> -    def xtest_reference_line_dimensions(self): # FIXME: Bug in ReferenceLine!
> +    def test_reference_line_dimensions(self):
>         d = 1
>         SyFi.initSyFi(d)
>         c = SyFi.ReferenceLine()
>
>

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Tue, 22 May 2012 15:15:16 +0200

I've fixed the issue with missing discover module, replaced with a
test discovery script modified from ufl.

Now I get swig version errors, now anything about that?

And the check stage still completes successfully on the buildbot. How
is the test for failure implemented?

Martin

On 22 May 2012 13:38, Johannes Ring <[email-masked]> wrote:
> _______________________________________________
> Mailing list: https://launchpad.net/~syfi
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~syfi
> More help   : https://help.launchpad.net/ListHelp

---

From: Johannes Ring <[email-masked]>
Date: Wed, 23 May 2012 10:28:25 +0200

> Now I get swig version errors, now anything about that?

This should be fixed now. You should update your branch of UFC to get the fix.

> is the test for failure implemented?

I will look into this.

Johannes

---

From: Johannes Ring <[email-masked]>
Date: Wed, 23 May 2012 15:23:33 +0200

>> is the test for failure implemented?

It turned out that commands.getstatusoutput in run_tests.py returnes
exit status 256, which apparently is too high. This made sys.exit
return 0 and the check stage was therefore successful. I changed
commands.getstatusoutput (which doesn't work on Windows anyway) to
instant.get_status_output in run_tests.py and that made it work.

I expect the buildbot to complain soon.

Johannes