ok/jj
1
0
Fork 0
forked from mirrors/jj
Commit graph

11 commits

Author SHA1 Message Date
mlcui
c256ad8a0a windows: avoid UNC paths in run_ui_editor
See #3986 for more details. This is a no-op for non-Windows.
2024-07-04 11:30:20 +10:00
Matt Kulukundis
5d307e628b cli: create jj file list and deprecate jj files 2024-06-17 14:13:36 -04:00
Martin von Zweigbergk
fe9daac483 tests: avoid deprecated jj init --git/--git-repo
I left the instances in `test_init_command.rs` alone since they're
about testing `jj init`.
2024-05-17 13:55:20 -07:00
Yuya Nishihara
dcf75788e0 sparse: extract "set --reset" to subcommand
Since --reset conflicts with the other flags, "set --reset" seems odd.
2024-03-29 11:02:31 +09:00
Yuya Nishihara
db94848341 sparse: deduplicate edited patterns
Since "set --add" removes duplicated patterns, it makes sense for "edit" to do
the same thing.
2024-03-29 11:02:31 +09:00
Yuya Nishihara
28e4331787 sparse: extract "set --edit" to subcommand
Even though --edit can be combined with --add/--remove/--clear/--reset, I don't
think it's practically useful.
2024-03-29 11:02:31 +09:00
Yuya Nishihara
fff852f136 sparse: parse and print patterns as workspace-relative paths
Per comment in
https://github.com/martinvonz/jj/pull/3379#pullrequestreview-1963841604

Though cwd-relative path might be useful for --remove, I don't think that's
the common use case. The new behavior is consistent with --edit.
2024-03-29 11:02:31 +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
Yuya Nishihara
7a3e72415c cli: send status messages to stderr, specify stdout/stderr explicitly
Many of &mut UI can be changed to immutable borrows, but I'm not gonna
update them in this patch.
2023-10-11 19:24:01 +09: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
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_sparse_command.rs (Browse further)