NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Cheat scripts tested by ATF on the programs they use

Hi all!

I have a bunch of scripts that use system or 3rd-party applications like
cdrecord, mkisofs or rsync.  Since I don't want to test them, I just to
force them to return 0 when testing scripts that use them.

In ATF (using atf-sh-api) the way that comes up to me is to make a local
directory with scripts (that just exit 0) with the same name or those
programs, put this directory as the first entry of $PATH and remove them
at the end of my ATF tests.  But this doesn't look very elegant...

Any idea on that?

Thank you.

Silas Silva

Home | Main Index | Thread Index | Old Index