Skip to content

Commit 60d1332

Browse files
authored
feat: added auto-generation of a command line docs page (#113)
resolves #89 [#89]
1 parent cf70a34 commit 60d1332

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,12 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
9292
target_link_libraries(pluginval PRIVATE
9393
-static-libstdc++)
9494
endif()
95+
96+
set (cmdline_docs_out "${CMAKE_CURRENT_LIST_DIR}/docs/Command line options.md")
97+
98+
add_custom_command (OUTPUT "${cmdline_docs_out}"
99+
COMMAND pluginval --help > "${cmdline_docs_out}"
100+
COMMENT "Regenerating Command line options.md..."
101+
USES_TERMINAL)
102+
103+
add_custom_target (PluginvalDocs DEPENDS "${cmdline_docs_out}")

docs/Command line options.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//==============================================================================
2+
pluginval
3+
JUCE v7.0.2
4+
5+
Description:
6+
Validate plugins to test compatibility with hosts and verify plugin API conformance
7+
8+
Usage:
9+
--validate [pathToPlugin]
10+
Validates the plugin at the given path.
11+
N.B. the --validate flag is optional if the path is the last argument. This enables you to validate a plugin with simply "pluginval path_to_plugin".
12+
--strictness-level [1-10]
13+
Sets the strictness level to use. A minimum level of 5 (also the default) is recomended for compatibility. Higher levels include longer, more thorough tests such as fuzzing.
14+
--random-seed [hex or int]
15+
Sets the random seed to use for the tests. Useful for replicating test environments.
16+
--timeout-ms [numMilliseconds]
17+
Sets a timout which will stop validation with an error if no output from any test has happened for this number of ms.
18+
By default this is 30s but can be set to -1 to never timeout.
19+
--verbose
20+
If specified, outputs additional logging information. It can be useful to turn this off when building with CI to avoid huge log files.
21+
--skip-gui-tests
22+
If specified, avoids tests that create GUI windows, which can cause problems on headless CI systems.
23+
--repeat [num repeats]
24+
If specified repeats the tests a given number of times. Note that this does not delete and re-instantiate the plugin for each repeat. --randomise
25+
If specified the tests are run in a random order per repeat. --data-file [pathToFile]
26+
If specified, sets a path to a data file which can be used by tests to configure themselves. This can be useful for things like known audio output.
27+
--output-dir [pathToDir]
28+
If specified, sets a directory to store the log files. This can be useful for continuous integration.
29+
--disabled-tests [pathToFile]
30+
If specified, sets a path to a file that should have the names of disabled tests on each row.
31+
--sample-rates [list of comma separated sample rates]
32+
If specified, sets the list of sample rates at which tests will be executed (default=44100,48000,96000)
33+
--block-sizes [list of comma separated block sizes]
34+
If specified, sets the list of block sizes at which tests will be executed (default=64,128,256,512,1024)
35+
--vst3validator [pathToValidator]
36+
If specified, this will run the VST3 validator as part of the test process.
37+
--version
38+
Print pluginval version.
39+
40+
Exit code:
41+
0 if all tests complete successfully
42+
1 if there are any errors
43+
44+
Additionally, you can specify any of the command line options as environment varibles by removing prefix dashes, converting internal dashes to underscores and captialising all letters e.g. "--skip-gui-tests" > "SKIP_GUI_TESTS=1", "--timeout-ms 30000" > "TIMEOUT_MS=30000"
45+
Specifying specific command-line options will override any environment variables set for that option.
46+
47+
pluginval --version Prints the current version number
48+
pluginval --help|-h Prints the list of commands
49+
pluginval --validate [pathToPlugin] Validates the file (or IDs for AUs).
50+
pluginval --run-tests Runs the internal unit tests.
51+

0 commit comments

Comments
 (0)