Merge remote-tracking branch 'origin/phy_simulators_ctest' into integration_2025_w20 (!3379)

Add physim tests into ctest framework

Convert physim testcases listed in
cmake_targets/autotests/test_case_list.xml into ctest. Note: Tests for
dlsim_tm4 are excluded, due to compilation issues.

CTest evaluates success based on return code: '0' = pass, non-zero =
fail. For some simulators, the return code is non-zero even when the
test is successful (as indicated by success messages in the test logs).
For some simulators, the return code is always '0'. This inconsistency
has been address in the first two commits of this MR.

To build and execute these tests:

- using cmake

    cd openairinterface5g
    mkdir build && cd build # you can also do that in cmake_targets/ran_build/build
    cmake .. -GNinja -DENABLE_PHYSIM_TESTS=ON && ninja tests
    ctest

- using build_oai: physim-related ctests are activated when PHY
  simulators are built (use build_oai with '-P' or '--phy_simulators'
  option)

    cd openairinterface5g/cmake_targets
    ./build_oai --ninja --phy_simulators
    cd ran_build/build
    ctest

Link to newly created 4g and 5g RAN-Physim-Cluster pipelines:

- RAN-Physim-Cluster-4G: https://jenkins-oai.eurecom.fr/job/RAN-Physim-Cluster-4G/
- RAN-Physim-Cluster-5G: https://jenkins-oai.eurecom.fr/job/RAN-Physim-Cluster-5G/
This commit is contained in:
Robert Schmidt
2025-05-17 12:05:27 +02:00
126 changed files with 782 additions and 5539 deletions
+1 -1
View File
@@ -892,7 +892,7 @@ int main(int argc, char **argv) {
set_glog_onlinelog(true);
// enable these lines if you need debug info
set_glog(loglvl);
SET_LOG_DEBUG(DEBUG_UE_TIMING);
// SET_LOG_DEBUG(DEBUG_UE_TIMING);
// moreover you need to init itti with the following line
// however itti will catch all signals, so ctrl-c won't work anymore
// alternatively you can disable ITTI completely in CMakeLists.txt
+3 -4
View File
@@ -943,8 +943,7 @@ printf("%d\n", slot);
nr_ue_phy_config_request(&UE_mac->phy_config);
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
int n_errs = 0;
int ret = 1;
initNamedTpool(gNBthreads, &gNB->threadPool, true, "gNB-tpool");
initNotifiedFIFO(&gNB->L1_tx_free);
initNotifiedFIFO(&gNB->L1_tx_filled);
@@ -1371,10 +1370,10 @@ printf("%d\n", slot);
if (effRate > (eff_tp_check*TBS)) {
printf("PDSCH test OK\n");
ret = 0;
break;
}
n_errs = n_errors[0];
} // NSR
free(Sched_INFO);
@@ -1423,7 +1422,7 @@ printf("%d\n", slot);
free(filename_csv);
}
return n_errs;
return ret;
}
+3 -1
View File
@@ -146,6 +146,7 @@ int main(int argc, char **argv)
// int subframe_offset;
// char fname[40], vname[40];
int trial,n_trials=1,n_errors=0,n_errors_payload=0;
int ret_test = 1;
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
uint16_t Nid_cell=0;
uint64_t SSB_positions=0x01;
@@ -771,6 +772,7 @@ int main(int argc, char **argv)
if (((float)n_errors/(float)n_trials <= target_error_rate) && (n_errors_payload==0)) {
printf("PBCH test OK\n");
ret_test = 0;
break;
}
@@ -816,6 +818,6 @@ int main(int argc, char **argv)
loader_reset();
logTerm();
return(n_errors);
return ret_test;
}
+3 -1
View File
@@ -109,6 +109,7 @@ int main(int argc, char **argv)
//int subframe_offset;
//char fname[40], vname[40];
int trial,n_trials=100,n_errors=0,ack_nack_errors=0,sr_errors=0;
int ret = 1;
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
uint16_t Nid_cell=0;
uint64_t SSB_positions=0x01;
@@ -758,6 +759,7 @@ int main(int argc, char **argv)
printf("ACK/NACK: SNR=%f, n_trials=%d, n_bit_errors=%d\n",SNR,n_trials,ack_nack_errors);
if((float)(ack_nack_errors+sr_errors)/(float)(n_trials)<=target_error_rate){
printf("PUCCH test OK\n");
ret = 0;
break;
}
}
@@ -799,5 +801,5 @@ int main(int argc, char **argv)
loader_reset();
logTerm();
return(n_errors);
return ret;
}