@@ -11,20 +11,24 @@ fraught exercise to change this (working) test harness - here be dragons.
11
11
12
12
We aren't the first to bang our heads on this:
13
13
14
- *** Thanks to the [ Fluvio project] ( https://github.com/infinyon/fluvio ) team and
15
- [ Infinyon] ( https://www.infinyon.com ) for sharing the details about [ how to do
16
- this] ( https://www.infinyon.com/blog/2021/04/rust-custom-test-harness/ ) .***
14
+ ***
15
+ Thanks to the following for [ how to do this] ( https://www.infinyon.com/blog/2021/04/rust-custom-test-harness/ )
16
+
17
+ - [ Infinyon] ( https://www.infinyon.com ) .
18
+ - [ Fluvio project] ( https://github.com/infinyon/fluvio )
19
+
20
+ ***
17
21
18
22
## Developing against a test
19
23
20
- 1 . Add the test file, say ` build /issues/nnn.rs` .
24
+ 1 . Add the test file, say ` tests /issues/nnn.rs` .
21
25
2 . Point the in-development test runner to this file:
22
26
23
27
``` rust
24
- // minitrace-tests/src/build /issues.rs
28
+ // minitrace-tests/src/tests /issues.rs
25
29
pub fn indev () {
26
30
// To generate macro result files
27
- macrotest :: expand (" src/build /issues/nnn.rs" );
31
+ macrotest :: expand (" src/tests /issues/nnn.rs" );
28
32
build_indev ();
29
33
}
30
34
```
@@ -34,16 +38,15 @@ this](https://www.infinyon.com/blog/2021/04/rust-custom-test-harness/).***
34
38
35
39
```bash
36
40
cargo test -- manifest - path minitrace - tests / Cargo . toml \
37
- build :: issues :: indev \
41
+ tests :: issues :: indev \
38
42
-- -- nocapture
39
43
```
40
44
41
45
or
42
46
43
47
```bash
44
48
cd minitrace - tests
45
- cargo test build :: issues :: indev \
46
- -- -- nocapture
49
+ cargo test build :: issues :: indev -- -- nocapture
47
50
```
48
51
49
52
5 . Iterate 3 ) and 4 ) until green .
@@ -58,8 +61,7 @@ Add several test cases (developed as above) in the issues category
58
61
2 . Generate the expanded Rust code :
59
62
60
63
```bash
61
- cargo test issues - dev - tokio \
62
- -- no - fail - fast & >~/ tmp / log . txt
64
+ cargo test issues - dev - tokio -- no - fail - fast & >~/ tmp / log . txt
63
65
```
64
66
65
67
3 . Check the expanded code is as expected : `build / issues / nnn . expanded. rs`
0 commit comments