Commit graph

11 commits

Author SHA1 Message Date
Yuya Nishihara
8c0f6a53c5 cli: colorize output of "config list" 2024-03-06 11:38:57 +09:00
Yuya Nishihara
7ca6744432 cli: add "config list --template" support
There's a caveat: "jj config list -Tname" will concatenate all names in a
single line. That's correct but useless. We might want some option or config
knob to complete missing "\n". This also applies to "log --no-graph".
2024-03-06 11:38:57 +09:00
jyn
d66fcf2ca0 compile integration tests as a single binary
this greatly speeds up the time to run all tests, at the cost of slightly larger recompile times for individual tests.

this unfortunately adds the requirement that all tests are listed in `runner.rs` for the crate.
to avoid forgetting, i've added a new test that ensures the directory is in sync with the file.

 ## benchmarks

before this change, recompiling all tests took 32-50 seconds and running a single test took 3.5 seconds:

```
; hyperfine 'touch lib/src/lib.rs && cargo t --test test_working_copy'
  Time (mean ± σ):      3.543 s ±  0.168 s    [User: 2.597 s, System: 1.262 s]
  Range (min … max):    3.400 s …  3.847 s    10 runs
```

after this change, recompiling all tests take 4 seconds:
```
;  hyperfine 'touch lib/src/lib.rs ; cargo t --test runner --no-run'
  Time (mean ± σ):      4.055 s ±  0.123 s    [User: 3.591 s, System: 1.593 s]
  Range (min … max):    3.804 s …  4.159 s    10 runs
```
and running a single test takes about the same:
```
; hyperfine 'touch lib/src/lib.rs && cargo t --test runner -- test_working_copy'
  Time (mean ± σ):      4.129 s ±  0.120 s    [User: 3.636 s, System: 1.593 s]
  Range (min … max):    3.933 s …  4.346 s    10 runs
```

about 1.4 seconds of that is the time for the runner, of which .4 is the time for the linker. so
there may be room for further improving the times.
2024-02-06 18:19:41 -08:00
Ilya Grigoriev
98948554f7 cli jj config: add jj config path command 2024-02-02 23:29:58 -08:00
Daehyeok Mun
5b6ef63666 Support --user and --repo argument for config list command 2024-01-17 11:19:23 -08:00
Daehyeok Mun
4b224c45e0 Allow printing overridden config values via --include-overridden. 2024-01-16 13:36:50 -08:00
Martin von Zweigbergk
ebec82ee0c cli: allow overwriting non-scalar with jj config set
Before this patch, it was an error to run `jj config set --user foo
'[1]'` twice. But it's only been broken since the previous commit
because '[1]' was interpreted as a string before then.
2023-10-11 07:40:08 -07:00
Martin von Zweigbergk
f654801c20 cli: accept TOML arrays and tables to jj config set 2023-10-11 07:40:08 -07:00
Yuya Nishihara
58acc1d111 tests: replace jj_cmd_success() involving mutation to allow stderr output 2023-10-11 19:24:01 +09:00
Martin von Zweigbergk
f1b817e8ca cleanup: fix warnings from nightly clippy 2023-08-14 22:11:56 -07:00
Martin von Zweigbergk
0075174308 tests: move tests/ under cli/ so they're run again
Thanks to @ilyagr for noticing that they should be moved.
2023-08-05 06:18:59 +00:00
Renamed from tests/test_config_command.rs (Browse further)