| Relative Time (s) | \n') - self.htmlFile.write('Test Id | \n') + self.htmlFile.write('Test Index | \n') self.htmlFile.write('Test Desc | \n') self.htmlFile.write('Test Options | \n') self.htmlFile.write('Test Status | \n') @@ -259,7 +259,7 @@ class HTMLManagement(): currentTime = int(round(time.time() * 1000)) - self.startTime self.htmlFile.write('
|---|---|---|---|---|---|
| ' + format(currentTime / 1000, '.1f') + ' | \n') - self.htmlFile.write('' + self.testCase_id + ' | \n') + self.htmlFile.write('' + self.testCaseIdx + ' | \n') self.htmlFile.write('' + self.desc + ' | \n') self.htmlFile.write('' + str(options) + ' | \n') if (str(status) == 'OK'): @@ -374,7 +374,7 @@ class HTMLManagement(): addOrangeBK = False self.htmlFile.write('|
| ' + format(currentTime / 1000, '.1f') + ' | \n') - self.htmlFile.write('' + self.testCase_id + ' | \n') + self.htmlFile.write('' + self.testCaseIdx + ' | \n') self.htmlFile.write('' + self.desc + ' | \n') self.htmlFile.write('' + str(options) + ' | \n') if (str(status) == 'OK'): diff --git a/ci-scripts/cls_static_code_analysis.py b/ci-scripts/cls_static_code_analysis.py index 63b5b5b6dd..5ed52e4027 100644 --- a/ci-scripts/cls_static_code_analysis.py +++ b/ci-scripts/cls_static_code_analysis.py @@ -88,7 +88,6 @@ class StaticCodeAnalysis(): raise ValueError(f"{lSourcePath=} {node=}") logging.debug('Building on server: ' + node) cmd = cls_cmd.getConnection(node) - self.testCase_id = HTML.testCase_id # on RedHat/CentOS .git extension is mandatory result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository) if result is not None: @@ -187,8 +186,6 @@ class StaticCodeAnalysis(): raise ValueError(f"{lSourcePath=} {node=}") logging.debug('Building on server: ' + node) cmd = cls_cmd.getConnection(node) - self.testCase_id = HTML.testCase_id - check_options = '' if self.ranAllowMerge: check_options = f'--build-arg MERGE_REQUEST=true --build-arg SRC_BRANCH={self.ranBranch}' diff --git a/ci-scripts/conf_files/gnb-cucp.sa.e1-ho-n2.conf b/ci-scripts/conf_files/gnb-cucp.sa.e1-ho-n2.conf index ad4cca969e..3ee84d0b85 100644 --- a/ci-scripts/conf_files/gnb-cucp.sa.e1-ho-n2.conf +++ b/ci-scripts/conf_files/gnb-cucp.sa.e1-ho-n2.conf @@ -21,10 +21,10 @@ gNBs = tr_s_preference = "f1"; - local_s_address = "192.168.71.150"; + local_s_address = "192.168.71.150"; remote_s_address = "192.168.71.171"; - local_s_portd = 2153; - remote_s_portd = 2153; + local_s_portd = 2153; + remote_s_portd = 2153; # ------- SCTP definitions SCTP : @@ -41,7 +41,7 @@ gNBs = E1_INTERFACE = ( { - type = "cp"; + type = "cp"; ipv4_cucp = "192.168.71.150"; port_cucp = 38462; ipv4_cuup = "0.0.0.0"; # multiple CU-UPs @@ -75,8 +75,8 @@ security = { log_config : { global_log_level = "info"; - pdcp_log_level = "info"; - rrc_log_level = "info"; - f1ap_log_level = "info"; - ngap_log_level = "info"; + pdcp_log_level = "info"; + rrc_log_level = "info"; + f1ap_log_level = "info"; + ngap_log_level = "info"; }; diff --git a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf index 4daf7c62fd..e314a1f299 100644 --- a/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf +++ b/ci-scripts/conf_files/gnb-du.sa.band78.106prb.usrpb200.conf @@ -146,7 +146,11 @@ gNBs = ); first_active_bwp = 1; - bwp_list = ({ scs = 1; bwpStart = 0; bwpSize = 106;}); + bwp_list = ( + { scs = 1; bwpStart = 0; bwpSize = 106;}, + { scs = 1; bwpStart = 0; bwpSize = 36;}, + { scs = 1; bwpStart = 40; bwpSize = 50;} + ); # ------- SCTP definitions SCTP : diff --git a/ci-scripts/conf_files/gnb-vnf.sa.band66.u0.25prb.nfapi.conf b/ci-scripts/conf_files/gnb-vnf.sa.band66.u0.25prb.nfapi.conf index c14759c6af..6f914cf17a 100644 --- a/ci-scripts/conf_files/gnb-vnf.sa.band66.u0.25prb.nfapi.conf +++ b/ci-scripts/conf_files/gnb-vnf.sa.band66.u0.25prb.nfapi.conf @@ -16,8 +16,6 @@ gNBs = nr_cellid = 12345678L; ////////// Physical parameters: - - sib1_tda = 5; min_rxtxtime = 6; servingCellConfigCommon = ( diff --git a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf index 6471c7bd02..c37acc89f5 100644 --- a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf @@ -18,8 +18,6 @@ gNBs = tr_s_preference = "local_mac" ////////// Physical parameters: - - sib1_tda = 15; min_rxtxtime = 6; servingCellConfigCommon = ( @@ -172,7 +170,7 @@ MACRLCs = ({ tr_n_preference = "local_RRC"; pusch_TargetSNRx10 = 200; pucch_TargetSNRx10 = 200; - set_analog_beamforming = 1; + set_analog_beamforming = 2; beam_duration = 1; beams_per_period = 1; beam_weights = [0]; // single SSB -> one analog beam diff --git a/ci-scripts/conf_files/gnb.sa.band77.51prb.usrpb200.n2-ho.conf b/ci-scripts/conf_files/gnb.sa.band77.51prb.usrpb200.n2-ho.conf index 577e23a87d..3966cebc6b 100644 --- a/ci-scripts/conf_files/gnb.sa.band77.51prb.usrpb200.n2-ho.conf +++ b/ci-scripts/conf_files/gnb.sa.band77.51prb.usrpb200.n2-ho.conf @@ -30,26 +30,26 @@ gNBs = # downlinkConfigCommon #frequencyInfoDL # this is 3610.56 MHz - absoluteFrequencySSB = 679104; - dl_frequencyBand = 77; + absoluteFrequencySSB = 679104; + dl_frequencyBand = 77; # this is 3599.94 MHz - dl_absoluteFrequencyPointA = 678388; + dl_absoluteFrequencyPointA = 678388; #scs-SpecificCarrierList - dl_offstToCarrier = 0; + dl_offstToCarrier = 0; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_subcarrierSpacing = 1; - dl_carrierBandwidth = 51; + dl_subcarrierSpacing = 1; + dl_carrierBandwidth = 51; #initialDownlinkBWP #genericParameters # this is RBstart=27,L=48 (275*(L-1))+RBstart - initialDLBWPlocationAndBandwidth = 13750; + initialDLBWPlocationAndBandwidth = 13750; # subcarrierSpacing # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - initialDLBWPsubcarrierSpacing = 1; + initialDLBWPsubcarrierSpacing = 1; #pdcch-ConfigCommon - initialDLBWPcontrolResourceSetZero = 12; - initialDLBWPsearchSpaceZero = 0; + initialDLBWPcontrolResourceSetZero = 12; + initialDLBWPsearchSpaceZero = 0; #uplinkConfigCommon #frequencyInfoUL @@ -197,10 +197,10 @@ RUs = ( att_rx = 0; bands = [77]; max_pdschReferenceSignalPower = -27; - max_rxgain = 114; + max_rxgain = 114; eNB_instances = [0]; - clock_src = "external"; - time_src = "external"; + clock_src = "external"; + time_src = "external"; } ); diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.vrtsim.2x2.yaml b/ci-scripts/conf_files/gnb.sa.band78.106prb.vrtsim.2x2.yaml new file mode 100644 index 0000000000..5cca2b0718 --- /dev/null +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.vrtsim.2x2.yaml @@ -0,0 +1,209 @@ +Active_gNBs: + - gnb-rfsim +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity: none +gNBs: + ##### Identification parameters: + - gNB_ID: 0xe00 + gNB_name: gnb-rfsim + tracking_area_code: 1 + plmn_list: + - mcc: 208 + mnc: 99 + mnc_length: 2 + snssaiList: + - sst: 1 + sd: 0xffffff + nr_cellid: 12345678 + ##### Physical parameters: + min_rxtxtime: 6 + pusch_AntennaPorts: 2 + pdsch_AntennaPorts_XP: 2 + + servingCellConfigCommon: + #spCellConfigCommon + - physCellId: 0 + # downlinkConfigCommon + #frequencyInfoDL + # this is 3300.60 MHz + 53*12*30e-3 MHz = 3319.68 + absoluteFrequencySSB: 621312 + # this is 3300.60 MHz + dl_absoluteFrequencyPointA: 620040 + #scs-SpecificCarrierList + dl_offstToCarrier: 0 + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + dl_subcarrierSpacing: 1 + dl_carrierBandwidth: 106 + #initialDownlinkBWP + #genericParameters + # this is RBstart=0,L=106 (275*(L-1))+RBstart + initialDLBWPlocationAndBandwidth: 28875 + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialDLBWPsubcarrierSpacing: 1 + #pdcch-ConfigCommon + initialDLBWPcontrolResourceSetZero: 11 + initialDLBWPsearchSpaceZero: 0 + #uplinkConfigCommon + #frequencyInfoUL + ul_frequencyBand: 78 + #scs-SpecificCarrierList + ul_offstToCarrier: 0 + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + ul_subcarrierSpacing: 1 + ul_carrierBandwidth: 106 + pMax: 20 + #initialUplinkBWP + #genericParameters + initialULBWPlocationAndBandwidth: 28875 + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + initialULBWPsubcarrierSpacing: 1 + #rach-ConfigCommon + #rach-ConfigGeneric + prach_ConfigurationIndex: 98 + #prach_msg1_FDM + #0 = one, 1=two, 2=four, 3=eight + prach_msg1_FDM: 0 + prach_msg1_FrequencyStart: 0 + zeroCorrelationZoneConfig: 12 + preambleReceivedTargetPower: -104 + #preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200) + preambleTransMax: 6 + #powerRampingStep + # 0=dB0,1=dB2,2=dB4,3=dB6 + powerRampingStep: 1 + #ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR + #1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen + ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR: 4 + #one (0..15) 4,8,12,16,...60,64 + ssb_perRACH_OccasionAndCB_PreamblesPerSSB: 15 + #ra_ContentionResolutionTimer + #(0..7) 8,16,24,32,40,48,56,64 + ra_ContentionResolutionTimer: 7 + rsrp_ThresholdSSB: 19 + #prach-RootSequenceIndex_PR + #1 = 839, 2 = 139 + prach_RootSequenceIndex_PR: 2 + prach_RootSequenceIndex: 1 + # SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex + msg1_SubcarrierSpacing: 1 + # restrictedSetConfig + # 0=unrestricted, 1=restricted type A, 2=restricted type B + restrictedSetConfig: 0 + msg3_DeltaPreamble: 1 + p0_NominalWithGrant: -90 + + # pucch-ConfigCommon setup : + # pucchGroupHopping + # 0 = neither, 1= group hopping, 2=sequence hopping + pucchGroupHopping: 0 + hoppingId: 40 + p0_nominal: -90 + ssb_PositionsInBurst_Bitmap: 1 + # ssb_periodicityServingCell + # 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1 + ssb_periodicityServingCell: 2 + + # dmrs_TypeA_position + # 0 = pos2, 1 = pos3 + dmrs_TypeA_Position: 0 + + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + subcarrierSpacing: 1 + + #tdd-UL-DL-ConfigurationCommon + # subcarrierSpacing + # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 + referenceSubcarrierSpacing: 1 + + # pattern1 + # dl_UL_TransmissionPeriodicity + # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 + dl_UL_TransmissionPeriodicity: 6 + nrofDownlinkSlots: 7 + nrofDownlinkSymbols: 6 + nrofUplinkSlots: 2 + nrofUplinkSymbols: 4 + ssPBCH_BlockPower: -25 + SCTP: + SCTP_INSTREAMS: 2 + SCTP_OUTSTREAMS: 2 + + ##### AMF parameters: + amf_ip_address: + - ipv4: 192.168.71.132 + + NETWORK_INTERFACES: + GNB_IPV4_ADDRESS_FOR_NG_AMF: 192.168.71.140 + GNB_IPV4_ADDRESS_FOR_NGU: 192.168.71.140 + GNB_PORT_FOR_S1U: 2152 # Spec 2152 + + +MACRLCs: + - num_cc: 1 + tr_s_preference: local_L1 + tr_n_preference: local_RRC + pusch_TargetSNRx10: 200 + pucch_TargetSNRx10: 200 + +L1s: + - num_cc: 1 + tr_n_preference: local_mac + prach_dtx_threshold: 200 + # pucch0_dtx_threshold = 150; + +RUs: + - local_rf: yes + nb_tx: 2 + nb_rx: 2 + att_tx: 0 + att_rx: 0 + bands: [78] + max_pdschReferenceSignalPower: -27 + max_rxgain: 75 + eNB_instances: [0] + sf_extension: 0 + +security: + # preferred ciphering algorithms + # the first one of the list that an UE supports in chosen + # valid values: nea0, nea1, nea2, nea3 + ciphering_algorithms: [nea0] + + # preferred integrity algorithms + # the first one of the list that an UE supports in chosen + # valid values: nia0, nia1, nia2, nia3 + integrity_algorithms: [nia2, nia0] + + # setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter + # what 'ciphering_algorithms' configures; same thing for 'drb_integrity' + drb_ciphering: yes + drb_integrity: no + +log_config: + global_log_level: info + hw_log_level: info + phy_log_level: info + mac_log_level: info + rlc_log_level: info + pdcp_log_level: info + rrc_log_level: info + ngap_log_level: debug + f1ap_log_level: debug + + +channelmod: + max_chan: 10 + modellist: DefaultChannelList + DefaultChannelList: + - model_name: server_tx_channel_model + type: AWGN + ploss_dB: 0 + noise_power_dB: -100 + forgetfact: 0 + offset: 0 + ds_tdl: 0 diff --git a/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf index afe40c733c..7153c90421 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.24prb.rfsim.conf @@ -16,8 +16,6 @@ gNBs = nr_cellid = 12345678L; ////////// Physical parameters: - - sib1_tda = 15; min_rxtxtime = 6; servingCellConfigCommon = ( diff --git a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf index 8d6a0e90cd..ee2930f8ad 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf @@ -23,7 +23,6 @@ gNBs = pusch_AntennaPorts = 4; do_CSIRS = 1; do_SRS = 0; - sib1_tda = 15; # force_UL256qam_off = 1; servingCellConfigCommon = ( diff --git a/ci-scripts/conf_files/neighbour-config-ho.conf b/ci-scripts/conf_files/neighbour-config-ho.conf index 2490ce1883..07d58e14e5 100644 --- a/ci-scripts/conf_files/neighbour-config-ho.conf +++ b/ci-scripts/conf_files/neighbour-config-ho.conf @@ -42,13 +42,13 @@ nr_measurement_configuration = { A2 = { enable = 1; threshold = 110; - timeToTrigger = 1; + time_to_trigger = 1; }; A3 = ({ - cell_id = -1; #Default + physCellId = -1; #Default offset = 10; hysteresis = 0; - timeToTrigger = 1 + time_to_trigger = 1 }) }; diff --git a/ci-scripts/conf_files/neighbour-config.conf b/ci-scripts/conf_files/neighbour-config.conf index a498dbf157..9a05f01486 100644 --- a/ci-scripts/conf_files/neighbour-config.conf +++ b/ci-scripts/conf_files/neighbour-config.conf @@ -57,19 +57,19 @@ nr_measurement_configuration = { A2 = { enable = 1; threshold = 60; - timeToTrigger = 1; + time_to_trigger = 1; }; A3 = ({ physCellId = -1; #Default offset = 10; hysteresis = 0; - timeToTrigger = 1 + time_to_trigger = 1 }, { physCellId = 2; offset = 5; hysteresis = 1; - timeToTrigger = 2 + time_to_trigger = 2 }) }; diff --git a/ci-scripts/conf_files/nrue.vrtsim.chanmod.yaml b/ci-scripts/conf_files/nrue.vrtsim.chanmod.yaml new file mode 100644 index 0000000000..a9488007d7 --- /dev/null +++ b/ci-scripts/conf_files/nrue.vrtsim.chanmod.yaml @@ -0,0 +1,20 @@ +uicc0: + imsi: 208990100001100 + key: fec86ba6eb707ed08905757b1bb44b8f + opc: C42449363BBAD02B66D16BC975D77CC1 + dnn: oai + nssai_sst: 1 + +thread-pool: "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1" + +channelmod: + max_chan: 10; + modellist: DefaultChannelList + DefaultChannelList: + - model_name: client_tx_channel_model + type: AWGN + ploss_dB: 0 + noise_power_dB: -100 + forgetfact: 0 + offset: 0 + ds_tdl: 0 diff --git a/ci-scripts/docker/Dockerfile.physim.ubuntu b/ci-scripts/docker/Dockerfile.physim.ubuntu index 8fe6d91c4a..c820c7fd7a 100644 --- a/ci-scripts/docker/Dockerfile.physim.ubuntu +++ b/ci-scripts/docker/Dockerfile.physim.ubuntu @@ -44,4 +44,4 @@ RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON \ -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \ -DPHYSIM_CHECK_FILES="ThresholdsGracehopper.cmake" \ .. && \ - ninja ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim + ninja ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim nr_psbchsim nr_srssim diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 8aadad76bb..1995ff545b 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -58,7 +58,7 @@ import re # reg import time # sleep import os import subprocess -import xml.etree.ElementTree as ET +import lxml.etree as ET import logging import signal import traceback @@ -98,7 +98,7 @@ def ExecuteActionWithParam(action, ctx, node): if proxy_commit is not None: CONTAINERS.proxyCommit = proxy_commit if action == 'Build_eNB': - success = cls_native.Native.Build(ctx, node, HTML.testCase_id, HTML, RAN.eNBSourceCodePath, RAN.Build_eNB_args) + success = cls_native.Native.Build(ctx, node, HTML, RAN.eNBSourceCodePath, RAN.Build_eNB_args) elif action == 'Build_Image': success = CONTAINERS.BuildImage(ctx, node, HTML) elif action == 'Build_Proxy': @@ -306,10 +306,10 @@ def receive_signal(signum, frame): logging.warning("received signal again, exiting") sys.exit(1) -def ShowTestID(ctx, desc): +def ShowTestID(ctx, desc, file, line): logging.info(f'\u001B[1m----------------------------------------\u001B[0m') - logging.info(f'\u001B[1m Test ID: {ctx.test_id} (#{ctx.count}) \u001B[0m') - logging.info(f'\u001B[1m {desc} \u001B[0m') + logging.info(f'\u001B[1m Test #{ctx.test_idx} ({file}:{line}) \u001B[0m') + logging.info(f'\u001B[1m {desc} \u001B[0m') logging.info(f'\u001B[1m----------------------------------------\u001B[0m') #----------------------------------------------------------- @@ -455,46 +455,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re xmlTree = ET.parse(xml_test_file) xmlRoot = xmlTree.getroot() - exclusion_tests=xmlRoot.findtext('TestCaseExclusionList',default='') - requested_tests=xmlRoot.findtext('TestCaseRequestedList',default='') if (HTML.nbTestXMLfiles == 1): HTML.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-0')) HTML.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='Test-0')) all_tests=xmlRoot.findall('testCase') - exclusion_tests=exclusion_tests.split() - requested_tests=requested_tests.split() - - #check that exclusion tests are well formatted - #(6 digits or less than 6 digits followed by +) - for test in exclusion_tests: - if (not re.match('^[0-9]{6}$', test) and - not re.match('^[0-9]{1,5}\\+$', test)): - logging.error('exclusion test is invalidly formatted: ' + test) - sys.exit(1) - else: - logging.info(test) - - #check that requested tests are well formatted - #(6 digits or less than 6 digits followed by +) - #be verbose - for test in requested_tests: - if (re.match('^[0-9]{6}$', test) or - re.match('^[0-9]{1,5}\\+$', test)): - logging.info('test group/case requested: ' + test) - else: - logging.error('requested test is invalidly formatted: ' + test) - sys.exit(1) - - #get the list of tests to be done - todo_tests=[] - for test in requested_tests: - if (test_in_list(test, exclusion_tests)): - logging.info('test will be skipped: ' + test) - else: - #logging.info('test will be run: ' + test) - todo_tests.append(test) - signal.signal(signal.SIGINT, receive_signal) HTML.CreateHtmlTabHeader() @@ -502,46 +467,42 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re task_set_succeeded = True HTML.startTime=int(round(time.time() * 1000)) - i = 0 - for test_case_id in todo_tests: - for test in all_tests: - if test_runner_abort: + for index, test in enumerate(all_tests, start=1): + if test_runner_abort: + task_set_succeeded = False + test_case_idx = f"{index:06d}" + ctx = TestCaseCtx(int(test_case_idx), logPath) + HTML.testCaseIdx = test_case_idx + desc = test.findtext('desc') + node = test.findtext('node') if not force_local else 'localhost' + always_exec = test.findtext('always_exec') in ['True', 'true', 'Yes', 'yes'] + may_fail = test.findtext('may_fail') in ['True', 'true', 'Yes', 'yes'] + HTML.desc = desc + action = test.findtext('class') + if not CheckClassValidity(xml_class_list, action, test_case_idx): + task_set_succeeded = False + continue + file = os.path.basename(xml_test_file) + line = test.find('class').sourceline + ShowTestID(ctx, desc, file, line) + if not task_set_succeeded and not always_exec: + msg = f"skipping test due to prior error" + logging.warning(msg) + HTML.CreateHtmlTestRowQueue(msg, "SKIP", []) + continue + try: + test_succeeded = ExecuteActionWithParam(action, ctx, node) + if not test_succeeded and may_fail: + logging.warning(f"test ID {test_case_idx} action {action} may or may not fail, proceeding despite error") + elif not test_succeeded: + logging.error(f"test ID {test_case_idx} action {action} failed ({test_succeeded}), skipping next tests") task_set_succeeded = False - id = test.get('id') - if test_case_id != id: - continue - i += 1 - CiTestObj.testCase_id = id - ctx = TestCaseCtx(i, int(id), logPath) - HTML.testCase_id=CiTestObj.testCase_id - desc = test.findtext('desc') - node = test.findtext('node') if not force_local else 'localhost' - always_exec = test.findtext('always_exec') in ['True', 'true', 'Yes', 'yes'] - may_fail = test.findtext('may_fail') in ['True', 'true', 'Yes', 'yes'] - HTML.desc = desc - action = test.findtext('class') - if (CheckClassValidity(xml_class_list, action, id) == False): - task_set_succeeded = False - continue - ShowTestID(ctx, desc) - if not task_set_succeeded and not always_exec: - msg = f"skipping test due to prior error" - logging.warning(msg) - HTML.CreateHtmlTestRowQueue(msg, "SKIP", []) - break - try: - test_succeeded = ExecuteActionWithParam(action, ctx, node) - if not test_succeeded and may_fail: - logging.warning(f"test ID {test_case_id} action {action} may or may not fail, proceeding despite error") - elif not test_succeeded: - logging.error(f"test ID {test_case_id} action {action} failed ({test_succeeded}), skipping next tests") - task_set_succeeded = False - except Exception as e: - s = traceback.format_exc() - logging.error(f'while running CI, an exception occurred:\n{s}') - HTML.CreateHtmlTestRowQueue("N/A", 'KO', [f"CI test code encountered an exception:\n{s}"]) - task_set_succeeded = False - break + except Exception as e: + s = traceback.format_exc() + logging.error(f'while running CI, an exception occurred:\n{s}') + HTML.CreateHtmlTestRowQueue("N/A", 'KO', [f"CI test code encountered an exception:\n{s}"]) + task_set_succeeded = False + continue if not task_set_succeeded: logging.error('\u001B[1;37;41mScenario failed\u001B[0m') diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index e440fc3a62..04384ad4f4 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -67,7 +67,6 @@ class RANManagement(): self.eNBOptions = ['', '', ''] self.eNBmbmsEnables = [False, False, False] self.eNBstatuses = [-1, -1, -1] - self.testCase_id = '' self.runtime_stats= '' self.datalog_rt_stats={} self.datalog_rt_stats_file='datalog_rt_stats.default.yaml' @@ -88,7 +87,6 @@ class RANManagement(): raise ValueError(f"{node=}") logging.debug('Starting eNB/gNB on server: ' + node) - self.testCase_id = HTML.testCase_id lSourcePath = self.eNBSourceCodePath cmd = cls_cmd.getConnection(node) diff --git a/ci-scripts/tests/build.py b/ci-scripts/tests/build.py index 013486a560..8701b17a8c 100644 --- a/ci-scripts/tests/build.py +++ b/ci-scripts/tests/build.py @@ -17,7 +17,7 @@ import cls_cmd class TestBuild(unittest.TestCase): def setUp(self): self.html = cls_oai_html.HTMLManagement() - self.html.testCase_id = "000000" + self.html.testCaseIdx = "000000" self.cont = cls_containerize.Containerize() self._d = tempfile.mkdtemp() logging.warning(f"temporary directory: {self._d}") diff --git a/ci-scripts/tests/test-runner/test.xml b/ci-scripts/tests/test-runner/test.xml index cb54989301..635ccb3b6b 100644 --- a/ci-scripts/tests/test-runner/test.xml +++ b/ci-scripts/tests/test-runner/test.xml @@ -22,60 +22,51 @@ -->