From 4b77127ed6fbf61617b4bee4c19bef378ebb4f92 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Thu, 7 Oct 2021 14:55:27 +0200 Subject: [PATCH] Added missing SSB pattern to unit test --- lib/src/phy/sync/test/CMakeLists.txt | 8 ++++---- lib/src/phy/sync/test/ssb_decode_test.c | 2 +- lib/src/phy/sync/test/ssb_measure_test.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/phy/sync/test/CMakeLists.txt b/lib/src/phy/sync/test/CMakeLists.txt index d416cdc0b..acbde2454 100644 --- a/lib/src/phy/sync/test/CMakeLists.txt +++ b/lib/src/phy/sync/test/CMakeLists.txt @@ -140,19 +140,19 @@ foreach (SSB_SCS 15 30) # For 1.0 GHz and 3.5 GHz Center frequencies foreach (CELL_FREQ 1000000000 3500000000) # For SSB centered at -960, 0 and 960 kHz from the center frequency - foreach (SSB_OFFSET_FREQ -960000 0 960000) + foreach (SSB_OFFSET_FREQ -960000 +0 +960000) # For patterns A, B, C foreach (SSB_PATTERN A B C) # Calculate Actual SSB center frequency - math(EXPR SSB_FREQ "${CELL_FREQ} + (${SSB_OFFSET_FREQ})") + math(EXPR SSB_FREQ "${CELL_FREQ}${SSB_OFFSET_FREQ}") # Test SSB measurements add_nr_test(ssb_measure_test_${CELL_FREQ}_${CELL_SCS}_${SSB_FREQ}_${SSB_SCS}_${SSB_PATTERN} ssb_measure_test - -F ${CELL_FREQ} -S ${CELL_SCS} -f ${SSB_FREQ} -s ${SSB_SCS}) + -F ${CELL_FREQ} -S ${CELL_SCS} -f ${SSB_FREQ} -s ${SSB_SCS} -P ${SSB_PATTERN}) # Test SSB PBCH decoding add_nr_test(ssb_decode_test_${CELL_FREQ}_${CELL_SCS}_${SSB_FREQ}_${SSB_SCS}_${SSB_PATTERN} ssb_decode_test - -F ${CELL_FREQ} -S ${CELL_SCS} -f ${SSB_FREQ} -s ${SSB_SCS}) + -F ${CELL_FREQ} -S ${CELL_SCS} -f ${SSB_FREQ} -s ${SSB_SCS} -P ${SSB_PATTERN}) endforeach () endforeach () endforeach () diff --git a/lib/src/phy/sync/test/ssb_decode_test.c b/lib/src/phy/sync/test/ssb_decode_test.c index be0fd322f..c40e8838d 100644 --- a/lib/src/phy/sync/test/ssb_decode_test.c +++ b/lib/src/phy/sync/test/ssb_decode_test.c @@ -55,7 +55,7 @@ static void usage(char* prog) static void parse_args(int argc, char** argv) { int opt; - while ((opt = getopt(argc, argv, "SsFfv")) != -1) { + while ((opt = getopt(argc, argv, "SsFfPv")) != -1) { switch (opt) { case 's': ssb_scs = srsran_subcarrier_spacing_from_str(argv[optind]); diff --git a/lib/src/phy/sync/test/ssb_measure_test.c b/lib/src/phy/sync/test/ssb_measure_test.c index 5ecad89ee..b202c743d 100644 --- a/lib/src/phy/sync/test/ssb_measure_test.c +++ b/lib/src/phy/sync/test/ssb_measure_test.c @@ -60,7 +60,7 @@ static void usage(char* prog) static void parse_args(int argc, char** argv) { int opt; - while ((opt = getopt(argc, argv, "SsFfv")) != -1) { + while ((opt = getopt(argc, argv, "SsFfPv")) != -1) { switch (opt) { case 's': ssb_scs = srsran_subcarrier_spacing_from_str(argv[optind]);