Commit Graph

37 Commits

Author SHA1 Message Date
dundargoc
4f1d75daf8
ci: enable colors by default when testing
Test colors were disabled in be7290d214
due to color codes interfering with the logs. I believe the solution to
disable colors is too aggressive. Reading raw logs isn't common compared
to reading CI results from the github UI. We should optimize the most
common use case.

It is also possible to interpret the colors codes in logs from neovim
with a plugin that interprets ansi escape sequences.
2023-05-22 09:47:40 +01:00
dundargoc
74f05a152d
docs(test): using cmake directly (without make) #22781 2023-03-25 09:33:42 -07:00
dundargoc
af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00
Justin M. Keyes
1f2c2a35ad feat(server): instance "name", store pipes in stdpath(state)
Problem:
- Unix sockets are created in random /tmp dirs.
  - /tmp is messy, unclear when OSes actually clear it.
  - The generated paths are very ugly. This adds friction to reasoning
    about which paths belong to which Nvim instances.
- No way to provide a human-friendly way to identify Nvim instances in
  logs or server addresses.

Solution:
- Store unix sockets in stdpath('state')
- Allow --listen "name" and serverstart("name") to given a name (which
  is appended to a generated path).

TODO:
- is stdpath(state) the right place?
2022-06-15 19:29:51 -07:00
Justin M. Keyes
8f06520594 feat(logging): include test-id in log messages
Problem:
1. Log messages (especially in CI) are hard to correlate with tests.
2. Since b353a5c05f #11886, dumplog() prints the logs next to test
   failures. This is noisy and gets in the way of the test results.

Solution:
1. Associate an incrementing id with each test and include it in log
   messages.
    - FUTURE: add v:name so Nvim instances can be formally "named"?
2. Mention "child" in log messages if the current Nvim is a child (based
   on the presence of $NVIM).

BEFORE:

    DBG … 12345      UI: event
    DBG … 12345      log_server_msg:722: RPC ->ch 1: …
    DBG … 12345      UI: flush
    DBG … 12345      inbuf_poll:444: blocking... events_enabled=1 events_pending=0
    DBG … 23454      UI: stop
    INF … 23454      os_exit:594: Nvim exit: 0

AFTER:

    DBG … T57        UI: event
    DBG … T57        log_server_msg:722: RPC ->ch 1: …
    DBG … T57        UI: flush
    DBG … T57        inbuf_poll:444: blocking... events_enabled=1 events_pending=0
    DBG … T57/child  UI: stop
    INF … T57/child  os_exit:594: Nvim exit: 0
