On 3/22/24 16:11, Rob Landley wrote: > On 3/21/24 21:38, Oliver Webb via Toybox wrote: >> A mildly annoying issue of you are trying to test with different >> implementations of commands >> such as plan9 ones or sbase or busybox ones, things with different >> conflicting implementations >> of things like xxd or vi. With this patch you can do "make test_cmd >> TEST_HOST=1 C=/path/to/other/cmd" >> and have it work > > I've been doing "PATH=/path/to/thingy:$PATH TEST_HOST=1 make test_cmd" for > years, I didn't know that needed to be documented...
P.S. The point of C= being a path is otherwise shell builtins tend to get called (so you're not necessarily testing what you think you are), and last I checked I hadn't found a portable mechanism for disabling a specific shell builtin other than providing a path to the command to run. (If you disable _all_ shell builtins the test script could break due to missing commands on some systems.) Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net