From 9e30ac5116f27988be803806edbbc83d8671bef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=BCtt?= Date: Tue, 29 Nov 2022 11:41:23 +0100 Subject: [PATCH] Debug why linker invocation doesn't work --- .github/workflows/test.yaml | 2 +- .gitignore | 4 ++++ .../tests/wasmer-c-api-test-runner/src/lib.rs | 21 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9a2ac41f5d4..7bb326a9798 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -501,7 +501,7 @@ jobs: env: RUST_BACKTRACE: 1 RUSTFLAGS: "-Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off" - WASMER_DIR: ./package + WASMER_DIR: "" WAPM_DEV_TOKEN: ${{ secrets.WAPM_DEV_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload coverage to Codecov diff --git a/.gitignore b/.gitignore index 24affcea4df..82fb23a6485 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,7 @@ api-docs-repo/ /avd /core out.txt +wapm.toml +build-capi.tar.gz +build-wasmer.tar.gz +lcov.info \ No newline at end of file diff --git a/lib/c-api/tests/wasmer-c-api-test-runner/src/lib.rs b/lib/c-api/tests/wasmer-c-api-test-runner/src/lib.rs index fe82ab0aef1..3ff6e0e50ba 100644 --- a/lib/c-api/tests/wasmer-c-api-test-runner/src/lib.rs +++ b/lib/c-api/tests/wasmer-c-api-test-runner/src/lib.rs @@ -1,5 +1,7 @@ #[cfg(test)] use std::error::Error; +#[cfg(test)] +use std::process::Stdio; #[cfg(test)] static INCLUDE_REGEX: &str = "#include \"(.*)\""; @@ -278,6 +280,9 @@ fn test_ok() { println!("compile: {command:#?}"); // compile let output = command + .stdout(Stdio::inherit()) + .stderr(Stdio::inherit()) + .current_dir(find_wasmer_base_dir()) .output() .expect(&format!("failed to compile {command:#?}")); if !output.status.success() { @@ -317,6 +322,14 @@ fn print_wasmer_root_to_stdout(config: &Config) { use walkdir::WalkDir; + println!( + "wasmer dir: {}", + std::path::Path::new(&config.wasmer_dir) + .canonicalize() + .unwrap() + .display() + ); + for entry in WalkDir::new(&config.wasmer_dir) .into_iter() .filter_map(Result::ok) @@ -325,6 +338,14 @@ fn print_wasmer_root_to_stdout(config: &Config) { println!("{f_name}"); } + println!( + "root dir: {}", + std::path::Path::new(&config.root_dir) + .canonicalize() + .unwrap() + .display() + ); + for entry in WalkDir::new(&config.root_dir) .into_iter() .filter_map(Result::ok)