diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index a6ff59f3c8..72bc4df93a 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1037,7 +1037,7 @@ $OPENAIR_DIR/targets/bin/polartest.Rel15 -q -s-10 -f0 - ldpctest.test1 + polartest.test1 BLER= 0.000000 segmentation fault|assertion|exiting|fatal 3 diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index c04d469d8d..3c725eb5f2 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -82,6 +82,7 @@ int main(int argc, char *argv[]) { SNRstop =-6.0; decoder_int16=1; break; + case 'h': printf("./polartest -s SNRstart -d SNRinc -f SNRstop -m [0=PBCH|1=DCI|2=UCI] -i iterations -l decoderListSize -a pathMetricAppr -q (use fixed point decoder)\n"); exit(-1); @@ -108,11 +109,14 @@ int main(int argc, char *argv[]) { //Logging time_t currentTime; time (¤tTime); - char *folderName, fileName[512], currentTimeInfo[25]; + char fileName[512], currentTimeInfo[25]; + char folderName[] = "."; + /* folderName=getenv("HOME"); strcat(folderName,"/Desktop/polartestResults"); - + */ + #ifdef DEBUG_POLAR_TIMING sprintf(fileName,"%s/TIMING_ListSize_%d_pmAppr_%d_Payload_%d_Itr_%d",folderName,decoderListSize,pathMetricAppr,testLength,iterations); #else @@ -122,15 +126,17 @@ int main(int argc, char *argv[]) { strcat(fileName,currentTimeInfo); //Create "~/Desktop/polartestResults" folder if it doesn't already exist. + /* struct stat folder = {0}; if (stat(folderName, &folder) == -1) mkdir(folderName, S_IRWXU | S_IRWXG | S_IRWXO); - + */ + FILE* logFile; - logFile = fopen(fileName, "w"); - if (logFile==NULL) { - fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); - exit(-1); - } + logFile = fopen(fileName, "w"); + if (logFile==NULL) { + fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); + exit(-1); + } #ifdef DEBUG_POLAR_TIMING fprintf(logFile,",timeEncoderCRCByte[us],timeEncoderCRCBit[us],timeEncoderInterleaver[us],timeEncoderBitInsertion[us],timeEncoder1[us],timeEncoder2[us],timeEncoderRateMatching[us],timeEncoderByte2Bit[us]\n");