uniffi_testing 0.27.2
legitimate Mozilla testing crate
“a multi-language bindings generator for rust (testing helpers)”
imports std::process::Commandimports std::process::Stdio
SHA-2562cfe857c83a2655412745e31929c05486d02b340336b595b7044eff342cf6c91
MaleculeH₂(FPo₂)
Evidence
1/* This Source Code Form is subject to the terms of the Mozilla Public
2License, v. 2.0. If a copy of the MPL was not distributed with this
3* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5use anyhow::{bail, Result};
6use camino::{Utf8Path, Utf8PathBuf};
7use cargo_metadata::{Message, Metadata, MetadataCommand, Package, Target};
8use fs_err as fs;
9use once_cell::sync::Lazy;
10use std::{
11 collections::hash_map::DefaultHasher,
12 env,
13 env::consts::DLL_EXTENSION,
14 hash::{Hash, Hasher},
15 process::{Command, Stdio},
16};
17
18// A source to compile for a test
19#[derive(Debug)]
20pub struct CompileSource {
21 pub udl_path: Utf8PathBuf,
22 pub config_path: Optio …
28:72… uild_messages);
29
30/// Struct for running fixture and example tests for bindings generators
31///
32/// Expectations:
33/// - Used from a integration tes …
57:5… .filter(|p| p.name == name)
58 .collect();
59 match matching.len() {
60 1 => Ok(matching[0].clone()),
61 n => ba …
140:14… est = out_dir.as_ref().join(path.file_name().unwrap());
141 fs::copy(&path, &dest)?;
142 Ok(dest)
143 }
144
145 /// Get the path to the cdylib file for this package
146 pub fn cdylib_path(&self) - …
157:5… et_cargo_build_messages() -> Vec<Message> {
158 let mut child = Command::new(env!("CARGO"))
159 .arg("build")
160 .arg("--message-format=json")
161 .stdout(Stdio::piped())
162 .spawn()
163 .expect(" …
No evidence locations were recorded for this file. Raw result