2022-06-15 19:23:10 -07:00
dundargoc
08616571f4
chore: fix typos (#16506)
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
Co-authored-by: Alef Pereira <ealefpereira@gmail.com>
Co-authored-by: AusCyber <willp@outlook.com.au>
Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
2021-12-28 18:15:16 +01:00
James McCoy
267ec67fab
test: allow excluding functional/unit tests using TEST_FILTER_OUT
Although this can already be done using `BUSTED_ARGS`, it complements
our existing shortcut of `TEST_FILTER.`

[skip ci]
2021-12-18 12:55:09 -05:00
Gregory Anders
a5bbb932f9 refactor: move vim.lsp.diagnostic to vim.diagnostic
This generalizes diagnostic handling outside of just the scope of LSP.
LSP clients are now a specific case of a diagnostic producer, but the
diagnostic subsystem is decoupled from the LSP subsystem (or will be,
eventually).

More discussion at [1].

[1]: https://github.com/neovim/neovim/pull/15585
2021-09-15 14:09:47 -06:00
Justin M. Keyes
b63b4777ec
docs: third-party licenses, TEST_COLORS, system() #15665 2021-09-14 10:20:33 -07:00
James McCoy
8d93223f83
test: use $TEST_TIMEOUT to specify timeout 2021-09-09 20:49:26 -04:00
Daniel Hahler
0b7a7b23cc
oldtest: support for running by filename (#11473)
Follow-up to 8969efca8 (Vim patch 8.1.0723)

NOTE: This changes the main entrypoint for running single oldtest files
to not use/require the ".res" extension anymore.  But it is handled for
B/C.

Adds a phony rule to run oldtest by filename.
Not going through "$(MAKE)" avoids GNUmakefile being used then (which I
use for WIP things), and it seems like SINGLE_MAKE should be used anyway
probably.
2019-12-02 17:18:37 +01:00
Vikram Pal
55007180a3 doc: Fix TEST_FILTER example #11158 2019-10-06 02:21:06 -07:00
Daniel Hahler
b069e9b20f tests: unit: NVIM_TEST_TRACE_LEVEL: default to 0 #11144
Traces are not useful normally (unless debugging/fixing tests), but only add
overhead.  Disable them by default.
2019-10-02 22:41:57 -07:00
Justin M. Keyes
81c3fa6c9d doc 2019-09-09 09:53:19 -07:00
Daniel Hahler
dcc8fcf0b9 tests: assert:set_parameter('TableFormatLevel', 100) #10925
luassert uses 3 by default, which is often not enough.

Instead of documenting how to increase it, let's use a more fitting
(sane) default of 100 levels.
2019-09-03 04:29:49 -07:00
Justin M. Keyes
afef973262
doc [ci skip] #10383
- test/README.md: document luassert `TableFormatLevel`
- CONTRIBUTING.md: absorb parts of the old "Development tips" wiki page
2019-07-19 21:32:04 +02:00
Daniel Hahler
32361a1245 Improve luacheck setup [skip appveyor]
- Move .luacheckrc to root, add read_globals=vim
- Simplify lualint target, run it on all lua files
- Lint preload.lua, but ignore W211
- Remove testlint target, included in lualint (and lint)
- Clean up .luacheckrc
2019-07-04 12:29:54 +02:00
Marco Hinz
f282324e1b
test: add more debuggings tips [ci skip] (#9761)
Mention the common press-enter issue and how to visualize the screen.
2019-03-19 17:44:35 +01:00
Justin M. Keyes
4ba8266ab1 doc
- CMake features
2018-12-30 21:09:39 +01:00
Justin M. Keyes
857a7312d0
doc (#9288)
- misc
- doc: `:help config`. closes #9329
- cleanup test/README.md
2018-12-09 01:31:34 +01:00
Justin M. Keyes
b11f5aa119 doc: xdg, MAINTAIN.md, channel-id, job control
- tutor: emphasize K
2018-10-11 19:32:31 +02:00
Daniel Hahler
47d74bf32f doc: test/README.md (#9020)
- testdir location
- no old style tests are left in the fixed list in the Makefile

[ci skip]
2018-09-20 09:37:53 +02:00
Matthieu Coudron
2e5c299f11
warn about tests without libintl 2018-08-25 23:13:34 +09:00
Justin M. Keyes
f72f638f97 doc: job/channel, misc #7783
doc: termios defaults. ref #6992
doc: :help shell-powershell
doc: provider: Python minimum version is 2.7, 3.4
doc: remove :!start special-case. #5844
doc: mention #7917 change which accepts empty Array for Dictionary parameter
doc: <Cmd> pseudokey
doc: lmap change #5658
doc: -s, -es
2018-06-11 00:08:27 +02:00
Justin M. Keyes
ad9c2d3cb9 doc
closes #7622
2017-12-10 17:13:22 +01:00
ZyX
0b4054e043 unittests: Reduce memory used by vim_str2nr test 2017-11-30 11:48:23 +03:00
ZyX
03a129aacf Merge branch 'master' into expression-parser 2017-11-19 22:05:22 +03:00
nateozem
30a21830d0 doc: test/README.md: migrate wiki info (#7552) 2017-11-14 01:43:52 +01:00
ZyX
24a353364d Merge branch 'master' into expression-parser 2017-11-06 20:23:35 +03:00
Justin M. Keyes
842a54a1bb doc 2017-11-06 01:56:04 +01:00
ZyX
190c8516f5 unittests: Add a way to print trace on regular error 2017-09-29 01:21:13 +03:00
Justin M. Keyes
698ec9eb6e loop_close: Avoid infinite loop, and log it.
Avoids a hang, and also helps diagnose issues like:

https://github.com/neovim/neovim/pull/6594#issuecomment-298321826
2017-06-07 00:26:21 +02:00
ZyX
ac22238b6a unittests: Replace two environment variables with one TRACE_LEVEL 2017-04-01 20:57:23 +03:00
ZyX
708a55ee15 unittests: Disable non-C-calls
Some benchmarks:

TRACE_EVERYTHING: 79.45s user 12.68s system 124% cpu 1:13.94  total

(default):        30.26s user  5.30s system  89% cpu   39.663 total
2017-04-01 13:16:25 +03:00
ZyX
046d6a8dfe unittests: Collect traces
Some benchmarks:

MAIN_CDEFS + NO_TRACE:  3.81s user  1.65s system  33% cpu   16.140 total

MAIN_CDEFS:            73.61s user 10.98s system 154% cpu   54.690 total

NO_TRACE:              18.49s user  4.30s system  73% cpu   30.804 total

(default):             77.11s user 14.74s system 126% cpu 1:12.79  total
2017-04-01 12:25:10 +03:00
ZyX
933d60bc23 unittests: Do not hang when error message is too long 2017-04-01 11:07:08 +03:00
ZyX
def52ad668 tests: Add description of test directory structure and test env vars 2017-03-12 04:18:15 +03:00