Skip to content

Commit c1f8907

Browse files
deploy: 4b9e40b
1 parent cb4cfe0 commit c1f8907

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

getting-started/testing.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ <h2><a class="header" href="#building-and-running-the-test-suite-with-swiftpm" i
214214
use to run your tests. Because of this building tests and running them are two separate steps when
215215
using <code>SwiftPM</code>. After your tests are built, you can use a WASI-compatible host such as
216216
<a href="https://wasmtime.dev/">wasmtime</a> to run the test bundle:</p>
217-
<pre><code class="language-sh">$ wasmtime .build/wasm32-unknown-wasi/debug/ExamplePackageTests.wasm
217+
<pre><code class="language-sh">$ wasmtime --dir . .build/wasm32-unknown-wasi/debug/ExamplePackageTests.wasm
218218
</code></pre>
219+
<p>(<code>--dir .</code> is used to allow XCTest to find <code>Bundle.main</code> resources placed alongside the executable file.)</p>
219220
<p>As you can see, the produced test binary starts with the name of your package followed by
220221
<code>PackageTests.wasm</code>. It is located in the <code>.build/debug</code> subdirectory, or in the <code>.build/release</code>
221222
subdirectory when you build in release mode.</p>

print.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,9 @@ <h2><a class="header" href="#building-and-running-the-test-suite-with-swiftpm" i
646646
use to run your tests. Because of this building tests and running them are two separate steps when
647647
using <code>SwiftPM</code>. After your tests are built, you can use a WASI-compatible host such as
648648
<a href="https://wasmtime.dev/">wasmtime</a> to run the test bundle:</p>
649-
<pre><code class="language-sh">$ wasmtime .build/wasm32-unknown-wasi/debug/ExamplePackageTests.wasm
649+
<pre><code class="language-sh">$ wasmtime --dir . .build/wasm32-unknown-wasi/debug/ExamplePackageTests.wasm
650650
</code></pre>
651+
<p>(<code>--dir .</code> is used to allow XCTest to find <code>Bundle.main</code> resources placed alongside the executable file.)</p>
651652
<p>As you can see, the produced test binary starts with the name of your package followed by
652653
<code>PackageTests.wasm</code>. It is located in the <code>.build/debug</code> subdirectory, or in the <code>.build/release</code>
653654
subdirectory when you build in release mode.</p>

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

searchindex.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)