External scripts for use in testing

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 Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

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
participants (2)
-
Ivan Lazar Miljenovic
-
Peter Simons