Re: jn/apply-filename-with-sp (Re: What's cooking in git.git (Aug 2010, #02; Wed, 11))

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

 



On Thu, Aug 12, 2010 at 23:17, Junio C Hamano <gitster@xxxxxxxxx> wrote:

> The file based caching of the above wouldn't work well under "make -j";
> without it, we can still have a prerequisite checked only once per a test
> script run, which is not worse than the current situation (and it would
> even save cycles if a test does not check for a particular prereq,
> e.g. SYMLINKS, that is always checked in test-lib).

I think that's being a little too clever for such a small part of the
test suite, better to just stick specialized checks like these into
e.g. lib-check-fs.sh, which those tests can then source.

Or just leave it as-is, trying to create a few files is a negligible
part of the test execution time, most of the tests are doing a lot
mork work than just trying to create a symlink or a file with a funny
name.

Anyway, a simpler implementation of lazy-loading would be to have
e.g. t/lib-prereq/FUNNYNAMES.sh. test_have_prereq could then just
do:

    lazy="$TEST_DIRECTORY/lib-prereq/$prereq.sh"
    test -f $lazy && . $lazy # TODO: Don't load this if we've done it already
    case $satisfied in ...

Or something like that, that'd eliminate the need for file creation,
since prereq labels would map directly to filenames, and there could
be an internal "${prereq}_FOO" variable checking if it was loaded
already.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]