Discussion:
[wishlist] testsuite for sieve scripts, libsievetest
Thomas Koch
2014-09-22 14:01:13 UTC
Permalink
Hi,

I'm writing a test suite with Haskell for my sieve script. - Just to learn
Haskell. But it might become something usable.

The test suite calls sieve-test and parses the output. So it would of course
be much simpler for me if the output of sieve-test would be easier to parse
and if I'd know what output to expect.

And it would be nice, if there would be an easy way to embed libsievetest as a
C library. I looked into the source and the sieve-test binary does quite a bit
of setup.

This might be a nice hacking project for a beginner... BTW: It would be nice,
if I could just 'git clone' dovecot.

Thank you for dovecot!
Stephan Bosch
2014-09-22 22:47:23 UTC
Permalink
Post by Thomas Koch
Hi,
I'm writing a test suite with Haskell for my sieve script. - Just to learn
Haskell. But it might become something usable.
The test suite calls sieve-test and parses the output. So it would of course
be much simpler for me if the output of sieve-test would be easier to parse
and if I'd know what output to expect.
Do you know there is a testsuite written in Sieve itself? Well, anyway,
it is always good when the code is tested more. :)
Post by Thomas Koch
And it would be nice, if there would be an easy way to embed libsievetest as a
C library. I looked into the source and the sieve-test binary does quite a bit
of setup.
There is a libsieve-tools, but that is not installed as a shared
library. I probably won't do anything like this until Dovecot itself
provides proper shared libraries for the core framework. I don't see
that happening any time soon.
Post by Thomas Koch
This might be a nice hacking project for a beginner... BTW: It would be nice,
if I could just 'git clone' dovecot.
You can do 'hg clone', but yes, some people prefer git.

Regards,

Stephan.
Phil Carmody
2014-09-23 13:25:04 UTC
Permalink
BTW: It would be nice, if I could just 'git clone' dovecot.
Hi, Thomas,

I happily use Felipe Contreras' excellent git-hg bridge, as I
am far happier in a GIT environment than an Hg one:

https://github.com/felipec/git/wiki/git-remote-hg

The workflow couldn't be much easier, in particular if you set
up a few aliases for the common sequences of tasks.

$ hg clone http://hg.dovecot.org/dovecot-2.2
$ git clone "hg::/home/phil/dovecot-2.2" dovecot-2.2-git
$ cd dovecot-2.2-git
$ git checkout -b hacking
$ # work...
$ cd ../dovecot-2.2
$ hg pull -u
$ cd ../dovecot-2.2-git
$ git checkout master
$ git rebase master hacking
$ # more work...

(OK, my workflow includes pushing too ;-) )

Hope that helps.
Cheers,
Phil

Loading...