Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wasmer run not interpreting URLs correctly + display fixes #3370

Merged
merged 31 commits into from
Nov 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5d1d4f3
Fix #3366 - file paths could get interpreted as URLs in wasmer run
fschutt Nov 24, 2022
351b0a6
Add integration test, use different spinner library to fix #3346
fschutt Nov 24, 2022
3e4a08f
Use with_context with proper formatting
fschutt Nov 24, 2022
8674d8c
Adress review comments and fix test
fschutt Nov 24, 2022
4ec584c
Install cowsay properly
fschutt Nov 24, 2022
2145c2d
Disable test from running locally
fschutt Nov 24, 2022
cded3ac
Install wapm before running integration tests
fschutt Nov 24, 2022
75aeeda
Install wapm via cargo if not available (Windows)
fschutt Nov 24, 2022
b5c4952
Remove dependency on wapm
fschutt Nov 24, 2022
3d4c34b
Undo installing wapm automatically
fschutt Nov 24, 2022
b5be679
Remove dependency on wapm in unit tests
fschutt Nov 24, 2022
8676105
Merge branch 'master' into fix-3366
fschutt Nov 24, 2022
6eca5b9
Do not use home_dir
fschutt Nov 24, 2022
95d77d5
Update wrong error message
fschutt Nov 24, 2022
ddf1903
Fix unit test
fschutt Nov 24, 2022
429229f
Remove unnecessary fs::copy
fschutt Nov 24, 2022
4b4214d
Remove unnecessary line from gitignore
fschutt Nov 24, 2022
4040320
Make sure that the test is being run on Windows
fschutt Nov 24, 2022
3db9ac6
Fix "wasmer" -> get_wasmer_path()
fschutt Nov 25, 2022
854f9be
Fix Makefile on Windows
fschutt Nov 25, 2022
7df82ec
Merge branch 'master' into fix-3366
fschutt Nov 25, 2022
1969692
Windows: make path complex by canonicalizing
fschutt Nov 25, 2022
6d559c2
Fix wasmer_run_complex_url on Windows GitHub CI
fschutt Nov 25, 2022
c352e1c
Fix compilation error in complex_url test
fschutt Nov 25, 2022
9285031
Remove temporary out.tar.gz
fschutt Nov 25, 2022
808bcca
Fix last compile error on Windows
fschutt Nov 25, 2022
468c587
Windows: test that path actually conflicts with URL
fschutt Nov 25, 2022
fda1a3f
Replace \\ with / on Windows
fschutt Nov 25, 2022
1594c88
Debug why Windows can't find qjs.wasm
fschutt Nov 25, 2022
a0668f9
Get better at locating wasmer.exe for running integration tests
fschutt Nov 25, 2022
83a3854
Remove printlns in test_wasmer_run_complex_url
fschutt Nov 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Get better at locating wasmer.exe for running integration tests
  • Loading branch information
fschutt committed Nov 25, 2022
commit a0668f92ea387aea38e33828c1ee4658aab337c6
1 change: 1 addition & 0 deletions tests/integration/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ target-lexicon = "0.12.4"
[dependencies]
anyhow = "1"
tempfile = "3"
target-lexicon = "0.12.5"

[features]
default = ["webc_runner"]
43 changes: 40 additions & 3 deletions tests/integration/cli/src/assets.rs
Original file line number Diff line number Diff line change
@@ -63,21 +63,58 @@ pub fn get_wasmer_path() -> PathBuf {
ret = PathBuf::from(format!("{}wasmer", WASMER_TARGET_PATH2));
}
if !ret.exists() {
match get_repo_root_path() {
ret = match get_repo_root_path() {
Some(s) => {
#[cfg(target_os = "windows")]
{
return s.join("target").join("release").join("wasmer.exe");
s.join("target").join("release").join("wasmer.exe")
}
#[cfg(not(target_os = "windows"))]
{
return s.join("target").join("release").join("wasmer");
s.join("target").join("release").join("wasmer")
}
}
None => {
panic!("Could not find wasmer executable path! {:?}", ret);
}
};
}

if !ret.exists() {
ret = match get_repo_root_path() {
Some(s) => {
#[cfg(target_os = "windows")]
{
s.join("target")
.join(target_lexicon::HOST.to_string())
.join("release")
.join("wasmer.exe")
}
#[cfg(not(target_os = "windows"))]
{
s.join("target")
.join(target_lexicon::HOST.to_string())
.join("release")
.join("wasmer")
}
}
None => {
panic!("Could not find wasmer executable path! {:?}", ret);
}
};
}

if !ret.exists() {
if let Some(root) = get_repo_root_path() {
use std::process::Stdio;
let _ = std::process::Command::new("ls")
.arg(root.join("target"))
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.stdin(Stdio::null())
.output();
}
panic!("cannot find wasmer / wasmer.exe for integration test!");
}
ret
}