Document version changes in emulator models

A consistency check ensures that all versions reported by the emulator
appear in the documentation as the latest version. This prevents
forgetting updating the version in the documentation.
This commit is contained in:
Rodrigo Arias 2024-03-14 13:45:59 +01:00
parent 929cc12c04
commit 2c58a6058b
5 changed files with 78 additions and 0 deletions

View File

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add the ability to restrict transitions in the task model states.
- Add nOS-V support for parallel tasks reading the body id from the
event payload.
- Keep a changelog of emulation model versions.
### Changed

View File

@ -0,0 +1,45 @@
# Model versions
Track changes in emulator model versions.
!!! Note
These versions cover the [events defined](events.md) in the emulator models.
They are **not related to the versions of the libraries**.
## Nanos6
- nanos6 1.0.0: Initial version
## Nodes
- nodes 1.0.0: Initial version
## Kernel
- kernel 1.0.0: Initial version
## MPI
- mpi 1.0.0: Initial version
## Ovni
- ovni 1.0.0: Initial version
## OpenMP
- openmp 1.1.0: Initial version
## TAMPI
- tampi 1.0.0: Initial version
## nOS-V
- nosv 2.0.0
- Add support for parallel tasks, adding a new `bodyid` argument in `VT*` events.
- Remove support for old attach events `VH{aA}`.
- nosv 1.1.0
- Ignore old attach events `VH{aA}`.
- Add new API attach `VA{aA}` and detach `VA{eE}` events.
- nosv 1.0.0: Initial version.

View File

@ -39,6 +39,7 @@ nav:
- user/emulation/mpi.md
- user/emulation/openmp.md
- user/emulation/events.md
- user/emulation/versions.md
- CHANGELOG.md
- 'Developer guide':
- dev/index.md

View File

@ -27,3 +27,4 @@ test_emu(flush-tmpdir.c MP DRIVER "flush-tmpdir.driver.sh")
test_emu(tmpdir-metadata.c MP DRIVER "tmpdir-metadata.driver.sh")
test_emu(dummy.c NAME "ovniver" DRIVER "ovniver.driver.sh")
test_emu(dummy.c NAME "match-doc-events" DRIVER "match-doc-events.sh")
test_emu(dummy.c NAME "match-doc-version" DRIVER "match-doc-version.sh")

View File

@ -0,0 +1,30 @@
docs="$OVNI_SOURCE_DIR/doc/user/emulation/versions.md"
# Check that the last version of every model appears in the versions.md
# documentation changelog.
(
# Extract model last versions
models=$(ovniemu -h 2>&1 | awk '/emulation models/ { p=1; next } p { print $2, $3}')
if [ -z "$models" ]; then
echo "ERROR: No models read"
exit 1
fi
echo "$models" | while read -r model version; do
# Find the first version of the model (the latest)
first=$(grep -m 1 -- "^- $model " "$docs")
if [ -z "$first" ]; then
echo "ERROR: No match of model '$model' in $docs" >&2
exit 1
fi
# And match it to the one reported by the emulator
matched=$(echo "$first" | grep -- "- $model $version" || true)
if [ -z "$matched" ]; then
echo "ERROR: Version $version is not the latest in model $model in $docs" >&2
exit 1
fi
done
)