diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-07-07 15:46:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 08:46:17 -0700 |
commit | 11050145e91bdcac580a5cc7e651133f5089e84f (patch) | |
tree | 27644c3b529de2970c0a6883c7a511e5d2affc38 /test/lit/help/wasm-split.test | |
parent | cdf9ee0fdff72384d2192fb32c20bf05287dba97 (diff) | |
download | binaryen-11050145e91bdcac580a5cc7e651133f5089e84f.tar.gz binaryen-11050145e91bdcac580a5cc7e651133f5089e84f.tar.bz2 binaryen-11050145e91bdcac580a5cc7e651133f5089e84f.zip |
Lit tests for tool help messages (#3965)
Add list tests for the help messages of all tools, factoring out common options
into shared tests. This is slightly brittle because the text wrapping depends on
the length of the longest option, but that brittleness should be worth the
benefit of being able to see the actual help text in the tests.
Diffstat (limited to 'test/lit/help/wasm-split.test')
-rw-r--r-- | test/lit/help/wasm-split.test | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/test/lit/help/wasm-split.test b/test/lit/help/wasm-split.test new file mode 100644 index 000000000..28f079d2f --- /dev/null +++ b/test/lit/help/wasm-split.test @@ -0,0 +1,101 @@ +;; RUN: wasm-split --help | filecheck %s + +;; CHECK-NEXT: wasm-split INFILES +;; CHECK-NEXT: +;; CHECK-NEXT: Split a module into a primary module and a secondary module, or instrument a +;; CHECK-NEXT: module to gather a profile that can inform future splitting, or manage such +;; CHECK-NEXT: profiles. Options that are only accepted in particular modes are marked with the +;; CHECK-NEXT: accepted "[<modes>]" in their descriptions. +;; CHECK-NEXT: + +;; Skip standard tool options + +;; CHECK: --no-validation,-n Disables validation, assumes inputs are +;; CHECK-NEXT: correct +;; CHECK-NEXT: +;; CHECK-NEXT: --pass-arg,-pa An argument passed along to optimization +;; CHECK-NEXT: passes being run. Must be in the form +;; CHECK-NEXT: KEY@VALUE +;; CHECK-NEXT: +;; CHECK-NEXT: --nominal Use the prototype nominal type system +;; CHECK-NEXT: instead of the normal equirecursive type +;; CHECK-NEXT: system. +;; CHECK-NEXT: +;; CHECK-NEXT: --split Split an input module into two output +;; CHECK-NEXT: modules. The default mode. +;; CHECK-NEXT: +;; CHECK-NEXT: --instrument Instrument an input module to allow it to +;; CHECK-NEXT: generate a profile that can be used to +;; CHECK-NEXT: guide splitting. +;; CHECK-NEXT: +;; CHECK-NEXT: --merge-profiles Merge multiple profiles for the same +;; CHECK-NEXT: module into a single profile. +;; CHECK-NEXT: +;; CHECK-NEXT: --profile [split] The profile to use to guide +;; CHECK-NEXT: splitting. +;; CHECK-NEXT: +;; CHECK-NEXT: --keep-funcs [split] Comma-separated list of functions +;; CHECK-NEXT: to keep in the primary module, regardless +;; CHECK-NEXT: of any profile. +;; CHECK-NEXT: +;; CHECK-NEXT: --split-funcs [split] Comma-separated list of functions +;; CHECK-NEXT: to split into the secondary module, +;; CHECK-NEXT: regardless of any profile. If there is no +;; CHECK-NEXT: profile, then this defaults to all +;; CHECK-NEXT: functions defined in the module. +;; CHECK-NEXT: +;; CHECK-NEXT: --primary-output,-o1 [split] Output file for the primary +;; CHECK-NEXT: module. +;; CHECK-NEXT: +;; CHECK-NEXT: --secondary-output,-o2 [split] Output file for the secondary +;; CHECK-NEXT: module. +;; CHECK-NEXT: +;; CHECK-NEXT: --symbolmap [split] Write a symbol map file for each +;; CHECK-NEXT: of the output modules. +;; CHECK-NEXT: +;; CHECK-NEXT: --placeholdermap [split] Write a file mapping placeholder +;; CHECK-NEXT: indices to the function names. +;; CHECK-NEXT: +;; CHECK-NEXT: --import-namespace [split] The namespace from which to +;; CHECK-NEXT: import objects from the primary module +;; CHECK-NEXT: into the secondary module. +;; CHECK-NEXT: +;; CHECK-NEXT: --placeholder-namespace [split] The namespace from which to +;; CHECK-NEXT: import placeholder functions into the +;; CHECK-NEXT: primary module. +;; CHECK-NEXT: +;; CHECK-NEXT: --export-prefix [split] An identifying prefix to prepend +;; CHECK-NEXT: to new export names created by module +;; CHECK-NEXT: splitting. +;; CHECK-NEXT: +;; CHECK-NEXT: --profile-export [instrument] The export name of the +;; CHECK-NEXT: function the embedder calls to write the +;; CHECK-NEXT: profile into memory. Defaults to +;; CHECK-NEXT: `__write_profile`. +;; CHECK-NEXT: +;; CHECK-NEXT: --emit-module-names [split, instrument] Emit module names, +;; CHECK-NEXT: even if not emitting the rest of the +;; CHECK-NEXT: names section. Can help differentiate the +;; CHECK-NEXT: modules in stack traces. This option will +;; CHECK-NEXT: be removed once simpler ways of naming +;; CHECK-NEXT: modules are widely available. See +;; CHECK-NEXT: https://bugs.chromium.org/p/v8/issues/detail?id=11808. +;; CHECK-NEXT: +;; CHECK-NEXT: --initial-table [split, instrument] A hack to ensure the +;; CHECK-NEXT: split and instrumented modules have the +;; CHECK-NEXT: same table size when using Emscripten's +;; CHECK-NEXT: SPLIT_MODULE mode with dynamic linking. +;; CHECK-NEXT: TODO: Figure out a more elegant solution +;; CHECK-NEXT: for that use case and remove this. +;; CHECK-NEXT: +;; CHECK-NEXT: --emit-text,-S [split, instrument] Emit text instead of +;; CHECK-NEXT: binary for the output file or files. +;; CHECK-NEXT: +;; CHECK-NEXT: --debuginfo,-g [split, instrument] Emit names section in +;; CHECK-NEXT: wasm binary (or full debuginfo in wast) +;; CHECK-NEXT: +;; CHECK-NEXT: --output,-o [instrument, merge-profiles] Output file. +;; CHECK-NEXT: +;; CHECK-NEXT: --verbose,-v Verbose output mode. Prints the functions +;; CHECK-NEXT: that will be kept and split out when +;; CHECK-NEXT: splitting a module. |