wasmer_integration_tests_cli/
fixtures.rs1use std::path::{Path, PathBuf};
4
5use crate::{asset_path, c_asset_path};
6
7pub fn resources() -> PathBuf {
8 Path::new(env!("CARGO_MANIFEST_DIR")).join("resources")
9}
10
11pub fn packages() -> PathBuf {
12 Path::new(env!("CARGO_MANIFEST_DIR"))
13 .join("tests")
14 .join("packages")
15}
16
17pub fn php() -> (PathBuf, PathBuf, PathBuf) {
18 let root = Path::new(env!("CARGO_MANIFEST_DIR"));
19 let resources = resources().join("php");
20 (
21 root.join("tests").join("wasm").join("php.wasm"),
22 resources.clone(),
23 resources.join("db"),
24 )
25}
26
27pub fn python() -> PathBuf {
29 c_asset_path().join("python-0.1.0.wasmer")
30}
31
32pub fn coreutils() -> PathBuf {
34 Path::new(env!("CARGO_MANIFEST_DIR"))
35 .join("tests")
36 .join("webc")
37 .join("coreutils-1.0.16-e27dbb4f-2ef2-4b44-b46a-ddd86497c6d7.webc")
38}
39
40pub fn bash() -> PathBuf {
42 Path::new(env!("CARGO_MANIFEST_DIR"))
43 .join("tests")
44 .join("webc")
45 .join("bash-1.0.16-f097441a-a80b-4e0d-87d7-684918ef4bb6.webc")
46}
47
48pub fn wabt() -> PathBuf {
51 c_asset_path().join("wabt-1.0.37.wasmer")
52}
53
54pub fn static_server() -> PathBuf {
56 c_asset_path().join("staticserver.webc")
57}
58
59pub fn qjs() -> PathBuf {
61 c_asset_path().join("qjs.wasm")
62}
63
64pub fn hello() -> PathBuf {
65 Path::new(env!("CARGO_MANIFEST_DIR"))
66 .join("tests")
67 .join("webc")
68 .join("hello-0.1.0-665d2ddc-80e6-4845-85d3-4587b1693bb7.webc")
69}
70
71pub fn qjs_wasmer_toml() -> PathBuf {
73 c_asset_path().join("qjs-wasmer.toml")
74}
75
76pub fn fib() -> PathBuf {
78 asset_path().join("fib.wat")
79}
80
81pub fn wat_no_start() -> PathBuf {
83 asset_path().join("no_start.wat")
84}