Skip to content

Commit 632afbe

Browse files
adpaco-awstedinski
authored andcommitted
Move dashboard under developer documentation (rust-lang#715)
* Rename - Works as usual * Changes in `build-docs.sh` * Changes to docs * Update workflow * Update remaining refs to dashboard
1 parent 73c85ab commit 632afbe

File tree

58 files changed

+150
-151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+150
-151
lines changed

.github/workflows/rmc.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ jobs:
5757
- name: Execute RMC regression
5858
run: ./scripts/rmc-regression.sh
5959

60-
- name: Install dashboard dependencies
60+
- name: Install book runner dependencies
6161
if: ${{ matrix.os == 'ubuntu-20.04' }}
62-
run: ./scripts/setup/install_dashboard_deps.sh
62+
run: ./scripts/setup/install_bookrunner_deps.sh
6363

64-
- name: Generate RMC dashboard
64+
- name: Generate book runner report
6565
if: ${{ matrix.os == 'ubuntu-20.04' }}
66-
run: ./x.py run -i --stage 1 dashboard
66+
run: ./x.py run -i --stage 1 bookrunner
6767

68-
- name: Print RMC dashboard results
68+
- name: Print book runner text results
6969
if: ${{ matrix.os == 'ubuntu-20.04' }}
70-
run: cat build/output/latest/html/dashboard.txt
70+
run: cat build/output/latest/html/bookrunner.txt
7171

7272
# On one OS only, build the documentation, too.
7373
- name: Build Documentation

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ src/test/rustdoc-gui/src/**.lock
7979
/.litani_cache_dir
8080
/.ninja_deps
8181
/.ninja_log
82-
/src/test/dashboard
82+
/src/test/bookrunner
8383
*Cargo.lock
8484
src/test/rmc-dependency-test/diamond-dependency/build
8585
src/test/rmc-multicrate/type-mismatch/mismatch/target

Cargo.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,19 @@ dependencies = [
186186
"byte-tools",
187187
]
188188

189+
[[package]]
190+
name = "bookrunner"
191+
version = "0.1.0"
192+
dependencies = [
193+
"Inflector",
194+
"pulldown-cmark",
195+
"rustdoc",
196+
"serde",
197+
"serde_json",
198+
"toml",
199+
"walkdir",
200+
]
201+
189202
[[package]]
190203
name = "bootstrap"
191204
version = "0.0.0"
@@ -987,19 +1000,6 @@ dependencies = [
9871000
"winapi",
9881001
]
9891002

990-
[[package]]
991-
name = "dashboard"
992-
version = "0.1.0"
993-
dependencies = [
994-
"Inflector",
995-
"pulldown-cmark",
996-
"rustdoc",
997-
"serde",
998-
"serde_json",
999-
"toml",
1000-
"walkdir",
1001-
]
1002-
10031003
[[package]]
10041004
name = "datafrog"
10051005
version = "2.0.1"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ members = [
77
"library/rmc",
88
"library/rmc_restrictions",
99
"src/rustdoc-json-types",
10+
"src/tools/bookrunner",
1011
"src/tools/cargotest",
1112
"src/tools/clippy",
1213
"src/tools/clippy/clippy_dev",
1314
"src/tools/compiletest",
14-
"src/tools/dashboard",
1515
"src/tools/error_index_generator",
1616
"src/tools/linkchecker",
1717
"src/tools/lint-docs",

rmc-docs/build-docs.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ if [ ! -x mdbook ]; then
1717
tar zxf $FILE
1818
fi
1919

20-
# Publish dashboard into our documentation
20+
# Publish bookrunner report into our documentation
2121
RMC_DIR=$SCRIPT_DIR/..
2222
HTML_DIR=$RMC_DIR/build/output/latest/html/
2323

2424
if [ -d $HTML_DIR ]; then
2525
# Litani run is copied into `src` to avoid deletion by `mdbook`
26-
cp -r $HTML_DIR src/dashboard/
26+
cp -r $HTML_DIR src/bookrunner/
2727
# Replace artifacts by examples under test
28-
BOOKS_DIR=$RMC_DIR/src/test/dashboard/books
29-
rm -r src/dashboard/artifacts
30-
cp -r $BOOKS_DIR src/dashboard/artifacts
31-
# Update paths in HTML dashboard
32-
python $RMC_DIR/scripts/ci/update_dashboard.py src/dashboard/index.html new_index.html
33-
mv new_index.html src/dashboard/index.html
34-
35-
rm src/dashboard/run.json
28+
BOOKS_DIR=$RMC_DIR/src/test/bookrunner/books
29+
rm -r src/bookrunner/artifacts
30+
cp -r $BOOKS_DIR src/bookrunner/artifacts
31+
# Update paths in HTML report
32+
python $RMC_DIR/scripts/ci/update_bookrunner_report.py src/bookrunner/index.html new_index.html
33+
mv new_index.html src/bookrunner/index.html
34+
35+
# rm src/bookrunner/run.json
3636
else
37-
echo "WARNING: Could not find the latest dashboard run."
37+
echo "WARNING: Could not find the latest bookrunner run."
3838
fi
3939

4040
# Build the book into ./book/

rmc-docs/src/SUMMARY.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@
1717

1818
- [RMC developer documentation](./dev-documentation.md)
1919
- [Testing](./rmc-testing.md)
20-
21-
- [RMC dashboard](./dashboard.md)
20+
- [Book runner](./bookrunner.md)
Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# RMC Dashboard
1+
# Book runner
22

3-
The [RMC Dashboard](./dashboard/index.html) is a testing tool based on [Litani](https://github.com/awslabs/aws-build-accumulator).
3+
The [book runner](./bookrunner/index.html) is a testing tool based on [Litani](https://github.com/awslabs/aws-build-accumulator).
44

5-
The purpose of the dashboard to show the level of support in RMC for all Rust features.
5+
The purpose of the book runner is to get data about feature coverage in RMC.
66
To this end, we use Rust code snippet examples from the following general Rust documentation books:
77
* The Rust Reference
88
* The Rustonomicon
@@ -12,7 +12,7 @@ To this end, we use Rust code snippet examples from the following general Rust d
1212
However, not all examples from these books are suited for verification.
1313
For instance, some of them are only included to show what is valid Rust code (or what is not).
1414

15-
Because of that, we run up to three different types of jobs when generating the dashboard:
15+
Because of that, we run up to three different types of jobs when generating the report:
1616
* `check` jobs: This check uses the Rust front-end to detect if the example is valid Rust code.
1717
* `codegen` jobs: This check uses the RMC back-end to determine if we can generate GotoC code.
1818
* `verification` jobs: This check uses CBMC to obtain a verification result.
@@ -22,9 +22,10 @@ Similary, a `codegen` job depends on a `check` job.
2222

2323
> **Warning:** [Litani](https://github.com/awslabs/aws-build-accumulator) does
2424
> not support hierarchical views at the moment. For this reason, we are
25-
> publishing a [text version of the dashboard](./dashboard/dashboard.txt) which
26-
> displays the same results in a hierarchical way while we work on adding more
27-
> features to [Litani](https://github.com/awslabs/aws-build-accumulator).
25+
> publishing a [text version of the book runner
26+
> report](./bookrunner/bookrunner.txt) which displays the same results in a
27+
> hierarchical way while we work on adding more features to
28+
> [Litani](https://github.com/awslabs/aws-build-accumulator).
2829
2930
Before running the above mentioned jobs, we pre-process the examples to:
3031
1. Set the expected output according to flags present in the code snippet.
@@ -35,41 +36,41 @@ The results are summarized as follows: If the obtained and expected outputs diff
3536
the color of the stage bar will be red. Otherwise, it will be blue.
3637
If an example shows one red bar, it is considered a failed example that cannot be handled by RMC.
3738

38-
The [RMC Dashboard](./dashboard/index.html) and [its text version](./dashboard/dashboard.txt) are
39+
The [book runner report](./bookrunner/index.html) and [its text version](./bookrunner/bookrunner.txt) are
3940
automatically updated whenever a PR gets merged into RMC.
4041

41-
## The dashboard procedure
42+
## The book running procedure
4243

43-
This section describes how the dashboard operates at a high level.
44+
This section describes how the book runner operates at a high level.
4445

45-
To kick off the dashboard process use
46+
To kick off the book runner process use
4647

4748
```
48-
./x.py run -i --stage 1 dashboard
49+
./x.py run -i --stage 1 bookrunner
4950
```
5051

51-
The main function of the dashboard is `generate_dashboard()` in
52-
[`src/tools/dashboard/src/books.rs`](https://github.com/model-checking/rmc/blob/main/src/tools/dashboard/src/books.rs),
52+
The main function of the bookrunner is `generate_run()` in
53+
[`src/tools/bookrunner/src/books.rs`](https://github.com/model-checking/rmc/blob/main/src/tools/bookrunner/src/books.rs),
5354
which follows these steps:
5455
* First, it calls the different `parse_..._hierarchy()` functions which parse
5556
the summary files for each book.
5657
* The `extract_examples(...)` function uses `rustdoc` to extract all examples
5758
from the books.
5859
* Then for each example it will check if there is a corresponding `.props` file
59-
in `src/tools/dashboard/configs/`. The contents of these files (e.g.,
60+
in `src/tools/bookrunner/configs/`. The contents of these files (e.g.,
6061
command-line options) are prepended to the example.
61-
* All examples are written in the `src/test/dashboard/books/` folder.
62+
* All examples are written in the `src/test/bookrunner/books/` folder.
6263

6364
In general, the path to a given example is
64-
`src/test/dashboard/books/<book>/<chapter>/<section>/<subsection>/<line>.rs`
65+
`src/test/bookrunner/books/<book>/<chapter>/<section>/<subsection>/<line>.rs`
6566
where `<line>` is the line number where the example appears in the
6667
documentation. The `.props` files mentioned above follow the same naming
6768
scheme in order to match them and detect conflicts.
6869

6970
* Then all examples are run using
7071
[Litani](https://github.com/awslabs/aws-build-accumulator).
7172
* Finally, the Litani log is used to generate the [text version of the
72-
dashboard](./dashboard/dashboard.txt).
73+
bookrunner](./bookrunner/bookrunner.txt).
7374

7475
> **Warning:** Note that any changes done to the examples in
75-
> `src/test/dashboard/books/` may be gone if the dashboard is executed.
76+
> `src/test/bookrunner/books/` may be gone if the bookrunner is executed.

rmc-docs/src/dev-documentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ rm -r build/x86_64-unknown-linux-gnu/test/
2828
./x.py test -i --stage 1 rmc firecracker prusti smack expected cargo-rmc rmc-docs
2929
```
3030
```bash
31-
# Dashboard run
32-
./scripts/setup/install_dashboard_deps.sh
33-
./x.py run -i --stage 1 dashboard
31+
# Book runner run
32+
./scripts/setup/install_bookrunner_deps.sh
33+
./x.py run -i --stage 1 bookrunner
3434
```
3535
```bash
3636
# Documentation build

rmc-docs/src/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ But RMC is also useful for finding panics in safe Rust, and it can check user-de
99

1010
RMC is currently in the initial development phase, and has not yet made an official release.
1111
It is under active development, but it does not yet support all Rust language features.
12-
(The [RMC dashboard](./dashboard.md) can help you understand our current progress.)
12+
(The [Book runner](./bookrunner.md) can help you understand our current progress.)
1313
If you encounter issues when using RMC we encourage you to [report them to us](https://github.com/model-checking/rmc/issues/new/choose).
1414

1515
RMC usually syncs with the main branch of Rust every week, and so is generally up-to-date with the latest Rust language features.

rmc-docs/src/rmc-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ two very good reasons to do it:
1515

1616
We recommend reading our section on [Regression Testing](#regression-testing)
1717
if you are interested in RMC development. At present, we obtain metrics based
18-
on the [RMC dashboard](./dashboard.md).
18+
on the [book runner](./bookrunner.md).
1919

2020
# Regression testing
2121

scripts/ci/update_dashboard.py renamed to scripts/ci/update_bookrunner_report.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ def update_path(run, path):
1111
1212
By default, the path to an example follows this pattern:
1313
14-
`src/test/dashboard/books/<book>/<chapter>/<section>/<subsection>/<line>.rs`
14+
`src/test/bookrunner/books/<book>/<chapter>/<section>/<subsection>/<line>.rs`
1515
1616
However, only the first part is shown since these paths are enclosed
1717
in paragraph markers (`<p>` and `</p>`). So they are often rendered as:
1818
19-
`src/test/dashboard/books/<book>/<chapter>/...
19+
`src/test/bookrunner/books/<book>/<chapter>/...
2020
21-
This update removes `src/test/dashboard/books/` from the path (common to
21+
This update removes `src/test/bookrunner/books/` from the path (common to
2222
all examples) and transforms them into anchor elements with a link to
2323
the example, so the path to the example is shown as:
2424
@@ -34,7 +34,7 @@ def update_path(run, path):
3434

3535
def main():
3636
parser = argparse.ArgumentParser(
37-
description='Produces an updated HTML dashboard file from the '
37+
description='Produces an updated HTML report file from the '
3838
'contents of an HTML file generated with `litani`')
3939
parser.add_argument('input')
4040
parser.add_argument('output')

scripts/setup/install_dashboard_deps.sh renamed to scripts/setup/install_bookrunner_deps.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
set -eu
66

7-
# The RMC Dashboard is generated using [Litani](https://github.com/awslabs/aws-build-accumulator)
7+
# The book runner report is generated using [Litani](https://github.com/awslabs/aws-build-accumulator)
88

99
# Litani's dependencies:
1010
DEPS=(
@@ -15,7 +15,7 @@ DEPS=(
1515
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes "${DEPS[@]}"
1616

1717
PYTHON_DEPS=(
18-
bs4 # Used for dashboard updates
18+
bs4 # Used for report updates
1919
jinja2
2020
)
2121

src/bootstrap/builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ impl<'a> Builder<'a> {
381381
tool::Linkchecker,
382382
tool::CargoTest,
383383
tool::Compiletest,
384-
tool::Dashboard,
384+
tool::BookRunner,
385385
tool::RemoteTestServer,
386386
tool::RemoteTestClient,
387387
tool::RustInstaller,
@@ -471,7 +471,7 @@ impl<'a> Builder<'a> {
471471
test::SMACK,
472472
test::CargoRMC,
473473
test::Expected,
474-
test::Dashboard,
474+
test::BookRunner,
475475
test::Stub,
476476
test::RmcDocs,
477477
test::RmcFixme,
@@ -538,7 +538,7 @@ impl<'a> Builder<'a> {
538538
install::Rustc
539539
),
540540
Kind::Run => describe!(
541-
run::Dashboard,
541+
run::BookRunner,
542542
run::ExpandYamlAnchors,
543543
run::BuildManifest,
544544
run::BumpStage0

src/bootstrap/run.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,35 @@ use build_helper::output;
66
use std::process::Command;
77

88
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
9-
pub struct Dashboard {
9+
pub struct BookRunner {
1010
pub compiler: Compiler,
1111
}
1212

13-
impl Step for Dashboard {
13+
impl Step for BookRunner {
1414
type Output = ();
1515

16-
/// Runs the `dashboard` tool.
16+
/// Runs the `bookrunner` tool.
1717
///
1818
/// This tool in `src/tools` extracts examples from books, runs them through
1919
/// RMC, and displays their results.
2020
fn run(self, builder: &Builder<'_>) {
21-
// Before running the dashboard, we need to ensure that it is already
21+
// Before running `bookrunner`, we need to ensure that it is already
2222
// built.
23-
let dashboard = builder.ensure(tool::Dashboard { compiler: self.compiler });
23+
let book_runner = builder.ensure(tool::BookRunner { compiler: self.compiler });
2424
// We also need to ensure that stage n standard library is built for
2525
// rmc-rustc.
2626
builder.ensure(compile::Std { compiler: self.compiler, target: self.compiler.host });
2727
let target = builder.config.build.triple;
28-
builder.info("Generating confidence dashboard");
29-
try_run(builder, Command::new(dashboard).env("TRIPLE", target));
28+
builder.info("Launching book runner...");
29+
try_run(builder, Command::new(book_runner).env("TRIPLE", target));
3030
}
3131

3232
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
33-
run.path("src/tools/dashboard")
33+
run.path("src/tools/bookrunner")
3434
}
3535

3636
fn make_run(run: RunConfig<'_>) {
37-
run.builder.ensure(Dashboard {
37+
run.builder.ensure(BookRunner {
3838
compiler: run.builder.compiler(run.builder.top_stage, run.target),
3939
});
4040
}

src/bootstrap/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ default_test!(CargoRMC { path: "src/test/cargo-rmc", mode: "cargo-rmc", suite: "
12271227

12281228
default_test!(Expected { path: "src/test/expected", mode: "expected", suite: "expected" });
12291229

1230-
default_test!(Dashboard { path: "src/test/dashboard", mode: "rmc", suite: "dashboard" });
1230+
default_test!(BookRunner { path: "src/test/bookrunner", mode: "rmc", suite: "bookrunner" });
12311231

12321232
default_test!(RmcDocs { path: "src/test/rmc-docs", mode: "rmc", suite: "rmc-docs" });
12331233

0 commit comments

Comments
 (0)