mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-13 09:49:11 +03:00
add cargo aliases for convenient test running
This commit is contained in:
parent
2cf10e3564
commit
af8ee4b7bb
4
.cargo/config
Normal file
4
.cargo/config
Normal file
@ -0,0 +1,4 @@
|
||||
[alias]
|
||||
test-gen-llvm = "test -p test_gen"
|
||||
test-gen-dev = "test -p test_gen --no-default-features --features gen-dev"
|
||||
test-gen-wasm = "test -p test_gen --no-default-features --features gen-wasm"
|
28
compiler/test_gen/README.md
Normal file
28
compiler/test_gen/README.md
Normal file
@ -0,0 +1,28 @@
|
||||
# Running our CodeGen tests
|
||||
|
||||
Our code generation tests are all in this crate. Feature flags are used to run the tests with a specific backend. For convenience, some aliases are added in `.cargo/config`:
|
||||
|
||||
```toml
|
||||
[alias]
|
||||
test-gen-llvm = "test -p test_gen"
|
||||
test-gen-dev = "test -p test_gen --no-default-features --features gen-dev"
|
||||
test-gen-wasm = "test -p test_gen --no-default-features --features gen-wasm"
|
||||
```
|
||||
|
||||
So we can run:
|
||||
|
||||
```
|
||||
cargo test-gen-llvm
|
||||
```
|
||||
|
||||
To run the gen tests with the LLVM backend. To filter tests, append a filter like so:
|
||||
|
||||
```
|
||||
> cargo test-gen-wasm wasm_str::small
|
||||
Finished test [unoptimized + debuginfo] target(s) in 0.13s
|
||||
Running src/tests.rs (target/debug/deps/test_gen-b4ad63a9dd50f050)
|
||||
|
||||
running 2 tests
|
||||
test wasm_str::small_str_literal ... ok
|
||||
test wasm_str::small_str_zeroed_literal ... ok
|
||||
```
|
Loading…
Reference in New Issue
Block a user