Skip to content

Commit 816d755

Browse files
committed
Improved the contrubiting docs, adding infromation about the steps needed to run cargo tests.
1 parent cfe88fa commit 816d755

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,30 @@ To run specific tests, use appropriate flags such as:
3434
- `./y.sh test --test-libcore`
3535
- `./y.sh test --std-tests`
3636
- `cargo test -- <name of test>`
37+
##### Cargo tests
38+
To run `cargo test`s, you need to do a few things.
39+
First and foremost, set the correct `LD_LIBRARY_PATH` and `LIBRARY_PATH`.
40+
41+
You can find out this path by running `./y.sh build`.
42+
You should see output like this:
43+
```
44+
[BUILD] build system
45+
Finished `release` profile [optimized] target(s) in 0.01s
46+
Using `EXAMPLE_PATH` as path for libgccjit
47+
Finished `dev` profile [optimized + debuginfo] target(s) in 0.02s
48+
```
49+
Copy the path from that output, and use it to set `LD_LIBRARY_PATH` and `LIBRARY_PATH`.
50+
```shell
51+
export EXAMPLE_PATH=SOME_PATH
52+
export EXAMPLE_PATH=SOME_PATH
53+
```
54+
Before running any of the cargo tests, you must also first run this command:
55+
```sh
56+
./y.sh test --mini-tests
57+
```
58+
It will build some of the dependencies neccesary for running tests.
59+
60+
##### `libgccjit` tests
3761

3862
Additionally, you can run the tests of `libgccjit`:
3963

0 commit comments

Comments
 (0)