blob: 64bd4cdaa43012cc050fc66737af92e8e5b370ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
;; Check that using different inputs for the instrumentation and splitting steps
;; results in an error.
;; Instrument the module
;; RUN: wasm-split --instrument %s -o %t.instrumented.wasm
;; Generate a profile
;; RUN: node %S/call_exports.mjs %t.instrumented.wasm %t.prof
;; Attempt to split the instrumented module
;; RUN: not wasm-split %t.instrumented.wasm --profile=%t.prof -o1 %t.1.wasm -o2 %t.2.wasm \
;; RUN: 2>&1 | filecheck %s
;; CHECK: error: checksum in profile does not match module checksum. The module to split must be the original, uninstrumented module, not the module used to generate the profile.
;; Check that the matching module succeeds
;; RUN: wasm-split %s --profile=%t.prof -o1 %t.1.wasm -o2 %t.2.wasm
(module
(memory $m 0 0)
(export "memory" (memory $m))
)
|