aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane.kolbly@ni.com>2021-12-07 16:47:55 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2022-01-05 10:28:39 -0600
commit7deb56e2123785141e44969937f0ae902ea19c00 (patch)
tree22c5cd6e9bd439d836544801a17f6e05294ef73b /host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp
parent0cfd84732cef5b156b9df478baa8c431740275dc (diff)
downloaduhd-7deb56e2123785141e44969937f0ae902ea19c00.tar.gz
uhd-7deb56e2123785141e44969937f0ae902ea19c00.tar.bz2
uhd-7deb56e2123785141e44969937f0ae902ea19c00.zip
host: tests: Add unit test for ZBX antenna API
Diffstat (limited to 'host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp')
-rw-r--r--host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp b/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp
index 5583cec6f..b6c6c21ba 100644
--- a/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp
+++ b/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp
@@ -734,6 +734,16 @@ BOOST_FIXTURE_TEST_CASE(zbx_ant_test, x400_radio_fixture)
BOOST_CHECK_EQUAL(iter, ret_ant);
}
}
+ for (size_t chan = 0; chan < 2; chan++) {
+ for (auto iter : RX_ANTENNAS) {
+ UHD_LOG_INFO(log, "Testing Antenna: " << iter);
+
+ test_radio->set_rx_antenna(iter, chan);
+
+ std::string ret_ant = test_radio->get_rx_antenna(chan);
+ BOOST_CHECK_EQUAL(iter, ret_ant);
+ }
+ }
log = "ZBX TX ANTENNA TEST";
for (auto fe_path :
{fs_path("dboard/tx_frontends/0"), fs_path("dboard/tx_frontends/1")}) {
@@ -748,6 +758,16 @@ BOOST_FIXTURE_TEST_CASE(zbx_ant_test, x400_radio_fixture)
BOOST_CHECK_EQUAL(iter, ret_ant);
}
}
+ for (size_t chan = 0; chan < 2; chan++) {
+ for (auto iter : TX_ANTENNAS) {
+ UHD_LOG_INFO(log, "Testing Antenna: " << iter);
+
+ test_radio->set_tx_antenna(iter, chan);
+
+ std::string ret_ant = test_radio->get_tx_antenna(chan);
+ BOOST_CHECK_EQUAL(iter, ret_ant);
+ }
+ }
}
BOOST_FIXTURE_TEST_CASE(zbx_freq_coercion_test, x400_radio_fixture)