Commit Graph

17 Commits

Author SHA1 Message Date
Fabian Homborg
9567df4b15 Update littlecheck to 06457b194883879fe08282f84863fa37080c27a5
This fixes a bug where it would fail to match some regexes.
2020-11-30 18:16:42 +01:00
Fabian Homborg
6d98939445 Fix Littlecheck's diff-matcher
Unfortunately the previous solution was too naive and misidentified
some errors.

In essence, passing regex-source couldn't work, because those could
not match any other line, so we have to inject regex-matching into the
SequenceMatcher.

Through awful hackery, this is possible.

Updates littlecheck to 0f6841bbc1674e89f512b5f19d1ad4e0227d2934.
2020-11-25 17:23:29 +01:00
Fabian Homborg
2e55e34544 Reformat 2020-11-22 14:39:48 +01:00
Fabian Homborg
47ddb6d516 Update littlecheck
This lets littlecheck "diff" the given output with the checks, leading
to easier to understand errors.

E.g. changing some random lines in andandoror.fish yields error output
like:

```
Testing file checks/andandoror.fish ... Failure:

  The CHECK on line 36 wants:
    if test 4 ok

  which failed to match line stdout:9:
    if test 3 ok

  Context:
    [...] from line 17 (stdout:6):
    true && false || true: 0
    if test 1 ok
    if test 2 ok
    if test 3 ok <= no check matches this, previous check on line 35
    if test 4 ok
    0 0 0
    1 1 1
    2 2 2
    3 3 3 <= does not match CHECK '3 5 3' on line 55
    4 4 4
    0
    1
    [...] from line 126 (stdout:33):
    0
    0
    0
     <= nothing to match CHECK 'banana' on line 135

  when running command:
    ../test/root/bin/fish checks/andandoror.fish
```

This updates littlecheck to b9c24a3.
2020-11-22 11:28:12 +01:00
Fabian Homborg
64b5a22274 Upgrade littlecheck to print all error lines
In #7459, asan printed error output. However, because we had a failure
on stdout already, littlecheck would only print the first unmatched
line from stderr, leading to output like

```
additional output on stderr:1:

    =================================================================
```

Which is of course entirely useless.

So in that case we just let it print *all* unmatched stderr lines, so
you'd get the full asan output, which presumably is of more use.

This upgrades littlecheck to 5f7deafcea4e58dd3d369eae069a3781bb6ce75e.
2020-11-14 13:15:33 +01:00
Johannes Altmanninger
f415b3b551 Update littlecheck
4a3e4c8 Allow inline #CHECK directives and ignore double-commented directives
2020-09-26 14:56:03 +02:00
Fabian Homborg
31e19db64a Update littlecheck
Update littlecheck to dda885bed9d4a4c6ea1d9d66d0ca93fb54492b7c,
which also displays the context view when the error is on the first line.
2020-07-18 22:10:11 +02:00
Fabian Homborg
9be510fa6b Update littlecheck
This used the wrong operator (`()` instead of `[]`) to look up in a dict.
2020-05-16 15:16:13 +02:00
Fabian Homborg
34a82dbff9 Update littlecheck to escape output 2020-04-26 14:39:46 +02:00
Fabian Homborg
edad6aa607 Update littlecheck
Now featuring Context display on error, which should make it a bit
easier to make out any problems.
2020-03-29 15:21:09 +02:00
ridiculousfish
11c1491e5a Import latest littlecheck
Commit b2f40783a2b5b0663409c4daa90b794b02dd37a6

This has better progress reporting, and the exit status of littlecheck
indicates how many test failures there were.
2020-03-15 17:45:11 -07:00
Fabian Homborg
65883e0e40 Restyle
Mostly line breaks, one instance of tabs!

For some reason clang-format insists on two spaces before a same-line comment?

(I continue to be unimpressed with super-strict line length limits,
but I continue to believe in automatic styling, so it is what it is)

[ci skip]
2020-02-17 14:14:05 +01:00
Fabian Homborg
f5a3a259dc Fix littlecheck on python 2 2020-01-25 15:31:10 +01:00
Fabian Homborg
25810b70f2 Update littlecheck
This allows:

- Running scripts via shebang (not important here)
- Progress output (so we can ditch more of our run script)
- Context (only after, for now) - this is important if there is a test failure
2020-01-25 11:54:42 +01:00
David Adam
5911fc94b8 littlecheck: pass close_fds to subprocess.Popen
Closes #6435.

close_fds=True is actually the default in Python 2.7 and 3.2, but not in
ancient (but still in production in Red Hat Enterprise Linux 6) Python
2.6. Enable it there as well.
2019-12-15 21:48:55 +08:00
Fabian Homborg
cc1388a78a Upgrade littlecheck to allow whitespace before comments
Necessary for test files that pass fish_indent.
2019-06-25 16:11:24 +02:00
ridiculousfish
476185748f Add littlecheck.py
This will be the new testing tool replacing the diff-based tests.

Imported from https://github.com/ridiculousfish/littlecheck
Version e28281273e54745c7d7aabeeb4b085af477d584b
2019-06-16 13:27:06 -07:00