Skip to content

Commit

Permalink
Place sentences in separate lines in READMEs (space-ros/docker#113).
Browse files Browse the repository at this point in the history
Having long sentences in READMEs makes them harder to change, and also makes
processing the diffs harder (among other disadvantages).

This commit implements the one-sentence-per-line principle, by placing
different sentences in separate lines in the README.
  • Loading branch information
ivanperez-keera committed Jan 12, 2024
1 parent d407400 commit 630f913
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions spaceros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ To build the image, run:

The build process will take about 20 or 30 minutes, depending on the host computer.

The build process defaults to cloning the `ros2.repos` file from [spaceros](https://github.com/space-ros/space-ros) repository. It looks for a branch with the same name as the current local branch; if it doesn't find one, it falls back to cloning from the main branch. For testing purposes, you can customize both the spaceros repository URL and the branch name by modifying arguments defined in the [Earthfile](./Earthfile).
The build process defaults to cloning the `ros2.repos` file from [spaceros](https://github.com/space-ros/space-ros) repository.
It looks for a branch with the same name as the current local branch; if it doesn't find one, it falls back to cloning from the main branch.
For testing purposes, you can customize both the spaceros repository URL and the branch name by modifying arguments defined in the [Earthfile](./Earthfile).
Example:
```bash
earthly +image --SPACEROS_REPO_URL="https://github.com/my-org/my-spaceros-fork.git" --SPACEROS_GIT_REF="my-branch-name"
Expand Down Expand Up @@ -107,15 +109,17 @@ spaceros-user@d10d85c68f0e:~/spaceros$ colcon test --ctest-args -LE "(ikos|xfail

The tests include running the static analysis tools clang_tidy and cppcheck (which has the MISRA 2012 add-on enabled).

You can use colcon's `--packages-select` option to run a subset of packages. For example, to run tests only for the rcpputils package and display the output directly to the console (as well as saving it to a log file), you can run:
You can use colcon's `--packages-select` option to run a subset of packages.
For example, to run tests only for the rcpputils package and display the output directly to the console (as well as saving it to a log file), you can run:

```
spaceros-user@d10d85c68f0e:~/spaceros$ colcon test --event-handlers console_direct+ --packages-select rcpputils
```

## Viewing Test Output

The output from the tests are stored in XUnit XML files, named *\<tool-name\>*.xunit.xml. After running the unit tests, you can scan the build directory for the various *\*.xunit.xml* files.
The output from the tests are stored in XUnit XML files, named *\<tool-name\>*.xunit.xml.
After running the unit tests, you can scan the build directory for the various *\*.xunit.xml* files.

For example, a clang_tidy.xunit.xml file looks like this:

Expand Down Expand Up @@ -181,7 +185,8 @@ CONTAINER ID IMAGE COMMAND CREATED
d10d85c68f0e openrobotics/spaceros "/entrypoint.sh …" 28 minutes ago Up 28 minutes inspiring_moser
```

The container ID in this case, is *d10d85c68f0e*. So, run the following command in the host terminal:
The container ID in this case, is *d10d85c68f0e*.
So, run the following command in the host terminal:

```bash
docker exec -it d10d85c68f0e /bin/bash --init-file "install/setup.bash"
Expand Down Expand Up @@ -223,7 +228,8 @@ spaceros-user@d10d85c68f0e:~/spaceros$ colcon test --build-base build_ikos --ins
```

The `colcon test` command runs various tests, including IKOS report generation, which reads the IKOS database generated in the previous analysis step and generates a JUnit XML report file.
After running `colcon test`, you can view the JUnit XML files. For example, to view the JUnit XML file for IKOS scan of the rcpputils binaries you can use the following command:
After running `colcon test`, you can view the JUnit XML files.
For example, to view the JUnit XML file for IKOS scan of the rcpputils binaries you can use the following command:

```
spaceros-user@d10d85c68f0e:~/spaceros$ more build_ikos/rcpputils/test_results/rcpputils/ikos.xunit.xml
Expand Down

0 comments on commit 630f913

Please sign in to comment.