[PATCH v5 00/10] increase wildmatch test coverage

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

 



v5 has been a long time coming (20 days since I said I'd re-roll
this), but hopefully this is a version that works well for everyone,
including Windows users. Changes:

Ævar Arnfjörð Bjarmason (10):
  wildmatch test: indent with tabs, not spaces
  wildmatch test: use more standard shell style
  wildmatch test: don't try to vertically align our output
  wildmatch test: use a paranoia pattern from nul_match()
  wildmatch test: remove dead fnmatch() test code

No changes.

  wildmatch test: use test_must_fail, not ! for test-wildmatch

NEW: Fix a tiny nit I spotted while re-rolling.

  wildmatch test: perform all tests under all wildmatch() modes

The testing of various wildmatch modes got factored into a
function. It makes no difference to this patch, but makes a huge
difference in readability to the follow-up patch.

Also I stopped renaming "match" to "wildtest", I can't remeber why I
did that in the first place, but no point in doing that, and this
makes things easier to review...

  wildmatch test: create & test files on disk in addition to in-memory

Almost entirely based on feedback from Johannes:

a) This is now much more friendly under -x, as little test code as
possible outside actual tests.

b) Factored out into functions

c) Gave variables better names

d) Hopefully runs under Windows now without errors, due to a blacklist
of filenames that aren't allowed on Windows. Commit message now
mentions this.

e) This should be a lot faster than before, since I factored out the
setup work being done for every test so it's only done

f) At this point I can't remember who/where this was pointed out, but
it was observed that I was using a very dangerous looking `rm -rf --
*` pattern in the old test, turns out this could be replaced with a
less scary `git clean -df`.

  test-lib: add an EXPENSIVE_ON_WINDOWS prerequisite
  wildmatch test: mark test as EXPENSIVE_ON_WINDOWS

Follow-up my 87mv1raz9p.fsf@xxxxxxxxxxxxxxxxxxx from the v4 thread,
and create an EXPENSIVE_ON_WINDOWS prerequisite, which is then used
for the file tests so they're skipped on Windows by default.

Even though 8/10 should be faster now, and hopefully passes on
Windows, I still expect it to be quite slow on Windows, so let's not
run it there by default unless under GIT_TEST_LONG=1.

 t/helper/test-wildmatch.c |   2 +
 t/t3070-wildmatch.sh      | 655 +++++++++++++++++++++++++++++-----------------
 t/test-lib.sh             |   4 +
 3 files changed, 416 insertions(+), 245 deletions(-)

-- 
2.15.1.424.g9478a66081




[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]

  Powered by Linux