External scripts for use in testing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

External scripts for use in testing

Ivan Lazar Miljenovic
I'm trying to write a test suite for a package, but to properly ensure
it's working I need to have some sample script/program for it to
interact with.

What would be the best way to ship this script/program? I was
considering using extra-source-files but the Paths_* support from
Cabal doesn't seem to list those.  So should I ship them as a data
file (which could have an issue if they aren't marked executable and
installed globally)? Or blindly trust that the test suite is being run
from within the source directory and try to guess/determine it's
location from that?

Furthermore, what about if it's an actual (small) program that
requires compilation? Or am I completely out of luck at this point?

--
Ivan Lazar Miljenovic
[hidden email]
http://IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: External scripts for use in testing

Peter Simons-2
Hi Ivan,

 > Or blindly trust that the test suite is being run from within the
 > source directory and try to guess/determine it's location from that?

yes, that is the way to go. "cabal check" has its current working
directory in the directory that contains your cabal file, so you can
refer to contents of your release tarball by relative path from there.

Best regards,
Peter

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.