Do per-feature testing

This commit is contained in:
Dimitris Zervas 2023-06-05 15:17:52 +03:00
parent 6d0990e218
commit 7b792dc749
No known key found for this signature in database
GPG Key ID: 5C27D7C9D1901A30
4 changed files with 10 additions and 6 deletions

View File

@ -24,6 +24,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose --all-features
- name: Run tests
run: cargo test --verbose --all-features
run: cargo build --verbose
- name: Run tests - frida
run: cargo test --verbose
# - name: Run tests - frida
# if: matrix.os == 'windows-latest'
# run: cargo test --verbose --no-default-features --features managed_lib

View File

@ -12,7 +12,7 @@ path = "src/main.rs"
[features]
default = ["frida"]
dll_proxy = []
# dll_proxy = []
managed_lib = ["dep:windows-sys"]
# unmanaged_lib = [],
frida = ["dep:frida", "dep:lazy_static", "dep:serde", "dep:serde_json"]

View File

@ -28,9 +28,8 @@ fn main() {
};
for e in exports.iter() {
// println!("cargo:warning=Exported function: {} => {}-orig.{}", e, lib_name, e);
println!("cargo:warning=Exported function: {} => {}-orig.{}", e, lib_name, e);
println!("cargo:rustc-link-arg=/export:{}={}-orig.{}", e, lib_name, e);
// println!("cargo:rustc-link-lib=dylib={}-orig", lib_name);
}
println!("cargo:warning=Expected library name: {}-orig.dll", lib_name);
println!("cargo:rustc-env=LIB_NAME={}-orig.dll", lib_name);

View File

@ -51,6 +51,7 @@ extern "system" fn DllMain(dll_module: *mut c_void, call_reason: u32, _: *mut ()
mod tests {
use pretty_assertions::assert_eq;
use std::process::Command;
#[cfg(all(windows, feature = "frida"))]
use std::fs;
#[test]