* Fix cargo-build/test-bpf --workspace (#16431)
(cherry picked from commit 878e52f0b9
)
# Conflicts:
# ci/test-stable.sh
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
@ -79,7 +79,6 @@ _ ci/do-audit.sh
|
||||
cd "$project"
|
||||
_ "$cargo" nightly clippy -- --deny=warnings --allow=clippy::missing_safety_doc
|
||||
_ "$cargo" stable fmt -- --check
|
||||
_ "$cargo" nightly test
|
||||
)
|
||||
done
|
||||
}
|
||||
|
@ -43,7 +43,11 @@ test-stable-perf)
|
||||
# BPF solana-sdk legacy compile test
|
||||
./cargo-build-bpf --manifest-path sdk/Cargo.toml
|
||||
|
||||
# BPF program tests
|
||||
# BPF Program unit tests
|
||||
"$cargo" stable test --manifest-path programs/bpf/Cargo.toml
|
||||
cargo-build-bpf --manifest-path programs/bpf/Cargo.toml --bpf-sdk sdk/bpf
|
||||
|
||||
# BPF program system tests
|
||||
_ make -C programs/bpf/c tests
|
||||
_ "$cargo" stable test \
|
||||
--manifest-path programs/bpf/Cargo.toml \
|
||||
|
@ -401,8 +401,14 @@ fn build_bpf(config: Config, manifest_path: Option<PathBuf>) {
|
||||
.packages
|
||||
.iter()
|
||||
.filter(|package| {
|
||||
package.manifest_path.with_file_name("Xargo.toml").exists()
|
||||
&& metadata.workspace_members.contains(&package.id)
|
||||
if metadata.workspace_members.contains(&package.id) {
|
||||
for target in package.targets.iter() {
|
||||
if target.kind.contains(&"cdylib".to_string()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
@ -152,8 +152,14 @@ fn test_bpf(config: Config, manifest_path: Option<PathBuf>) {
|
||||
.packages
|
||||
.iter()
|
||||
.filter(|package| {
|
||||
package.manifest_path.with_file_name("Xargo.toml").exists()
|
||||
&& metadata.workspace_members.contains(&package.id)
|
||||
if metadata.workspace_members.contains(&package.id) {
|
||||
for target in package.targets.iter() {
|
||||
if target.kind.contains(&"cdylib".to_string()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
Reference in New Issue
Block a user