Skip to content

Commit 236bb8e

Browse files
pjromanothomas-bc
authored andcommitted
Add environment setup to CONTRIBUTING.md (nasa#4078)
* Fix typo `cp` to `cd` in CONTRIBUTING.md * Mention Python venv requirements for running tests
1 parent 1ebfb7f commit 236bb8e

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,24 @@ The automatic checking system will run all our unit tests and integration tests
147147
process will take time. Try to run the unit tests locally during development before submitting a PR and use the
148148
automatic checks as a safety net.
149149

150+
Building and running the tests has the same Python virtual environment requirements as developing an F´ project, which
151+
is usually set up by fprime-bootstrap. Steps to set up the environment outside a project are included below.
152+
150153
The tests can be run using the following commands:
151154

152155
```bash
153156
# Go into the fprime directory
154-
cp MY_FPRIME_DIRECTORY
157+
cd MY_FPRIME_DIRECTORY
158+
159+
# Set up and activate a Python virtual environment, if none already:
160+
python3 -m venv .venv
161+
source .venv/bin/activate
162+
163+
# Make sure Python packages from ./requirements.txt are installed and up-to-date:
164+
pip install -Ur requirements.txt
165+
166+
# Initialize googletest submodule:
167+
git submodule update --init --recursive
155168

156169
# Run CI tests on fprime
157170
./ci/tests/Framework.bash
@@ -191,4 +204,4 @@ cp MY_FPRIME_DIRECTORY
191204
fprime-util generate -DFPRIME_SKIP_TOOLS_VERSION_CHECK=1
192205
# Build the project
193206
fprime-util build -j4
194-
```
207+
```

0 commit comments

Comments
 (0)