On 07/21/2012 12:44 AM, Rob Landley wrote:>>
The following example which spawns four loops:

It'd be nice if there was a way to add a test to scripts/test, but that
assumes at least a 2-processor machine.

Hmmm... I suppose that's easy enough to test for:

   if [ "$(echo /sys/devices/system/cpu/cpu[0-9] | wc -w" -lt 2 ]
   then
     exit 0
   fi

Or similar...

Pure testing wise, there are other tools which might deserve some more attention, testing now mainly focuses on the i/o-based blackbox testing (focusing on the toys which do simple i/o handling). Mainly splitting tests in two parts, one being more blackbox tests (the test which we have in place now, but also focusing more on the system-toys iso the text-toys) but next to this also unittests which can more focus on testing libraries/internal functions(eventually working with input/output redirection to test the main functions). However my preference to touch all of this, would be to touch this after toybox is self-contained, a chroot (or even a container) and toysh is ideally all you need to have working tests on a system instead of the hybrid approach which is now in place.

my 2 cents
E.

--
Elie De Brauwer

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to