message: Fix make package not running in integration tests
diff: @@ -172,21 +172,9 @@ fn package_directory(in_dir: &PathBuf, out: &PathBuf) {
  a.finish().unwrap();
  }
  -/// TODO: on linux-musl, the packaging of libwasmer.a doesn't work properly
  -/// Tracked in https://github.com/wasmerio/wasmer/issues/3271
  -#[cfg(not(target_env = "musl"))]
  -#[cfg(feature = "webc_runner")]
  -#[test]
  -fn test_wasmer_create_exe_pirita_works() -> anyhow::Result<()> {
  - let temp_dir = tempfile::TempDir::new()?;
  - let python_wasmer_path = temp_dir.path().join("python.wasmer");
  - std::fs::copy(wasi_test_python_path(), &python_wasmer_path)?;
  - let python_exe_output_path = temp_dir.path().join("python");
  -
  - let native_target = target_lexicon::HOST;
  - let root_path = get_repo_root_path().unwrap();
  - let package_path = root_path.join("package");
  - if !package_path.join("lib").join("libwasmer.a").exists() {
  +#[allow(dead_code)]
  +#[cfg(test)]
  +fn make_package(root_path: &PathBuf) -> anyhow::Result<()> {
  let current_dir = std::env::current_dir().unwrap();
  println!("running make && make build-capi && make package-capi && make package...");
  println!("current dir = {}", current_dir.display());
  @@ -254,7 +242,24 @@ fn test_wasmer_create_exe_pirita_works() -> anyhow::Result<()> {
  println!("make package failed: (stdout = {stdout}, stderr = {stderr})");
  }
  println!("make package ok!");
  + Ok(())
  }
  +
  +/// TODO: on linux-musl, the packaging of libwasmer.a doesn't work properly
  +/// Tracked in https://github.com/wasmerio/wasmer/issues/3271
  +#[cfg(not(target_env = "musl"))]
  +#[cfg(feature = "webc_runner")]
  +#[test]
  +fn test_wasmer_create_exe_pirita_works() -> anyhow::Result<()> {
  + let temp_dir = tempfile::TempDir::new()?;
  + let python_wasmer_path = temp_dir.path().join("python.wasmer");
  + std::fs::copy(wasi_test_python_path(), &python_wasmer_path)?;
  + let python_exe_output_path = temp_dir.path().join("python");
  +
  + let native_target = target_lexicon::HOST;
  + let root_path = get_repo_root_path().unwrap();
  + let package_path = root_path.join("package");
  + make_package(&root_path)?;
  if !package_path.exists() {
  panic!("package path {} does not exist", package_path.display());
  }
  