Skip to content

Commit

Permalink
Fix regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamwaffles committed Jul 21, 2024
1 parent bca2605 commit b5cd267
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ target_steps_linux: &target_steps_linux
- run: rustup target add x86_64-unknown-linux-gnu || true
# For XDP
- run:
sudo apt update && sudo apt install -qq build-essential m4 clang bpftool libelf-dev
libpcap-dev
sudo apt update && sudo apt install -qq build-essential m4 clang libelf-dev libpcap-dev
linux-hwe-6.5-tools-common
# For XDP
- run: sudo ln -s /usr/include/asm-generic/ /usr/include/asm
- run: |
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub use ethercrab_wire::{
EtherCrabWireRead, EtherCrabWireReadSized, EtherCrabWireReadWrite, EtherCrabWireSized,
EtherCrabWireWrite, EtherCrabWireWriteSized,
};
pub use pdu_loop::{PduLoop, PduRx, PduStorage, PduTx, SendableFrame};
pub use pdu_loop::{PduLoop, PduRx, PduStorage, PduTx, ReceiveAction, SendableFrame};
pub use register::{DcSupport, RegisterAddress};
pub use slave::{DcSync, Slave, SlaveIdentity, SlavePdi, SlaveRef};
pub use slave_group::{GroupId, GroupSlaveIterator, SlaveGroup, SlaveGroupHandle};
Expand Down
8 changes: 4 additions & 4 deletions tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ethercrab::{
error::Error,
internals::{EthercatFrameHeader, PduHeader},
std::tx_rx_task,
PduRx, PduTx,
PduRx, PduTx, ReceiveAction,
};
use ethercrab_wire::EtherCrabWireRead;
use pcap_file::pcapng::{Block, PcapNgReader};
Expand Down Expand Up @@ -81,7 +81,7 @@ struct DummyTxRxFut<'a> {
}

impl Future for DummyTxRxFut<'_> {
type Output = Result<(), Error>;
type Output = Result<ReceiveAction, Error>;

fn poll(mut self: Pin<&mut Self>, ctx: &mut core::task::Context<'_>) -> Poll<Self::Output> {
self.tx.replace_waker(ctx.waker());
Expand Down Expand Up @@ -127,7 +127,7 @@ impl Future for DummyTxRxFut<'_> {
.pop_front()
.expect("Not enough packets for this preamble");

self.rx.receive_frame(expected.as_ref()).expect("Frame RX")
self.rx.receive_frame(expected.as_ref()).expect("Frame RX");
}

Poll::Pending
Expand All @@ -139,7 +139,7 @@ pub fn dummy_tx_rx_task(
capture_file_path: &str,
pdu_tx: PduTx<'static>,
pdu_rx: PduRx<'static>,
) -> Result<impl Future<Output = Result<(), Error>>, std::io::Error> {
) -> Result<impl Future<Output = Result<ReceiveAction, Error>>, std::io::Error> {
// let file_in = File::open(capture_file_path).expect("Error opening file");
let file_in2 = File::open(capture_file_path).expect("Error opening file");
// let pcapng_reader = PcapNgReader::new(file_in).expect("Failed to init PCAP reader");
Expand Down

0 comments on commit b5cd267

Please sign in to comment.