diff options
Diffstat (limited to 'test/lit/wasm-split')
-rw-r--r-- | test/lit/wasm-split/basic.wast | 6 | ||||
-rw-r--r-- | test/lit/wasm-split/invalid-options.wast | 18 | ||||
-rw-r--r-- | test/lit/wasm-split/verbose.wast | 2 |
3 files changed, 25 insertions, 1 deletions
diff --git a/test/lit/wasm-split/basic.wast b/test/lit/wasm-split/basic.wast index 6d5e6c870..c0f4db8d0 100644 --- a/test/lit/wasm-split/basic.wast +++ b/test/lit/wasm-split/basic.wast @@ -41,6 +41,12 @@ ;; RUN: wasm-dis %t.both.1.wasm | filecheck %s --check-prefix KEEP-BOTH-PRIMARY ;; RUN: wasm-dis %t.both.2.wasm | filecheck %s --check-prefix KEEP-BOTH-SECONDARY +;; Also check the inverse workflow using --keep-all and --split-funcs +;; RUN: wasm-split %s --export-prefix='%' -g -o1 %t.split-bar.1.wasm -o2 %t.split-bar.2.wasm --split-funcs=bar -v 2>&1 \ +;; RUN: | filecheck %s --check-prefix KEEP-FOO +;; RUN: wasm-dis %t.split-bar.1.wasm | filecheck %s --check-prefix KEEP-FOO-PRIMARY +;; RUN: wasm-dis %t.split-bar.2.wasm | filecheck %s --check-prefix KEEP-FOO-SECONDARY + (module (table $table 1 1 funcref) (elem (i32.const 0) $foo) diff --git a/test/lit/wasm-split/invalid-options.wast b/test/lit/wasm-split/invalid-options.wast index c77691ecc..2f9c0a148 100644 --- a/test/lit/wasm-split/invalid-options.wast +++ b/test/lit/wasm-split/invalid-options.wast @@ -53,6 +53,18 @@ ;; RUN: not wasm-split %s --merge-profiles -g 2>&1 \ ;; RUN: | filecheck %s --check-prefix MERGE-DEBUGINFO +;; --profile cannot be used with --keep-funcs +;; RUN: not wasm-split %s --profile=foo --keep-funcs=foo 2>&1 \ +;; RUN: | filecheck %s --check-prefix PROFILE-KEEP + +;; --profile cannot be used with --split-funcs +;; RUN: not wasm-split %s --profile=foo --split-funcs=foo 2>&1 \ +;; RUN: | filecheck %s --check-prefix PROFILE-SPLIT + +;; --keep-funcs cannot be used with --split-funcs +;; RUN: not wasm-split %s --keep-funcs=foo --split-funcs=foo 2>&1 \ +;; RUN: | filecheck %s --check-prefix KEEP-SPLIT + ;; INSTRUMENT-PROFILE: error: Option --profile cannot be used in instrument mode. ;; INSTRUMENT-OUT1: error: Option --primary-output cannot be used in instrument mode. @@ -79,4 +91,10 @@ ;; MERGE-DEBUGINFO: error: Option --debuginfo cannot be used in merge-profiles mode. +;; PROFILE-KEEP: error: Cannot use both --profile and --keep-funcs. + +;; PROFILE-SPLIT: error: Cannot use both --profile and --split-funcs. + +;; KEEP-SPLIT: error: Cannot use both --keep-funcs and --split-funcs. + (module) diff --git a/test/lit/wasm-split/verbose.wast b/test/lit/wasm-split/verbose.wast index cdedbfae6..0518a03a6 100644 --- a/test/lit/wasm-split/verbose.wast +++ b/test/lit/wasm-split/verbose.wast @@ -1,6 +1,6 @@ ;; Test that --verbose mode correctly prints the kept and split funcs -;; RUN: wasm-split %s --keep-funcs=foo,bar --split-funcs=baz --verbose \ +;; RUN: wasm-split %s --keep-funcs=foo,bar --verbose \ ;; RUN: -o1 %t1.wasm -o2 %t2.wasm | filecheck %s ;; CHECK: Keeping functions: bar, foo{{$}} |