Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove pythnet feature flag #399

Merged
merged 13 commits into from
Mar 27, 2024
Prev Previous commit
Next Next commit
address comments
cctdaniel committed Mar 27, 2024
commit 10dce76f03311d3c3faae50f716480a57c0f2e45
10 changes: 0 additions & 10 deletions program/rust/src/tests/pyth_simulator.rs
Original file line number Diff line number Diff line change
@@ -102,16 +102,6 @@ struct ProductMetadata {
impl PythSimulator {
/// Deploys the oracle program as upgradable
pub async fn new() -> PythSimulator {
let mut cmd = std::process::Command::new("cargo");
cmd.arg("build-bpf");
let status = cmd.status().unwrap();

if !status.success() {
panic!(
"cargo-build-bpf did not exit with 0 (code {:?})",
status.code()
);
}
let target_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/../../target");
let oracle_program_binary_path = PathBuf::from(target_dir).join("deploy/pyth_oracle.so");
let mut bpf_data = read_file(&oracle_program_binary_path);
2 changes: 1 addition & 1 deletion scripts/build-bpf.sh
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ set -x
cd "${PYTH_DIR}"

# Re-run tests affected by features
cargo test --locked
cargo-test-bpf
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo-test-bpf doesn't work with -- --locked


cargo-build-bpf -- --locked -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort
sha256sum ./target/**/*.so