Re: [PATCH 0/5] test-lib: filesystem prerequisites
Junio C Hamano venit, vidit, dixit 27.07.2012 19:29: Michael J Gruber g...@drmicha.warpmail.net writes: 5/5 needs a fix in the subject line, sorry. It should be: t3910: use the UTF8_NFD_TO_NFC test prereq (5/5 hasn't hit next) That is because I thought that you would like the lazy-probe and that you would be capable of rerolling it on your own ;-) Well, I do like the lazy-probe, and I would like to lazy-probe ;) Due to the nice design of test_lazy_prereq, the test scripts don't need any adjustment in order to get lazy. Now, that's what I call lazy! So, 5/5 does not need any reroll, right? Anyway, 5/5 with the proper subject line comes in a minute. And thanks for the un-lazy lazyfing reroll of 1/5 and 4/5. Michael -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] test-lib: filesystem prerequisites
Junio C Hamano venit, vidit, dixit 26.07.2012 22:10: Jeff King p...@peff.net writes: That looks like a maintenance annoyance. Can't we just have the prerequisite-checker lazily perform the test on demand and cache the result? It should be OK as long as: 1. The prereq is careful about its pre- and post- conditions. We already make sure to clean up after those tests so as not to taint later tests. We would probably want to also make them more careful about preconditions like which directory they are in (so, for example, refer to $TRASH_DIRECTORY/junk and not junk). 2. The prereq test does not accidentally munge any existing test state from previous tests. That should not be a big deal as long as we avoid names like junk in favor of more unique names like check-case-sensitivity-prereq. Yeah, it is very desirable if we could lazy-eval, and we _should_ be able to arrange the above. Yes, lazy-eval looks good and is probably easier than caching. The adjustments to 1/5 and 4/5 look good. 5/5 needs a fix in the subject line, sorry. It should be: t3910: use the UTF8_NFD_TO_NFC test prereq (5/5 hasn't hit next) Thanks, Michael -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] test-lib: filesystem prerequisites
Michael J Gruber g...@drmicha.warpmail.net writes: 5/5 needs a fix in the subject line, sorry. It should be: t3910: use the UTF8_NFD_TO_NFC test prereq (5/5 hasn't hit next) That is because I thought that you would like the lazy-probe and that you would be capable of rerolling it on your own ;-) -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/5] test-lib: filesystem prerequisites
This mini series provides and makes use of test prerequisites for case insensitivity, symlinks and unicode conversion. SYMLINKS existed before but was not used in t0050. CASE_INSENSITIVE_FS was defined in t0003 rather than test-lib (and redone in t0050). UTF8_NFD_TO_NFC did not exist but was redone in two ways in two tests. After this series, all 3 are defined in test-lib and used in the various tests. Michael J Gruber (5): test-lib: provide case insensitivity as a prerequisite t0050: use the CASE_INSENSITIVE_FS test prereq t0050: use the SYMLINKS test prereq test-lib: provide UTF8 behaviour as a prerequisite t3910: use the SYMLINKS test prereq t/README | 9 ++ t/t0003-attributes.sh| 10 -- t/t0050-filesystem.sh| 64 -- t/t3910-mac-os-precompose.sh | 281 +-- t/test-lib.sh| 24 5 files changed, 189 insertions(+), 199 deletions(-) Really (-w), it is this besides the tab removals: t/README | 9 + t/t0003-attributes.sh| 10 -- t/t0050-filesystem.sh| 62 -- t/t3910-mac-os-precompose.sh | 25 +++-- t/test-lib.sh| 24 5 files changed, 60 insertions(+), 70 deletions(-) -- 1.7.12.rc0.198.gd66b616 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] test-lib: filesystem prerequisites
Michael J Gruber g...@drmicha.warpmail.net writes: This mini series provides and makes use of test prerequisites for case insensitivity, symlinks and unicode conversion. SYMLINKS existed before but was not used in t0050. CASE_INSENSITIVE_FS was defined in t0003 rather than test-lib (and redone in t0050). UTF8_NFD_TO_NFC did not exist but was redone in two ways in two tests. After this series, all 3 are defined in test-lib and used in the various tests. Consolidating the logic to set necessary prerequisites used in various scripts is very good, but I am not sure adding them to test-lib and run them unconditionally is a good idea. SYMLINKS is used by 47 among 595 tests, which is common enough, but the new ones are not common enough. I do not think we want to create a temporary junk dir, two temporary camelcase files, read and compare them, when nobody in the script cares. We do not have to split them into separate include files, though, in order to avoid such waste. Instead, you can make the logic to set prerequisite conditional inside test-lib.sh and update the users. Something like: (in t/test-lib.sh) case ,$TEST_WANT_PREREQ, in *,CASE_INSENSITIVE_FS,*) mkdir junk echo good junk/CamelCase echo bad junk/camelcase test $(cat junk/CamelCase) == good || test_set_prereq CASE_INSENSITIVE_FS rm -fr junk esac (at the beginning of t/t0003-attributes.sh) #!/bin/sh test_description=gitattributes TEST_WANT_PREREQ=CASE_INSENSITIVE_FS,SYMLINKS . ./test-lib.sh Thanks. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] test-lib: filesystem prerequisites
On Thu, Jul 26, 2012 at 11:16:45AM -0700, Junio C Hamano wrote: Consolidating the logic to set necessary prerequisites used in various scripts is very good, but I am not sure adding them to test-lib and run them unconditionally is a good idea. SYMLINKS is used by 47 among 595 tests, which is common enough, but the new ones are not common enough. I do not think we want to create a temporary junk dir, two temporary camelcase files, read and compare them, when nobody in the script cares. We do not have to split them into separate include files, though, in order to avoid such waste. Instead, you can make the logic to set prerequisite conditional inside test-lib.sh and update the users. Something like: [...] (at the beginning of t/t0003-attributes.sh) #!/bin/sh test_description=gitattributes TEST_WANT_PREREQ=CASE_INSENSITIVE_FS,SYMLINKS . ./test-lib.sh That looks like a maintenance annoyance. Can't we just have the prerequisite-checker lazily perform the test on demand and cache the result? It should be OK as long as: 1. The prereq is careful about its pre- and post- conditions. We already make sure to clean up after those tests so as not to taint later tests. We would probably want to also make them more careful about preconditions like which directory they are in (so, for example, refer to $TRASH_DIRECTORY/junk and not junk). 2. The prereq test does not accidentally munge any existing test state from previous tests. That should not be a big deal as long as we avoid names like junk in favor of more unique names like check-case-sensitivity-prereq. -Peff -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/5] test-lib: filesystem prerequisites
Jeff King p...@peff.net writes: That looks like a maintenance annoyance. Can't we just have the prerequisite-checker lazily perform the test on demand and cache the result? It should be OK as long as: 1. The prereq is careful about its pre- and post- conditions. We already make sure to clean up after those tests so as not to taint later tests. We would probably want to also make them more careful about preconditions like which directory they are in (so, for example, refer to $TRASH_DIRECTORY/junk and not junk). 2. The prereq test does not accidentally munge any existing test state from previous tests. That should not be a big deal as long as we avoid names like junk in favor of more unique names like check-case-sensitivity-prereq. Yeah, it is very desirable if we could lazy-eval, and we _should_ be able to arrange the above. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html