Remove old and unused testing code
This commit is contained in:
@@ -1,82 +1,6 @@
|
||||
OAI Test PLAN
|
||||
|
||||
Obj.# Case# Test# Description
|
||||
|
||||
01 pre-commit test case
|
||||
01 01 Build OAI
|
||||
01 01 01 Build oaisim.Rel8
|
||||
01 01 02 Build oaisim.Rel10
|
||||
01 01 03 Build oaisim_noS1.Rel10
|
||||
01 01 10 Build lte-softmodem_noS1.USRP.Rel10
|
||||
01 01 11 Build lte-softmodem_noS1.EXMIMO.Rel10
|
||||
01 01 12 Build lte-softmodem_noS1.BLADERF.Rel10
|
||||
01 01 13 Build lte-softmodem_noS1.ETHERNET.Rel10
|
||||
01 01 14 Build lte-softmodem_noS1.LMSSDR.Rel10
|
||||
01 01 20 Build lte-softmodem.USRP.Rel10
|
||||
01 01 21 Build lte-softmodem.EXMIMO.Rel10
|
||||
01 01 22 Build lte-softmodem.BLADERF.Rel10
|
||||
01 01 23 Build lte-softmodem.ETHERNET.Rel10 (RCC)
|
||||
01 01 24 Build lte-softmodem.LMSSDR.Rel10
|
||||
|
||||
01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10
|
||||
secu_knas_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10
|
||||
secu_knas.Rel10 secu_knas_encrypt_eea1.Rel10 kdf.Rel10 aes128_cmac_encrypt.Rel10 secu_knas_encrypt_eia2.Rel10)
|
||||
|
||||
01 01 40 Build RRH Gateway (time domain) for USRP (Rel 10)
|
||||
01 01 41 Build RRH Gateway (time domain) for EXMIMO (Rel 10)
|
||||
01 01 42 Build RRH Gateway (time domain) for BLADERF (Rel 10)
|
||||
01 01 43 Build RRH Gateway (time domain) for LMSSDR (Rel 10)
|
||||
|
||||
01 01 50 Build RRU (NGFI) for USRP (Rel 10) w/ ETHERNET transport
|
||||
01 01 51 Build RRU (NGFI) for EXMIMO (Rel 10) w/ ETHERNET transport
|
||||
01 01 52 Build RRU (NGFI) for BLADERF (Rel 10) w/ ETHERNET transport
|
||||
01 01 53 Build RRU (NGFI) for LMSSDR (Rel 10) w/ ETHERNET transport
|
||||
|
||||
|
||||
01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
|
||||
01 02 00 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit
|
||||
01 02 01 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors
|
||||
01 02 02 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit
|
||||
01 02 03 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors
|
||||
01 02 04 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) without PHY_ABSTRACTION mode, ping from from eNB to UE,
|
||||
and for check for no packet losses
|
||||
01 02 05 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode, send ping from from eNB to UE,
|
||||
and check for no packet losses
|
||||
|
||||
01 03 Run OAISIM-NOS1 Rel10 (FDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
|
||||
01 03 00 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit
|
||||
01 03 01 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors
|
||||
01 03 02 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit
|
||||
01 03 03 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors
|
||||
01 03 04 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) without PHY_ABSTRACTION mode, ping from from eNB to UE,
|
||||
and for check for no packet losses
|
||||
01 03 05 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode, send ping from from eNB to UE,
|
||||
and check for no packet losses
|
||||
|
||||
|
||||
|
||||
01 04 OAISIM-NOS1 MBSFN Tests
|
||||
01 04 00 Check if eMBMS procedure is not finished completely, make sure that the SIB13/MCCH have been correclty received by UEs
|
||||
01 04 01 Check if eMBMS multicast/broadcast data is received, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs
|
||||
01 04 02 Check for eMBMS multicast/broadcast data received in fdd mode, make sure that the SIB13/MCCH/MTCH have been correctly
|
||||
received by UEs
|
||||
01 04 03 Check for eMBMS multicast/broadcast DF relaying working properly in fdd mode, make sure that the SIB13/MCCH/MTCH have been
|
||||
correclty received by UEs
|
||||
|
||||
|
||||
01 50 Run PHY unitary secuirity tests
|
||||
01 50 00 test_aes128_cmac_encrypt
|
||||
01 50 01 test_aes128_ctr_decrypt
|
||||
01 50 02 test_aes128_ctr_encrypt
|
||||
01 50 03 test_secu_kenb
|
||||
01 50 04 test_secu_knas
|
||||
01 50 05 test_secu_knas_encrypt_eea1
|
||||
01 50 06 test_secu_knas_encrypt_eea2
|
||||
01 50 07 test_secu_knas_encrypt_eia1
|
||||
01 50 08 test_secu_knas_encrypt_eia2
|
||||
01 50 09 test_kdf
|
||||
|
||||
|
||||
Obj.# Case# Test# Description
|
||||
|
||||
01 51 Run PHY simulator tests
|
||||
01 51 00 dlsim test cases (Test 1: 10 MHz, R2.FDD (MCS 5), EVA5, -1dB),
|
||||
@@ -88,8 +12,8 @@ Obj.# Case# Test# Description
|
||||
(Test 10: 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)),
|
||||
(Test 10b: 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)),
|
||||
(Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%))
|
||||
(TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)),
|
||||
(TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)),
|
||||
(TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)),
|
||||
(TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)),
|
||||
01 51 01 ulsim Test cases. (Test 1, 5 MHz, FDD (MCS 5), AWGN, 6dB),
|
||||
(Test 2, 5 MHz, FDD (MCS 16), AWGN , 12dB (70%)),
|
||||
(Test 3, 10 MHz, R3.FDD (MCS 5), AWGN, 6dB (70%)),
|
||||
@@ -150,235 +74,3 @@ Obj.# Case# Test# Description
|
||||
01 51 12 nr_prachsim Test cases.(Test1: 106 PRBs),
|
||||
(Test2: 217 PRBs),
|
||||
(Test3: 273 PRBs)
|
||||
|
||||
|
||||
|
||||
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX (TM1), 2TX/2RX (TM2)
|
||||
01 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 55 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 55 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 55 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 55 06 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 07 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 08 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 09 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 10 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 11 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 12 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 55 13 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 55 14 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 55 15 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 55 16 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 55 17 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 55 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 55 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
|
||||
01 56 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
|
||||
01 56 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 56 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 56 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 56 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 56 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 56 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
01 57 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE
|
||||
01 57 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 57 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 57 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 57 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 57 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 57 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX (TM1), 2TX/2RX(TM2)
|
||||
01 58 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 58 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 58 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 58 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 58 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 58 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 58 06 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 58 07 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 58 08 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 58 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 58 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 58 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 58 12 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 13 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 14 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 15 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 16 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 17 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 58 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
|
||||
|
||||
01 59 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
|
||||
|
||||
01 60 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE
|
||||
01 60 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 60 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 60 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 60 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 60 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 60 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX, 2TX/2RX
|
||||
01 61 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 61 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 61 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 61 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 61 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 61 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
01 62 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
|
||||
|
||||
01 63 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE
|
||||
01 63 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 63 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 63 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 63 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 63 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 63 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
01 65 lte-softmodem tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX
|
||||
01 65 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 65 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 65 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 65 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 65 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 65 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
|
||||
01 70 lte-softmodem tests with SoDeRa RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
|
||||
01 70 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 70 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 70 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 70 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 70 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 70 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
|
||||
01 75 lte-softmodem + RRU (NGFI IF4P5, RAW) tests with B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
|
||||
01 75 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 75 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 75 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 75 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 75 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 75 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
01 76 lte-softmodem + RRU (NGFI IF4P5, UDP) tests with B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
|
||||
01 76 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 76 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 76 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 76 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 76 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 76 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 76 06 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 76 07 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 76 08 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 76 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 76 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 76 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
|
||||
01 80 lte-softmodem + RRU (NGFI) tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
|
||||
01 80 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 80 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 80 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 80 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 80 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 80 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
01 85 lte-softmodem + RRU (NGFI) tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
|
||||
01 85 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 85 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 85 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
01 85 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 85 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
01 86 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Huawei e3276 COTS UE for 1TX/1RX (TM1), 2TX/2RX (TM2)
|
||||
01 86 00 Band 38 TDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 86 01 Band 38 TDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 86 02 Band 38 TDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 86 03 Band 38 TDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 86 04 Band 38 TDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 86 05 Band 38 TDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
01 86 06 Band 38 TDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 07 Band 38 TDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 08 Band 38 TDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 09 Band 38 TDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 10 Band 38 TDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 11 Band 38 TDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 12 Band 38 TDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 86 13 Band 38 TDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 86 14 Band 38 TDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 86 15 Band 38 TDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 86 16 Band 38 TDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 86 17 Band 38 TDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
01 86 18 Band 38 TDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 19 Band 38 TDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 20 Band 38 TDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 21 Band 38 TDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 22 Band 38 TDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
01 86 23 Band 38 TDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
|
||||
02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for 1TX/1RX and 2TX/2RX (TM2)
|
||||
02 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
02 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
02 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
02 55 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
02 55 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
02 55 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
|
||||
02 55 06 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
02 55 07 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
02 55 08 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
02 55 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
02 55 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
02 55 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
|
||||
02 55 12 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 13 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 14 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 15 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 16 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 17 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
02 55 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
|
||||
|
||||
02 57 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ OAI UE
|
||||
02 57 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
02 57 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
02 57 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
|
||||
02 57 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
02 57 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
02 57 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
|
||||
|
||||
|
||||
01 64 lte-softmodem-noS1 tests
|
||||
|
||||
02 Functional test case
|
||||
|
||||
03 Autotests specific to OAI UE
|
||||
|
||||
04 Failure test case
|
||||
|
||||
05 Performance test case
|
||||
|
||||
|
||||
#TODO: Add test cases for 10,20 MHz
|
||||
#TODO: Add test cases for TDD/FDD
|
||||
#TODO: Test and compile seperately for Rel8/Rel10
|
||||
#TODO: Case03.py eMBMS test case
|
||||
|
||||
@@ -1,343 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file core.py
|
||||
# \brief OAI core testing class that provides various primitives to send/recv cmd to openair class searching for patterns and process the responses and tag the test case as passed/failed/skipped
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
|
||||
import pexpect
|
||||
import time
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
import os
|
||||
|
||||
import openair
|
||||
import log
|
||||
|
||||
class core:
|
||||
def __init__(self):
|
||||
self.send_cr = 1
|
||||
self.expect_echo = 0
|
||||
self.expect_response = 1
|
||||
self.flag_errors = 1
|
||||
self.log = None
|
||||
|
||||
def clean(self, obj):
|
||||
if type(obj) is str:
|
||||
return obj
|
||||
else:
|
||||
return repr(obj)
|
||||
|
||||
def mark(self, marker):
|
||||
if self.log:
|
||||
print >> self.log, "\n\n{" + marker + "}\n\n"
|
||||
|
||||
def expected(self, expected, got):
|
||||
return "================================= Failure ===================================\n"+\
|
||||
"_________________________________ Expected __________________________________\n"+\
|
||||
"--->" + expected + "<-\n" +\
|
||||
"_________________________________ Received __________________________________\n"+\
|
||||
"--->" + got + "<-\n" +\
|
||||
"=============================================================================\n"
|
||||
|
||||
def unexpected(self, notexpected, got):
|
||||
return "================================= Failure ===================================\n"+\
|
||||
"__________________________ not expect to find _______________________________\n"+\
|
||||
"---> " + self.clean(notexpected) + "\n" +\
|
||||
"_________________________________ Received___________________________________\n"+\
|
||||
"---> " + self.clean(got) + "\n" +\
|
||||
"=============================================================================\n"
|
||||
|
||||
def failed(self, command, expect,debug):
|
||||
time.sleep(2)
|
||||
ret = "================================= Failure =================================\n"
|
||||
ret +="_________________________________ Sent ____________________________________\n"
|
||||
ret +="---> " + command + "\n"
|
||||
ret +="______________________________Searching for _______________________________\n"
|
||||
ret +="---> " + self.clean(expect) + "\n"
|
||||
if debug >= 1 :
|
||||
ret +="________________________________ Received _________________________________\n"
|
||||
ret +="---> " + self.clean(self.oai.before) + "\n"
|
||||
ret +="_______________________________ Remaining _________________________________\n"
|
||||
ret +="---> " + self.clean(self.oai.after) + "\n"
|
||||
ret +="===========================================================================\n"
|
||||
return ret
|
||||
|
||||
def err(self, command):
|
||||
return "============================ Error received ================================\n"+\
|
||||
"__________________________________ Sent ____________________________________\n"+\
|
||||
'---> ' + command + "\n"+\
|
||||
"_________________________________ Error was ________________________________\n"+\
|
||||
"---> " + self.oai.before + "\n" +\
|
||||
"============================================================================\n"
|
||||
|
||||
|
||||
def wait_quiet(self, timeout=0.5):
|
||||
while 1:
|
||||
try:
|
||||
self.oai.expect(['..*'], timeout=0.5)
|
||||
except pexpect.TIMEOUT, e:
|
||||
return
|
||||
# print '[Flushing ' + self.oai.after + ']'
|
||||
|
||||
# **************************Send*****************************
|
||||
# 1) send a command and return, do not wait
|
||||
# ************************************************************
|
||||
def send_nowait(self, command, sudo=False):
|
||||
rsp1 = self.prompt1
|
||||
rsp2 = self.prompt2
|
||||
if sudo == True:
|
||||
command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
|
||||
self.wait_quiet()
|
||||
if self.send_cr:
|
||||
log.stats['cmd'] += 1
|
||||
self.oai.sendline(command)
|
||||
else:
|
||||
self.oai.send(command)
|
||||
|
||||
|
||||
# **************************Send*****************************
|
||||
# 1) send a command
|
||||
# 2) wait for a return prompt. Don't capture the response.
|
||||
# 3) Check for error or timeout.
|
||||
# ************************************************************
|
||||
def send(self, command,sudo=False, timeout = 50, rsp1=None, rsp2=None,debug=0):
|
||||
if not rsp1:
|
||||
rsp1 = self.prompt1
|
||||
if not rsp2:
|
||||
rsp2 = self.prompt2
|
||||
self.wait_quiet()
|
||||
if sudo == True:
|
||||
command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
|
||||
if self.send_cr:
|
||||
log.stats['cmd'] += 1
|
||||
self.oai.sendline(command)
|
||||
else:
|
||||
self.oai.send(command)
|
||||
|
||||
if self.expect_echo:
|
||||
#cmd = self.oai.expect([re.escape(command), pexpect.TIMEOUT], timeout=timeout);
|
||||
cmd = self.oai.expect_exact([command, pexpect.TIMEOUT], timeout=timeout);
|
||||
if cmd != 0:
|
||||
raise log.err(self.failed(command, command,debug))
|
||||
|
||||
if self.expect_response:
|
||||
#index = self.oai.expect([re.escape(rsp1), re.escape(rsp2),'%', pexpect.TIMEOUT], timeout=timeout)
|
||||
index = self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout)
|
||||
|
||||
if index == 0 or index == 1:
|
||||
return 'OK'
|
||||
elif index == 2:
|
||||
#self.oai.expect([re.escape(rsp1), re.escape(rsp2), pexpect.TIMEOUT], timeout=timeout)
|
||||
self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout)
|
||||
if self.flag_errors:
|
||||
raise log.err(self.err(command))
|
||||
else:
|
||||
return 'OK'
|
||||
else:
|
||||
raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug))
|
||||
|
||||
# **************************send_recv*************************
|
||||
# 1) send a command
|
||||
# 2) wait for either rsp1 or rsp2 is found (normally prompts)
|
||||
# 3) return everything seen before that
|
||||
# ************************************************************
|
||||
def send_recv(self, command, sudo=False, timeout=100, rsp1=None, rsp2=None,debug=0):
|
||||
if not rsp1:
|
||||
rsp1 = self.prompt1
|
||||
if not rsp2:
|
||||
rsp2 = self.prompt2
|
||||
self.wait_quiet()
|
||||
if sudo == True:
|
||||
#command = 'echo \'' + self.password + '\' | sudo -S -E ' + command
|
||||
command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
|
||||
if self.send_cr:
|
||||
log.stats['cmd'] += 1
|
||||
self.oai.sendline(command)
|
||||
else:
|
||||
self.oai.send(command)
|
||||
#index = self.oai.expect([re.escape(rsp1), re.escape(rsp2), pexpect.TIMEOUT], timeout=timeout);
|
||||
index = self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout);
|
||||
if index == 0 or index == 1 :
|
||||
return self.oai.before
|
||||
else:
|
||||
print "command = " + command + "rsp1 = " + rsp1 + " rsp2 = " + rsp2 + " index = " + str(index)
|
||||
raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug))
|
||||
|
||||
|
||||
# **************************send_expect*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern in the response
|
||||
# 3) raise an error if not found
|
||||
# **************************************************************
|
||||
def send_expect(self, command, expect, sudo=False, delay = 50, rsp1=None, rsp2=None,debug=0):
|
||||
if debug :
|
||||
print command
|
||||
print expect
|
||||
print delay
|
||||
rsp = self.send_recv(command, sudo, delay, rsp1, rsp2)
|
||||
#print rsp
|
||||
if (rsp.find(expect) != -1):
|
||||
return 'Ok'
|
||||
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
|
||||
# **************************send_expect_re*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern defined by a regular expression in the response
|
||||
# 3) return a error if raise_err flag is set and re not found, otherwise return 'Ok'
|
||||
# *****************************************************************
|
||||
def send_expect_re(self, command, expect, sudo=False, raise_err=1, delay = 50, rsp1=None, rsp2=None,debug=0):
|
||||
rsp = self.send_recv(command, sudo, delay, rsp1, rsp2)
|
||||
# print rsp
|
||||
match = re.compile(expect).search(rsp)
|
||||
if match:
|
||||
return match
|
||||
if raise_err:
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
else :
|
||||
return None
|
||||
|
||||
# **************************send_expect*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern defined by a re in the response
|
||||
# 3) return ok if not found
|
||||
# **************************************************************
|
||||
def send_expect_false(self, command, expect, sudo=False, delay = 5, rsp1=None, rsp2=None,debug=0):
|
||||
rsp = self.send_recv(command, sudo, delay, rsp1, rsp2)
|
||||
# print rsp
|
||||
if (rsp.find(expect) == -1):
|
||||
return 'OK'
|
||||
else:
|
||||
print "command = " + command + "expect = " + expect + "rsp = " + rsp
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
|
||||
# **************************send_wait*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern in the response
|
||||
# 3) retry for a numretries if not found
|
||||
# 4) return an error if not found after the numtries
|
||||
# 3) return the response if found
|
||||
# **************************************************************
|
||||
def send_wait(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0):
|
||||
timer = 0
|
||||
for i in range(numretries):
|
||||
rsp = self.send_recv(command, sudo, 10, rsp1, rsp2)
|
||||
if (rsp.find(expect) != -1):
|
||||
return rsp;
|
||||
time.sleep(2)
|
||||
timer = timer+2
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
# **************************send_wait_re*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern defined by a re in the response
|
||||
# 3) retry for a numretries if not found
|
||||
# 4) return an error if not found after the numtries
|
||||
# 3) return the response if found
|
||||
# **************************************************************
|
||||
def send_wait_re(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0):
|
||||
timer = 0
|
||||
for i in range(numretries):
|
||||
rsp = self.send_recv(command,sudo)
|
||||
if re.compile(expect).search(rsp):
|
||||
# print "Found in",i,"attempts"
|
||||
return rsp;
|
||||
time.sleep(2)
|
||||
timer = timer+2
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
# **************************send_wait_false*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expect pattern in the response
|
||||
# 3) return the response if not found
|
||||
# 4) return an error if the pattern found after the numtries
|
||||
# **************************************************************
|
||||
def send_wait_false(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0):
|
||||
timer = 1
|
||||
for i in range(numretries):
|
||||
rsp = self.send_recv(command,sudo)
|
||||
if (rsp.find(expect) == -1):
|
||||
return rsp;
|
||||
time.sleep(2)
|
||||
timer = timer+2
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
# **************************send_wait_false*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expect pattern defined by a re in the response
|
||||
# 3) return the response if not found
|
||||
# 4) return an error if the pattern found after the numtries
|
||||
# **************************************************************
|
||||
def send_wait_false_re(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0):
|
||||
timer = 0
|
||||
for i in range(numretries):
|
||||
rsp = self.send_recv(command,sudo)
|
||||
if not re.compile(expect).search(rsp):
|
||||
return rsp;
|
||||
time.sleep(2)
|
||||
timer = timer+2
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
# **************************find*************************
|
||||
# 1) find an exact pattern in a given string
|
||||
# 2) raise an error if not found
|
||||
# **************************************************************
|
||||
def find(self, string, pattern):
|
||||
word = string.replace(pattern,'*','\*')
|
||||
words = string.replace(word,' ','\s*')
|
||||
if re.search(words,string):
|
||||
pass
|
||||
else:
|
||||
raise log.err(string)
|
||||
|
||||
|
||||
# **************************find_false**************************
|
||||
# 1) find an exact pattern in a given string
|
||||
# 2) raise an error if found
|
||||
# **************************************************************
|
||||
def find_false(self, string, pattern):
|
||||
if string.find(pattern) != -1:
|
||||
raise log.err(string)
|
||||
|
||||
# **************************find_re*************************
|
||||
# 1) find an exact re pattern in a given string
|
||||
# 2) raise an error if not found
|
||||
# **************************************************************
|
||||
def find_re(self, string, pattern):
|
||||
if not re.compile(pattern).search(string):
|
||||
raise log.err(string)
|
||||
|
||||
# **************************find_false_re*************************
|
||||
# 1) find an exact re pattern in a given string
|
||||
# 2) raise an error if found
|
||||
# **************************************************************
|
||||
def find_false_re(self, string, pattern):
|
||||
if re.compile(pattern).search(string):
|
||||
raise log.err(string)
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file log.py
|
||||
# \brief provides primitives and defines how the logs and statistics are generated
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import sys
|
||||
import re
|
||||
import time
|
||||
import datetime
|
||||
import array
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
||||
debug = False
|
||||
docfile = ''
|
||||
start_time = time.time()
|
||||
testcase_starttime = start_time
|
||||
debug = 0
|
||||
stats = {'passed':0, 'failed':0, 'skipped':0, 'internal_errors':0, 'cmd':0}
|
||||
|
||||
# xml result (jUnit like)
|
||||
xUnitTestsuites = ET.Element( 'testsuites' )
|
||||
xUnitTestsuite = ET.SubElement( xUnitTestsuites, 'testsuite' )
|
||||
xUnitTestsuite.set( 'name', 'OAI' )
|
||||
xUnitTestsuite.set( 'timestamp', datetime.datetime.fromtimestamp(start_time).strftime('%Y-%m-%dT%H:%M:%S') )
|
||||
xUnitTestsuite.set( 'hostname', 'localhost' )
|
||||
#xUnitSystemOut = ET.SubElement( xUnitTestsuite, 'system-out' )
|
||||
|
||||
class bcolors:
|
||||
header = '\033[95m'
|
||||
okblue = '\033[94m'
|
||||
okgreen = '\033[92m'
|
||||
warning = '\033[93m'
|
||||
fail = '\033[91m'
|
||||
normal = '\033[0m'
|
||||
|
||||
def __init__(self):
|
||||
if not sys.stdout.isatty():
|
||||
self.disable()
|
||||
|
||||
def disable(self):
|
||||
self.header = ''
|
||||
self.okblue = ''
|
||||
self.okgreen = ''
|
||||
self.warning = ''
|
||||
self.fail = ''
|
||||
self.normal = ''
|
||||
|
||||
class err(Exception):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
def __str__(self):
|
||||
return repr(self.value)
|
||||
|
||||
def writefile(logfile, message):
|
||||
F_testlog = open(logfile, 'a')
|
||||
F_testlog.write(message + '\n')
|
||||
F_testlog.close()
|
||||
|
||||
|
||||
def sleep(seconds):
|
||||
time.sleep(seconds)
|
||||
|
||||
def start():
|
||||
"""Start the timer for the following testcase."""
|
||||
global testcase_starttime
|
||||
testcase_starttime = time.time()
|
||||
|
||||
def set_debug_level(level):
|
||||
debug = level
|
||||
|
||||
def statistics(logfile):
|
||||
global start_time
|
||||
|
||||
#if stats['passed'] == 0:
|
||||
# print "no test executed...exiting"
|
||||
# sys.exit()
|
||||
|
||||
total_tests = stats['passed'] + stats['failed'] + stats['skipped']
|
||||
total_ex_tests = stats['passed'] + stats['failed']
|
||||
elapsed_time = time.gmtime(time.time() - start_time)
|
||||
print '\n'
|
||||
log_record('info', '===============================================')
|
||||
log_record('info', 'Total tests performed ' + repr(total_tests))
|
||||
log_record('info', 'Tests passed ' + repr(stats['passed']))
|
||||
log_record('info', 'Tests failed ' + repr(stats['failed']))
|
||||
log_record('info', 'Tests skipped ' + repr(stats['skipped']))
|
||||
log_record('info', '')
|
||||
log_record('info', 'Total commands sent ' + repr(stats['cmd']))
|
||||
log_record('info', 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time))
|
||||
log_record('info', '===============================================')
|
||||
log_record('info', 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%')
|
||||
log_record('info', '===============================================')
|
||||
|
||||
writefile(logfile, '\n=====================Results===================')
|
||||
writefile(logfile, 'Total tests performed ' + repr(total_tests))
|
||||
writefile(logfile, 'Tests passed ' + repr(stats['passed']))
|
||||
writefile(logfile, 'Tests failed ' + repr(stats['failed']))
|
||||
writefile(logfile, 'Tests skipped ' + repr(stats['skipped']))
|
||||
writefile(logfile, '')
|
||||
writefile(logfile, 'Total commands sent ' + repr(stats['cmd']))
|
||||
writefile(logfile, 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time))
|
||||
writefile(logfile, '===============================================')
|
||||
writefile(logfile, 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%')
|
||||
writefile(logfile, '===============================================\n')
|
||||
|
||||
xUnitTestsuite.set( 'tests', repr(total_tests) )
|
||||
xUnitTestsuite.set( 'failures', repr(stats['failed']) )
|
||||
xUnitTestsuite.set( 'skipped', repr(stats['skipped']) )
|
||||
xUnitTestsuite.set( 'errors', '0' )
|
||||
time_delta = datetime.datetime.now() - datetime.datetime.fromtimestamp(start_time)
|
||||
xUnitTestsuite.set( 'time', repr(time_delta.total_seconds()) )
|
||||
writefile( logfile + '.xml', ET.tostring( xUnitTestsuites, encoding="utf-8", method="xml" ) )
|
||||
|
||||
def log_record(level, message):
|
||||
ts = time.strftime('%d %b %Y %H:%M')
|
||||
message = ts + ' [' + level + '] ' + message
|
||||
if level == 'passed' :
|
||||
print bcolors.okgreen + message + bcolors.normal
|
||||
elif level == 'failed' :
|
||||
print bcolors.fail + message + bcolors.normal
|
||||
elif level == 'skipped' :
|
||||
print bcolors.warning + message + bcolors.normal
|
||||
else :
|
||||
print message
|
||||
|
||||
def fail(case, testnum, testname, conf, message, diag, output,trace):
|
||||
# report(case, testnum, testname, conf, 'failed', output, diag, message)
|
||||
report(case, testnum, testname, conf, 'failed', output, diag)
|
||||
log_record('failed', case + testnum + ' : ' + testname + ' ('+ conf+')')
|
||||
if message :
|
||||
log_record('failed', "Output follows:\n" + message )
|
||||
if trace :
|
||||
log_record('failed', "trace file can be found in " + trace + "\n" )
|
||||
stats['failed'] += 1
|
||||
|
||||
def failquiet(case, testnum, testname, conf):
|
||||
log_record('failed', case + testnum + ' :' + testname + ' ('+ conf+')')
|
||||
stats['failed'] += 1
|
||||
|
||||
def ok(case, testnum, testname, conf, message, output):
|
||||
report(case, testnum, testname, conf, 'passed', output)
|
||||
log_record('passed', case + testnum + ' : ' + testname + ' ('+ conf+')')
|
||||
if message :
|
||||
print bcolors.okgreen + message + bcolors.normal
|
||||
stats['passed'] += 1
|
||||
|
||||
|
||||
def skip(case, testnum, testname, conf, message=None, diag=None, output=None):
|
||||
log_record('skipped', case + testnum + ' :' + testname + ' ('+ conf+')')
|
||||
report(case, testnum, testname, conf, 'skipped', output, diag)
|
||||
if message :
|
||||
log_record('skipped', "Output follows:\n" + message )
|
||||
if diag :
|
||||
log_record('skipped', "Diagnostic: \n" + diag )
|
||||
stats['skipped'] += 1
|
||||
|
||||
|
||||
def report(case, test, name, conf, status, output, diag=None, desc=None):
|
||||
writefile (output, '[' +status+ '] ' + case + test + ' : ' + name + ' ('+ conf+')')
|
||||
if diag :
|
||||
writefile (output, '-------> ' + diag)
|
||||
if desc:
|
||||
writefile(output, desc)
|
||||
#log_record('report', + case + test + ' documented')
|
||||
e = ET.SubElement( xUnitTestsuite, 'testcase' )
|
||||
e.set( 'name', case + '_' + test + '_' + name )
|
||||
e.set( 'classname', 'shellscript' )
|
||||
e.set( 'time', repr( time.time() - testcase_starttime ) )
|
||||
if status == 'failed':
|
||||
e = ET.SubElement( e, 'failure' )
|
||||
e.set( 'message', 'failed' )
|
||||
e.text = diag
|
||||
if status == 'skipped':
|
||||
e = ET.SubElement( e, 'skipped' )
|
||||
@@ -1,264 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file openair.py
|
||||
# \brief class that define the oaisim class and its attributes
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import pexpect
|
||||
import pxssh
|
||||
import time
|
||||
import os
|
||||
import array
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import traceback
|
||||
import time
|
||||
# import call
|
||||
|
||||
from core import *
|
||||
|
||||
SHELL = '/bin/bash'
|
||||
|
||||
class openair(core):
|
||||
def __init__(self, hostname, address):
|
||||
self.error = '% '
|
||||
self.hostname = hostname
|
||||
self.address = address
|
||||
self.localhost = None
|
||||
core.__init__(self)
|
||||
|
||||
@property
|
||||
def localhost(self):
|
||||
if self.localhost :
|
||||
return self.localhost
|
||||
elif self.hostname in ['localhost', '127.0.0.7', '::1'] :
|
||||
self.localhost = self.hostname
|
||||
return self.localhost
|
||||
|
||||
@localhost.setter
|
||||
def localhost(self,localhost):
|
||||
self.localhost = localhost
|
||||
|
||||
def shcmd(self,cmd,sudo=False):
|
||||
|
||||
if sudo:
|
||||
cmd = "sudo %s" % command
|
||||
|
||||
proc = subprocess.Popen(command, shell=True,
|
||||
stdout = subprocess.PIPE,
|
||||
stderr = subprocess.PIPE)
|
||||
|
||||
stdout, stderr = proc.communicate()
|
||||
return (stdout, stderr)
|
||||
|
||||
def connect(self, username, password, prompt='PEXPECT_OAI'):
|
||||
max_retries=10
|
||||
i=0
|
||||
while i <= max_retries:
|
||||
self.prompt1 = prompt
|
||||
self.prompt2 = prompt
|
||||
self.password = ''
|
||||
i=i+1
|
||||
# WE do not store the password when sending commands for secuirity reasons. The password might be accidentally logged in such cases.
|
||||
#The password is used only to make ssh connections. In case user wants to run programs with sudo, then he/she needs to add following line in /etc/sudoers
|
||||
# your_user_name ALL=(ALL:ALL) NOPASSWD: ALL
|
||||
try:
|
||||
if not username:
|
||||
username = root
|
||||
if not password:
|
||||
password = username
|
||||
self.oai = pxssh.pxssh()
|
||||
self.oai.login(self.address,username,password)
|
||||
self.oai.sendline('PS1='+self.prompt1)
|
||||
self.oai.PROMPT='PEXPECT_OAI'
|
||||
# need to look for twice the string of the prompt
|
||||
self.oai.prompt()
|
||||
self.oai.prompt()
|
||||
# self.oai.sendline('uptime')
|
||||
# self.oai.prompt()
|
||||
# print self.oai.before
|
||||
break
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + 'address = "'+ self.address +' username = ' + username
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
print "Retrying again in 1 seconds"
|
||||
time.sleep(1)
|
||||
if i==max_retries:
|
||||
print "Fatal Error: Terminating the program now..."
|
||||
sys.exit(1)
|
||||
|
||||
def connect2(self, username, password, prompt='$'):
|
||||
self.prompt1 = prompt
|
||||
self.prompt2 = prompt
|
||||
self.password = password
|
||||
while 1:
|
||||
try:
|
||||
if not username:
|
||||
username = root
|
||||
if not password:
|
||||
password = username
|
||||
|
||||
self.oai = pexpect.spawn('ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -o "ConnectionAttempts=1" ' \
|
||||
+ username + '@' + self.address)
|
||||
|
||||
index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=40)
|
||||
if index == 0 :
|
||||
return 'Ok'
|
||||
else :
|
||||
index = self.oai.expect(['password:', pexpect.TIMEOUT], timeout=40)
|
||||
if index == 0 :
|
||||
self.oai.sendline(password)
|
||||
index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=10)
|
||||
if index != 0:
|
||||
print 'ERROR! could not login with SSH.'
|
||||
print 'Expected ' + self.prompt1 + ', received >>>>' + self.oai.before + '<<<<'
|
||||
sys.exit(1)
|
||||
return 'Ok'
|
||||
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
|
||||
def connect_localshell(self, prompt='$'):
|
||||
self.prompt1 = prompt
|
||||
self.prompt2 = prompt
|
||||
|
||||
while 1:
|
||||
try:
|
||||
# start a shell and use the current environment
|
||||
self.oai = pexpect.spawn('bash --norc --noprofile')
|
||||
|
||||
index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=40)
|
||||
if index == 0 :
|
||||
return 'Ok'
|
||||
else :
|
||||
sys.exit(1)
|
||||
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
sys.exit(1)
|
||||
|
||||
def disconnect(self):
|
||||
# print 'disconnecting the ssh connection to ' + self.address + '\n'
|
||||
self.oai.send('exit')
|
||||
# self.cancel()
|
||||
|
||||
def kill(self, user, pw):
|
||||
try:
|
||||
if user == 'root' :
|
||||
os.system('pkill oaisim oaisim_nos1')
|
||||
os.system('pkill cc1')
|
||||
time.sleep(1)
|
||||
os.system('pkill oaisim oaisim_nos1')
|
||||
else :
|
||||
os.system('echo '+pw+' | sudo -S pkill oaisim oaisim_nos1')
|
||||
os.system('echo '+pw+' | sudo -S pkill cc1')
|
||||
time.sleep(1)
|
||||
os.system('echo '+pw+' | sudo -S pkill oaisim oaisim_nos1')
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
#sys.exit(1)
|
||||
|
||||
def rm_driver(self,oai,user, pw):
|
||||
try:
|
||||
if user == 'root' :
|
||||
#oai.send_nowait('rmmod nasmesh;')
|
||||
os.system('rmmod nasmesh;')
|
||||
else :
|
||||
oai.send_nowait('echo '+pw+ ' | sudo -S rmmod nasmesh;')
|
||||
#os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;')
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
#sys.exit(1)
|
||||
|
||||
def driver(self,oai,user,pw):
|
||||
#pwd = oai.send_recv('pwd')
|
||||
oai.send('cd $OPENAIR_TARGETS;')
|
||||
oai.send('cd SIMU/USER;')
|
||||
try:
|
||||
if user == 'root' :
|
||||
oai.send_nowait('insmod ./nasmesh.ko;')
|
||||
else :
|
||||
oai.send('echo '+pw+ ' | sudo -S insmod ./nasmesh.ko;')
|
||||
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
#sys.exit(1)
|
||||
|
||||
def cleandir (self, logdir,debug) :
|
||||
|
||||
for filename in os.listdir(logdir):
|
||||
filepath = os.path.join(logdir, filename)
|
||||
if debug == 2 :
|
||||
print 'logdir is ' + logdir
|
||||
print 'filepath is ' + filepath
|
||||
try:
|
||||
shutil.rmtree(filepath)
|
||||
except Exception, e:
|
||||
error=''
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
#sys.exit(1)
|
||||
#print 'Could not remove the filepath'+ filepath + ' with error ' + OSError
|
||||
|
||||
def create_dir(self,dirname,debug) :
|
||||
if not os.path.exists(dirname) :
|
||||
try:
|
||||
os.makedirs(dirname,0755)
|
||||
except OSError:
|
||||
# There was an error on creation, so make sure we know about it
|
||||
raise
|
||||
def cpu_freq(self):
|
||||
freq=0
|
||||
proc = subprocess.Popen(["cat","/proc/cpuinfo"],
|
||||
stdout=subprocess.PIPE)
|
||||
out, err = proc.communicate()
|
||||
|
||||
for line in out.split("\n"):
|
||||
if "cpu MHz" in line:
|
||||
freq = float(line.split(":")[1])
|
||||
break
|
||||
|
||||
return freq
|
||||
@@ -1,197 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
if [ -s $OPENAIR_DIR/cmake_targets/tools/build_helper ] ; then
|
||||
source $OPENAIR_DIR/cmake_targets/tools/build_helper
|
||||
else
|
||||
echo "Error: no file in the file tree: is OPENAIR_DIR variable set?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tdir=$OPENAIR_DIR/cmake_targets/autotests
|
||||
|
||||
results_file=$tdir/log/compilation_autotests.xml
|
||||
|
||||
# include the jUnit-like logging functions
|
||||
source $OPENAIR_DIR/cmake_targets/tools/test_helper
|
||||
|
||||
test_compile() {
|
||||
xUnit_start
|
||||
test_name=$1.$2
|
||||
compile_prog=$2
|
||||
exec_prog=$3
|
||||
build_dir=$tdir/$1/build
|
||||
log_file=$tdir/log/test.$1.$2.$5.txt
|
||||
target=$5
|
||||
echo "Compiling test case $test_name. Log file = $log_file"
|
||||
rm -fr $build_dir
|
||||
mkdir -p $tdir/$1/build
|
||||
cd $build_dir
|
||||
{
|
||||
cmake ..
|
||||
rm -f $exec_prog
|
||||
make -j`nproc` $compile_prog
|
||||
} >> $log_file 2>&1
|
||||
if [ -s $exec_prog ] ; then
|
||||
cp $exec_prog $tdir/bin/`basename $exec_prog`.$target.$test_name
|
||||
echo_success "$test_name $exec_prog $target compiled"
|
||||
xUnit_success "compilation" $test_name "PASS" 1 "$results_file"
|
||||
else
|
||||
echo_error "$test_name $exec_prog $target compilation failed"
|
||||
xUnit_fail "compilation" $test_name "FAIL" 1 "$results_file"
|
||||
fi
|
||||
}
|
||||
|
||||
mkdir -p $tdir/bin $tdir/log
|
||||
|
||||
updated=$(svn st -q $OPENAIR_DIR)
|
||||
if [ "$updated" != "" ] ; then
|
||||
echo_warning "some files are not in svn:\n $updated"
|
||||
fi
|
||||
|
||||
cd $tdir
|
||||
|
||||
test_compile \
|
||||
010101 oaisim_nos1 \
|
||||
oaisim_nos1 $tdir/bin/oaisim.r8 rel8.nos1
|
||||
|
||||
test_compile \
|
||||
010102 oaisim_nos1 \
|
||||
oaisim_nos1 $tdir/bin/oaisim.r8.nas rel8.nos1.nas
|
||||
|
||||
cp $tdir/010103/CMakeLists.txt.Rel8 $tdir/010103/CMakeLists.txt
|
||||
test_compile \
|
||||
010103 lte-softmodem \
|
||||
lte-softmodem $tdir/bin/lte-softmodem.r8.rf Rel8.EXMIMO
|
||||
|
||||
cp $tdir/010103/CMakeLists.txt.Rel10 $tdir/010103/CMakeLists.txt
|
||||
test_compile \
|
||||
010103 lte-softmodem \
|
||||
lte-softmodem $tdir/bin/lte-softmodem.r10.rf Rel10.EXMIMO
|
||||
|
||||
cp $tdir/010103/CMakeLists.txt.USRP $tdir/010103/CMakeLists.txt
|
||||
test_compile \
|
||||
010103 lte-softmodem \
|
||||
lte-softmodem $tdir/bin/lte-softmodem.r10.rf Rel10.USRP
|
||||
|
||||
test_compile \
|
||||
010104 dlsim \
|
||||
dlsim $tdir/bin/dlsim dlsim.Rel8
|
||||
|
||||
test_compile \
|
||||
010104 ulsim \
|
||||
ulsim $tdir/bin/ulsim ulsim.Rel8
|
||||
|
||||
test_compile \
|
||||
010104 pucchsim \
|
||||
pucchsim $tdir/bin/pucchsim pucchsim.Rel8
|
||||
|
||||
test_compile \
|
||||
010104 prachsim \
|
||||
prachsim $tdir/bin/prachsim prachsim.Rel8
|
||||
|
||||
test_compile \
|
||||
010104 pdcchsim \
|
||||
pdcchsim $tdir/bin/pdcchsim pdcchsim.Rel8
|
||||
|
||||
test_compile \
|
||||
010104 pbchsim \
|
||||
pbchsim $tdir/bin/pbchim pbchsim.Rel8
|
||||
|
||||
test_compile \
|
||||
010104 mbmssim \
|
||||
mbmssim $tdir/bin/mbmssim mbmssim.Rel8
|
||||
|
||||
test_compile \
|
||||
010104 test_secu_knas_encrypt_eia1 \
|
||||
test_secu_knas_encrypt_eia1 $tdir/bin/test_secu_knas_encrypt_eia1 test_secu_knas_encrypt_eia1.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_secu_kenb \
|
||||
test_secu_kenb $tdir/bin/test_secu_kenb test_secu_kenb.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_aes128_ctr_encrypt \
|
||||
test_aes128_ctr_encrypt $tdir/bin/test_aes128_ctr_encrypt test_aes128_ctr_encrypt.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_aes128_ctr_decrypt \
|
||||
test_aes128_ctr_decrypt $tdir/bin/test_aes128_ctr_decrypt test_aes128_ctr_decrypt.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_secu_knas_encrypt_eea2 \
|
||||
test_secu_knas_encrypt_eea2 $tdir/bin/test_secu_knas_encrypt_eea2 test_secu_knas_encrypt_eea2.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_secu_knas \
|
||||
test_secu_knas $tdir/bin/test_secu_knas test_secu_knas.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_secu_knas_encrypt_eea1 \
|
||||
test_secu_knas_encrypt_eea1 $tdir/bin/test_secu_knas_encrypt_eea1 test_secu_knas_encrypt_eea1.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_kdf \
|
||||
test_kdf $tdir/bin/test_kdf test_kdf.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_aes128_cmac_encrypt \
|
||||
test_aes128_cmac_encrypt $tdir/bin/test_aes128_cmac_encrypt test_aes128_cmac_encrypt.Rel10
|
||||
|
||||
test_compile \
|
||||
010104 test_secu_knas_encrypt_eia2 \
|
||||
test_secu_knas_encrypt_eia2 $tdir/bin/test_secu_knas_encrypt_eia2 test_secu_knas_encrypt_eia2.Rel10
|
||||
|
||||
test_compile \
|
||||
010106 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r8.itti Rel8.itti
|
||||
|
||||
test_compile \
|
||||
010107 oaisim_nos1 \
|
||||
oaisim_nos1 $tdir/bin/oaisim.r10 Rel10.nos1
|
||||
|
||||
test_compile \
|
||||
010108 oaisim \
|
||||
oaisim $tdir/bin/oaisim.r10.itti rel10.itti
|
||||
|
||||
#test_compile \ LG: RAL REMOVED
|
||||
# test.0114 oaisim \
|
||||
# oaisim $tdir/bin/oaisim.r8.itti.ral rel8.itti.ral
|
||||
|
||||
#test_compile \ LG: RAL REMOVED
|
||||
# test.0115 oaisim \
|
||||
# oaisim $tdir/bin/oaisim.r10.itti.ral rel10.itti.ral
|
||||
|
||||
test_compile \
|
||||
010120 nasmesh \
|
||||
CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko
|
||||
|
||||
test_compile \
|
||||
010130 rrh_gw \
|
||||
rrh_gw $tdir/bin/rrh_gw
|
||||
|
||||
# write the test results into a file
|
||||
xUnit_write "$results_file"
|
||||
|
||||
echo "Test Results are written to $results_file"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,87 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>OAI5G UE Autotest Report</title>
|
||||
<script type="text/javascript">
|
||||
function showhide(id) {
|
||||
var e = document.getElementById(id);
|
||||
e.style.display = (e.style.display == 'block') ? 'none' : 'block';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<center>
|
||||
<h2>OAI5G UE Autotest Report</h2>
|
||||
</center>
|
||||
|
||||
<p>
|
||||
<table border>
|
||||
<caption>Test session configuration</caption>
|
||||
<tr><td>Start time</td><td>{{test_session_start_time}}</td></tr>
|
||||
<tr><td>Stop time</td><td>{{test_session_stop_time}}</td></tr>
|
||||
<tr><td>Duration</td><td>{{test_session_duration}}</td></tr>
|
||||
<tr><td>MTC host</td><td>{{mtc_host}}</td></tr>
|
||||
<tr><td>User</td><td>{{user}}</td></tr>
|
||||
<tr><td>Password</td><td>{{password}}</td></tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Test Setup</h3>
|
||||
To be complete
|
||||
|
||||
<br></br>
|
||||
<h3>UE phy-test performances tests results</h3>
|
||||
<h4>Objectives</h4>
|
||||
<p>Checks that OAI UE can achieve at least 75 percent of the theoretical throughput.</p>
|
||||
<p>Tests are done for all MCS (0 to 28) for 5MHz and 10MHz bandwidth.</p>
|
||||
<h4>Results</h4>
|
||||
|
||||
<table>
|
||||
<TR><TH>ID</TH><TH>TAG</TH><TH>VERDICT</TH><TH>NB RUNS</TH><TH>PASS</TH><TH>FAILED</TH><TH>INCON</TH><TH>SKIPPED</TH><TH>SEG FAULT</TH><TH>TC Timeout</TH><TH>Start</TH><TH>Stop</TH><TH>Duration</TH><TH>Details</TH></TR>
|
||||
{% for result in test_results|sort(attribute='testcase_name') %}
|
||||
<TR>
|
||||
<TD >{{result.testcase_name}}</TD>
|
||||
<TD align="right">{{result.tags}}</TD>
|
||||
{% if result.testcase_verdict == "PASS" %}
|
||||
<TD align="center" style="background-color:green">{{result.testcase_verdict}}</TD>
|
||||
{% elif result.testcase_verdict == "FAIL" %}
|
||||
<TD align="center" style="background-color:red">{{result.testcase_verdict}}</TD>
|
||||
{% else %}
|
||||
<TD align="center" style="background-color:orange">{{result.testcase_verdict}}</TD>
|
||||
{% endif %}
|
||||
<TD align='center'>{{result.nruns}}</TD>
|
||||
<TD align='center'>{{result.nb_run_pass}}</TD>
|
||||
<TD align='center'>{{result.nb_run_failed}}</TD>
|
||||
<TD align='center'>{{result.nb_run_inc}}</TD>
|
||||
<TD align='center'>{{result.nb_run_skip}}</TD>
|
||||
<TD align='center'>{{result.nb_seg_fault}}</TD>
|
||||
<TD >{{result.testcase_timeout}}</TD>
|
||||
<TD >{{result.testcase_time_start.strftime('%Y-%m-%d %H:%M:%S')}}</TD>
|
||||
<TD >{{result.testcase_time_stop.strftime('%Y-%m-%d %H:%M:%S')}}</TD>
|
||||
<TD >{{result.testcase_duration}}</TD>
|
||||
<TD ><a href="{{ result.testcase_name }}/{{ result.testcase_name }}_report.html">{{ result.testcase_name }}_report.html</a></TD>
|
||||
</TR>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
<br></br>
|
||||
<h3>UE phy-test stability tests results</h3>
|
||||
<h4>Objectives</h4>
|
||||
<p>To be complete</p>
|
||||
<h4>Results</h4>
|
||||
To be complete
|
||||
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>OAI5G UE test case report</title>
|
||||
<script type="text/javascript">
|
||||
function showhide(id) {
|
||||
var e = document.getElementById(id);
|
||||
e.style.display = (e.style.display == 'block') ? 'none' : 'block';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<center>
|
||||
<h2>OAI5G UE test case report details</h2>
|
||||
</center>
|
||||
|
||||
<h3>Test Case description</h3>
|
||||
<p>
|
||||
<table border>
|
||||
|
||||
<tr><td>ID</td><td>{{testcase_name}}</td></tr>
|
||||
<tr><td>TAG</td><td>{{tags}}</td></tr>
|
||||
<tr><td>class</td><td>{{testcaseclass}}</td></tr>
|
||||
<tr><td>description</td><td></td></tr>
|
||||
<tr><td>timeout</td><td>{{testcase_timeout}}</td></tr>
|
||||
<tr><td>number of runs</td><td>{{nruns}}</td></tr>
|
||||
<tr><td>eNB machine</td><td>{{testcase_eNBMachine}}</td></tr>
|
||||
<tr><td>UE machine</td><td>{{testcase_UEMachine}}</td></tr>
|
||||
|
||||
</table>
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Test Case execution</h3>
|
||||
<p>
|
||||
<table border>
|
||||
|
||||
<tr><td>testcase_time_start</td><td>{{testcase_time_start}}</td></tr>
|
||||
<tr><td>testcase_time_stop</td><td>{{testcase_time_stop}}</td></tr>
|
||||
<tr><td>testcase_duration</td><td>{{testcase_duration}}</td></tr>
|
||||
<tr><td>Nb runs</td><td>{{nruns}}</td></tr>
|
||||
<tr><td>Nb PASS</td><td>{{nb_run_pass}}</td></tr>
|
||||
<tr><td>Nb FAILED</td><td>{{nb_run_failed}}</td></tr>
|
||||
<tr><td>Nb INCONCLUSIVE</td><td>{{nb_run_inc}}</td></tr>
|
||||
<tr>
|
||||
<td>testcase_verdict</td>
|
||||
{% if testcase_verdict == "PASS" %}
|
||||
<TD align="center" style="background-color:green">{{testcase_verdict}}</TD>
|
||||
{% elif testcase_verdict == "FAIL" %}
|
||||
<TD align="center" style="background-color:red">{{testcase_verdict}}</TD>
|
||||
{% else %}
|
||||
<TD align="center" style="background-color:orange">{{testcase_verdict}}</TD>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr><td>Nb Seg Fault</td><td>{{nb_seg_fault}}</td></tr>
|
||||
|
||||
</table>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h3>Test Case runs results</h3>
|
||||
|
||||
{% for run_results in runs_results|sort(attribute='run_id') %}
|
||||
<h4>RUN {{run_results.run_id}} </h4>
|
||||
<table border>
|
||||
<tr><td>run_start_time </td><td>{{run_results.run_start_time}}</td></tr>
|
||||
<tr><td>run_stop_time</td><td>{{run_results.run_stop_time}}</td></tr>
|
||||
<tr><td>run_duration</td><td>{{run_results.run_duration}}</td></tr>
|
||||
<tr>
|
||||
<td>run_verdict</td>
|
||||
{% if run_results.run_verdict == "PASS" %}
|
||||
<TD align="center" style="background-color:green">{{run_results.run_verdict}}</TD>
|
||||
{% elif run_results.run_verdict == "FAIL" %}
|
||||
<TD align="center" style="background-color:red">{{run_results.run_verdict}}</TD>
|
||||
{% else %}
|
||||
<TD align="center" style="background-color:orange">{{run_results.run_verdict}}</TD>
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr><td>Seg Fault Satus</td>
|
||||
{% if run_results.ue_seg_fault_status == "NO_SEG_FAULT" %}
|
||||
<TD align="center" style="background-color:green">{{run_results.ue_seg_fault_status}}</TD>
|
||||
{% elif run_results.ue_seg_fault_status == "SEG_FAULT" %}
|
||||
<TD align="center" style="background-color:red">{{run_results.ue_seg_fault_status}}</TD>
|
||||
{% else %}
|
||||
<TD align="center" style="background-color:orange">unknown</TD>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% for run_metrics in run_results.runs_metrics %}
|
||||
<br></br>
|
||||
<table border>
|
||||
<tr><td>metric_id</td><td>{{run_metrics.metric_id}}</td></tr>
|
||||
<tr><td>Description</td><td>{{run_metrics.metric_desc}}</td></tr>
|
||||
<tr><td>Unit of measure</td><td>{{run_metrics.metric_uom}}</td></tr>
|
||||
<tr><td>metric_min</td><td>{{run_metrics.metric_min}}</td></tr>
|
||||
<tr><td>metric_max</td><td>{{run_metrics.metric_max}}</td></tr>
|
||||
<tr><td>metric_mean</td><td>{{run_metrics.metric_mean}}</td></tr>
|
||||
<tr><td>metric_median</td><td>{{run_metrics.metric_median}}</td></tr>
|
||||
<tr><td colspan="2"></td></tr>
|
||||
{% if run_metrics.pass_fail_stat is defined %}
|
||||
<tr><td>Pass/fail stat</td><td>{{run_metrics.pass_fail_stat}}</td></tr>
|
||||
{% endif %}
|
||||
{% if run_metrics.pass_fail_min_limit is defined %}
|
||||
<tr><td>Pass/fail min limit</td><td>{{run_metrics.pass_fail_min_limit}}</td></tr>
|
||||
{% endif %}
|
||||
{% if run_metrics.pass_fail_max_limit is defined %}
|
||||
<tr><td>Pass/fail max limit</td><td>{{run_metrics.pass_fail_max_limit}}</td></tr>
|
||||
{% endif %}
|
||||
<tr><td colspan="2"></td></tr>
|
||||
<tr><td>metric_fig</td><td><IMG src={{run_metrics.metric_fig}}></td></tr>
|
||||
</table>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if run_results.run_traffic.traffic_count != 0 %}
|
||||
<br></br>
|
||||
<table border>
|
||||
<TR><TH>Iperf metric</TH><TH>min</TH><TH>max</TH><TH>mean</TH><TH>median</TH><TR>
|
||||
<TR><td>Bandwidth </td><td>{{run_results.run_traffic.bw_min}}</td><td>{{run_results.run_traffic.bw_max}}</td><td>{{run_results.run_traffic.bw_mean}}</td><td>{{run_results.run_traffic.bw_median}}</td><TR>
|
||||
<TR><td>Jitter</td><td>{{run_results.run_traffic.jitter_min}}</td><td>{{run_results.run_traffic.jitter_max}}</td><td>{{run_results.run_traffic.jitter_mean}}</td><td>{{run_results.run_traffic.jitter_median}}</td><TR>
|
||||
<TR><td>Loss rate</td><td>{{run_results.run_traffic.rl_min}}</td><td>{{run_results.run_traffic.rl_max}}</td><td>{{run_results.run_traffic.rl_mean}}</td><td>{{run_results.run_traffic.rl_median}}</td><TR>
|
||||
<TR><td colspan="5"></td></TR>
|
||||
<TR><td>Iperf duration</td><td>{{run_results.run_traffic.iperf_duration}}</td><td></td><td>Pass/Fail criteria (min duration)</td><td>{{run_results.run_traffic.dur_pass_fail_crit}}</td><TR>
|
||||
<TR><td colspan="5"></td></TR>
|
||||
<tr><td>traffic_fig</td><td colspan="4"><IMG src={{run_results.run_traffic.traffic_fig}}></td></tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,174 +0,0 @@
|
||||
#! /usr/bin/python
|
||||
#******************************************************************************
|
||||
#
|
||||
# \file autotest_analyser.py
|
||||
#
|
||||
# \par Informations
|
||||
# - \b Project : UED Autotest Framework
|
||||
# - \b Software :
|
||||
#
|
||||
# \date 16 september 2016
|
||||
#
|
||||
# \version 0.1
|
||||
#
|
||||
# \brief helper to test lib_autotest_analyser.py
|
||||
#
|
||||
# \author Benoit ROBERT (benoit.robert@syrtem.com)
|
||||
#
|
||||
# \par Statement of Ownership
|
||||
# COPYRIGHT (c) 2016 BY SYRTEM S.A.R.L
|
||||
# This software is furnished under license and may be used and copied
|
||||
# only in accordance with the terms of such license and with the inclusion
|
||||
# of the above COPYRIGHT notice. This SOFTWARE or any other copies thereof
|
||||
# may not be provided or otherwise made available to any other person.
|
||||
# No title to and ownership of the SOFTWARE is hereby transferred.
|
||||
#
|
||||
# The information in this SOFTWARE is subject to change without notice
|
||||
# and should not be constructed as a commitment by SYRTEM.
|
||||
# SYRTEM assumes no responsibility for the use or reliability of its
|
||||
# SOFTWARE on equipment or platform not explicitly validated by SYRTEM.
|
||||
#
|
||||
# *******************************************************************************
|
||||
|
||||
import os
|
||||
import getopt
|
||||
import sys
|
||||
from subprocess import call
|
||||
|
||||
import encoder
|
||||
|
||||
sys.path.append(os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/tools/'))
|
||||
|
||||
|
||||
#test_cases = ('030001', '030901', '031001', '031601', '031701', '031801', '031901', '032001', '032101', '032201', '032301', '032501', '032601', '032801')
|
||||
test_cases = ('032800' , '032730' )
|
||||
|
||||
nb_run = 2
|
||||
|
||||
def error_opt(msg):
|
||||
print("Option error: " + msg)
|
||||
|
||||
|
||||
def main(args):
|
||||
try:
|
||||
analyser = __import__("lib_autotest_analyser")
|
||||
except ImportError as err:
|
||||
print('Import error: ' + str(err))
|
||||
exit(0)
|
||||
|
||||
|
||||
log_path = 'log_save_2016-08-14/log/'
|
||||
|
||||
|
||||
|
||||
# metric = {}
|
||||
# metric['id'] = 'UE_DLSCH_BITRATE'
|
||||
# metric['description'] = 'UE downlink physical throughput'
|
||||
# metric['regex'] = '(UE_DLSCH_BITRATE) =\s+(\d+\.\d+) kbps.+frame = (\d+)\)'
|
||||
# metric['unit_of_meas'] = 'kbps'
|
||||
# metric['min_limit'] = 14668.8
|
||||
|
||||
|
||||
#AUTOTEST Metric : RRC Measurments RSRP[0]=-97.60 dBm/RE, RSSI=-72.83 dBm, RSRQ[0] 9.03 dB, N0 -125 dBm/RE, NF 7.2 dB (frame = 4490)
|
||||
|
||||
metric = {}
|
||||
metric['id'] = 'UE_DL_RRC_MEAS'
|
||||
metric['description'] = 'UE downlink RRC Measurments'
|
||||
metric['nb_metric'] = 5
|
||||
# metric['regex'] = 'AUTOTEST Metric : RRC Measurments (RSRP\[0\])=(-?\d+\.?\d*)\s+(.+),\s+(RSRQ\[0\])=(-?\d+\.?\d*)\s+(.+),,\s+(N0)=(-?\d+\.?\d*)\s+(.+),,\s+(NF)=(-?\d+\.?\d*)\s+(.+)\s+\(frame = (\d+)\) '
|
||||
metric['regex'] = 'AUTOTEST Metric : RRC Measurments (RSRP\[0\])=(-?\d+\.?\d*)\s+(.+)\,\s+(RSSI)=(-?\d+\.?\d*)\s+(.+)\,\s+(RSRQ\[0\])=(-?\d+\.?\d*)\s+(.+)\,\s+(N0)=(-?\d+\.?\d*)\s+(.+)\,\s+(NF)=(-?\d+\.?\d*)\s+(.+)\s+\(frame = (\d+)\)'
|
||||
metric['unit_of_meas'] = 'kbps'
|
||||
metric['min_limit'] = 14668.8
|
||||
|
||||
|
||||
|
||||
#report_path = log_path+'/report/'
|
||||
|
||||
#os.system(' mkdir -p ' + report_path)
|
||||
|
||||
#analyser.create_report_html(report_path)
|
||||
|
||||
#return(0)
|
||||
|
||||
test_results = []
|
||||
|
||||
for test_case in test_cases:
|
||||
|
||||
for i in range(0, nb_run):
|
||||
fname = '..//log//'+test_case+'/run_'+str(i)+'/UE_exec_'+str(i)+'_.log'
|
||||
args = {'metric' : metric,
|
||||
'file' : fname }
|
||||
|
||||
# cell_synch_status = analyser.check_cell_synchro(fname)
|
||||
# if cell_synch_status == 'CELL_SYNCH':
|
||||
# print '!!!!!!!!!!!!!! Cell synchronized !!!!!!!!!!!'
|
||||
# metric_checks_flag = 0
|
||||
# else :
|
||||
# print '!!!!!!!!!!!!!! Cell NOT NOT synchronized !!!!!!!!!!!'
|
||||
|
||||
# metrics_extracted = analyser.do_extract_metrics_new(args)
|
||||
|
||||
|
||||
# de-xmlfy test report
|
||||
xml_file = '..//log//'+test_case+'/test.'+test_case+'_ng.xml'
|
||||
print xml_file
|
||||
|
||||
# test_result =
|
||||
|
||||
|
||||
# test_results.append(test_result)
|
||||
|
||||
# xmlFile = logdir_local_testcase + '/test.' + testcasename + '.xml'
|
||||
# xml="\n<testcase classname=\'"+ testcaseclass + "\' name=\'" + testcasename + "."+tags + "\' Run_result=\'" + test_result_string + "\' time=\'" + str(duration) + " s \' RESULT=\'" + testcase_verdict + "\'></testcase> \n"
|
||||
# write_file(xmlFile, xml, mode="w")
|
||||
|
||||
# xmlFile_ng = logdir_local_testcase + '/test.' + testcasename + '_ng.xml'
|
||||
# xml_ng = xmlify(test_result, wrap=testcasename, indent=" ")
|
||||
# write_file(xmlFile_ng, xml_ng, mode="w")
|
||||
|
||||
|
||||
|
||||
|
||||
# print "min = "+ str( metric_extracted['metric_min'] )
|
||||
# print "min_index = "+ str( metric_extracted['metric_min_index'] )
|
||||
# print "max = "+ str( metric_extracted['metric_max'] )
|
||||
# print "max_index = "+ str( metric_extracted['metric_max_index'] )
|
||||
# print "mean = "+ str( metric_extracted['metric_mean'] )
|
||||
# print "median = "+ str( metric_extracted['metric_median'] )
|
||||
|
||||
# verdict = analyser.do_check_verdict(metric, metric_extracted)
|
||||
# print verdict
|
||||
|
||||
# fname= 'report/2016-9-8_toto/'+test_case+'/UE_metric_UE_DLSCH_BITRATE_'+str(i)+'_.png'
|
||||
# fname= 'report/UE_metric_UE_DLSCH_BITRATE_'+test_case+'_'+str(i)+'.png'
|
||||
|
||||
# print fname
|
||||
# analyser.do_img_metrics(metric, metric_extracted, fname)
|
||||
|
||||
# fname = 'log//'+test_case+'/run_'+str(i)+'/UE_traffic_'+str(i)+'_.log'
|
||||
|
||||
# args = {'file' : fname }
|
||||
|
||||
# traffic_metrics = analyser.do_extract_traffic_metrics(args)
|
||||
|
||||
# fname= 'report/iperf_'+test_case+'_'+str(i)+'.png'
|
||||
|
||||
# print fname
|
||||
# analyser.do_img_traffic(traffic_metrics, fname)
|
||||
|
||||
|
||||
for test_result in test_results:
|
||||
cmd = 'mkdir -p ' + report_dir + '/'+ test_result['testcase_name']
|
||||
result = os.system(cmd)
|
||||
|
||||
report_file = report_dir + '/'+ test_result['testcase_name'] + '/'+ test_result['testcase_name']+ '_report.html'
|
||||
|
||||
analyser.create_test_report_detailed_html(test_result, report_file )
|
||||
|
||||
print test_result
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv)
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
import time
|
||||
import serial
|
||||
import os
|
||||
from socket import AF_INET
|
||||
from pyroute2 import IPRoute
|
||||
import sys
|
||||
import re
|
||||
import threading
|
||||
import signal
|
||||
import traceback
|
||||
import os
|
||||
import commands
|
||||
|
||||
# configure the serial connections (the parameters differs on the device you are connecting to)
|
||||
#First we find an open port to work with
|
||||
serial_port=''
|
||||
ser=serial.Serial()
|
||||
openair_dir = os.environ.get('OPENAIR_DIR')
|
||||
if openair_dir == None:
|
||||
print "Error getting OPENAIR_DIR environment variable"
|
||||
sys.exit(1)
|
||||
|
||||
sys.path.append(os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/tools/'))
|
||||
|
||||
from lib_autotest import *
|
||||
|
||||
def find_open_port():
|
||||
global serial_port, ser
|
||||
max_ports=100
|
||||
serial_port=''
|
||||
while True:
|
||||
if os.path.exists(serial_port) == True:
|
||||
return serial_port
|
||||
for port in range(0,100):
|
||||
serial_port_tmp = '/dev/ttyUSB'+str(port)
|
||||
if os.path.exists(serial_port_tmp) == True:
|
||||
print 'New Serial Port : ' + serial_port_tmp
|
||||
serial_port = serial_port_tmp
|
||||
break
|
||||
if serial_port == '':
|
||||
print" Not able to detect valid serial ports. Resetting the modem now..."
|
||||
reset_ue()
|
||||
else :
|
||||
ser = serial.Serial(port=serial_port)
|
||||
return
|
||||
|
||||
|
||||
#serial_port = '/dev/ttyUSB2'
|
||||
bandrich_ppd_config = os.environ.get('OPENAIR_DIR') + '/cmake_targets/autotests/tools/wdial.bandrich.conf'
|
||||
|
||||
exit_flag=0
|
||||
|
||||
def signal_handler(signal, frame):
|
||||
print('You pressed Ctrl+C!')
|
||||
print('Resetting the UE to detached state')
|
||||
timeout=10
|
||||
exit_flag=1
|
||||
send_command('AT+CGATT=0' , 'OK' , timeout)
|
||||
sys.exit(0)
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
|
||||
|
||||
#ser.open()
|
||||
#ser.isOpen()
|
||||
|
||||
class pppThread (threading.Thread):
|
||||
def __init__(self, threadID, name, counter,port):
|
||||
threading.Thread.__init__(self)
|
||||
self.threadID = threadID
|
||||
self.name = name
|
||||
self.counter = counter
|
||||
self.port=port
|
||||
def run(self):
|
||||
print "Starting " + self.name
|
||||
#Here we keep running pppd thread in indefinite loop as this script terminates sometimes
|
||||
#while 1:
|
||||
while 1:
|
||||
time.sleep(5) #Hard coded, do not reduce this number!
|
||||
print "Starting wvdial now..."
|
||||
print 'exit_flag = ' + str(exit_flag)
|
||||
send_command('AT+CGATT=1','OK', 300)
|
||||
|
||||
#Now we do search and replace on wvdial config file
|
||||
cmd="sed -i \"s%Modem = .*%Modem = " + self.port + "%g\" " + bandrich_ppd_config
|
||||
os.system(cmd)
|
||||
os.system('wvdial -C ' + bandrich_ppd_config + '' )
|
||||
if exit_flag == 1:
|
||||
print "Exit flag set to true. Exiting pppThread now"
|
||||
print "Terminating wvdial now..."
|
||||
|
||||
def send_command (cmd, response, timeout):
|
||||
count=0
|
||||
sleep_duration = 1
|
||||
print 'In function: send_command: cmd = <' + cmd + '> response: <' + response + '> \n'
|
||||
global serial_port, ser
|
||||
while count <= timeout:
|
||||
try:
|
||||
#Sometimes the port does not exist coz of reset in modem.
|
||||
#In that case, we need to search for this port again
|
||||
if os.path.exists(serial_port) == False:
|
||||
find_open_port()
|
||||
ser.write (cmd + '\r\n')
|
||||
out = ''
|
||||
time.sleep(sleep_duration)
|
||||
count = count + sleep_duration
|
||||
while ser.inWaiting() > 0:
|
||||
out += ser.read(1)
|
||||
print 'out = <' + out + '> response = <' + response + '> \n'
|
||||
if re.search(response, out):
|
||||
break
|
||||
except Exception, e:
|
||||
error = ' cmd : ' + cmd + ' response : ' + response
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
def start_ue () :
|
||||
#print 'Enter your commands below.\r\nInsert "exit" to leave the application.'
|
||||
global serial_port
|
||||
timeout=60 #timeout in seconds
|
||||
send_command('AT', 'OK' , timeout)
|
||||
send_command('AT+CFUN=1' , 'OK' , timeout)
|
||||
#send_command('AT+CGATT=0' , 'OK' , timeout)
|
||||
send_command('AT+CGATT=1','OK', 300)
|
||||
#os.system('wvdial -C ' + bandrich_ppd_config + ' &' )
|
||||
|
||||
thread_ppp = pppThread(1, "ppp_thread", 1,port=serial_port)
|
||||
thread_ppp.start()
|
||||
|
||||
#iface='ppp0'
|
||||
|
||||
while 1:
|
||||
time.sleep ( 2)
|
||||
iface=''
|
||||
#Now we check if ppp0 interface is up and running
|
||||
try:
|
||||
if exit_flag == 1:
|
||||
break
|
||||
cmd="ifconfig -a | sed 's/[ \t].*//;/^$/d' | grep ppp"
|
||||
status, out = commands.getstatusoutput(cmd)
|
||||
iface=out
|
||||
ip = IPRoute()
|
||||
idx = ip.link_lookup(ifname=iface)[0]
|
||||
print "iface = " + iface
|
||||
print " Setting route now..."
|
||||
#os.system("status=1; while [ \"$status\" -ne \"0\" ]; do route add -host " + gw + ' ' + iface + " ; status=$? ;sleep 1; echo \"status = $status\" ; sleep 2; done ")
|
||||
os.system ('route add -host ' + gw + ' ' + iface + ' 2> /dev/null')
|
||||
#ip.route('add', dst=gw, oif=iface)
|
||||
|
||||
os.system('sleep 5')
|
||||
#print "Starting ping now..."
|
||||
os.system ('ping -c 1 ' + gw)
|
||||
#break
|
||||
except Exception, e:
|
||||
error = ' Interface ' + iface + 'does not exist...'
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
|
||||
thread_ppp.join()
|
||||
|
||||
def stop_ue():
|
||||
timeout=60
|
||||
os.system('killall wvdial')
|
||||
send_command('AT', 'OK' , timeout)
|
||||
send_command('AT+CGATT=0' , 'OK|ERROR' , timeout)
|
||||
send_command('AT+CFUN=4' , 'OK' , timeout)
|
||||
|
||||
|
||||
#reset the USB BUS of Bandrich UE
|
||||
def reset_ue():
|
||||
stringIdBandrich='BandRich, Inc. 4G LTE adapter'
|
||||
status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
|
||||
if (out == '') :
|
||||
print "Bandrich 4G LTE Adapter not found. Exiting now..."
|
||||
sys.exit()
|
||||
p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)')
|
||||
res=p.findall(out)
|
||||
BusId=res[0][0]
|
||||
DeviceId=res[0][1]
|
||||
VendorId=res[0][2]
|
||||
ProductId=res[0][3]
|
||||
usb_dir= find_usb_path(VendorId, ProductId)
|
||||
print "Bandrich 4G LTE Adapter found in..." + usb_dir
|
||||
print "Sleeping now for 45 seconds...please wait..."
|
||||
cmd = "sudo sh -c \"echo 0 > " + usb_dir + "/authorized\""
|
||||
os.system(cmd + " ; sleep 15" )
|
||||
cmd = "sudo sh -c \"echo 1 > " + usb_dir + "/authorized\""
|
||||
os.system(cmd + " ; sleep 30" )
|
||||
find_open_port()
|
||||
stop_ue()
|
||||
|
||||
i=1
|
||||
gw='192.172.0.1'
|
||||
while i < len(sys.argv):
|
||||
arg=sys.argv[i]
|
||||
if arg == '--start-ue' :
|
||||
print "Turning on UE..."
|
||||
find_open_port()
|
||||
print 'Using Serial port : ' + serial_port
|
||||
start_ue()
|
||||
elif arg == '--stop-ue' :
|
||||
print "Turning off UE..."
|
||||
find_open_port()
|
||||
print 'Using Serial port : ' + serial_port
|
||||
stop_ue()
|
||||
elif arg == '--reset-ue' :
|
||||
print "Resetting UE..."
|
||||
find_open_port()
|
||||
reset_ue()
|
||||
elif arg == '-gw' :
|
||||
gw = sys.argv[i+1]
|
||||
i=i+1
|
||||
elif arg == '-h' :
|
||||
print "--reset-ue: Reset the UE on USB Bus. Similar to unplugging and plugging the UE"
|
||||
print "--stop-ue: Stop the UE. Send DETACH command"
|
||||
print "--start-ue: Start the UE. Send ATTACH command"
|
||||
print "-gw: Specify the default gw as sometimes the gateway/route arguments are not set properly via wvdial"
|
||||
else :
|
||||
print " Script called with wrong arguments, arg = " + arg
|
||||
sys.exit()
|
||||
i = i +1
|
||||
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
import time
|
||||
import serial
|
||||
import os
|
||||
from pyroute2 import IPRoute
|
||||
import sys
|
||||
import re
|
||||
import threading
|
||||
import signal
|
||||
import traceback
|
||||
import os
|
||||
import commands
|
||||
|
||||
# configure the serial connections (the parameters differs on the device you are connecting to)
|
||||
#First we find an open port to work with
|
||||
serial_port=''
|
||||
ser=serial.Serial()
|
||||
openair_dir = os.environ.get('OPENAIR_DIR')
|
||||
if openair_dir == None:
|
||||
print "Error getting OPENAIR_DIR environment variable"
|
||||
sys.exit(1)
|
||||
|
||||
sys.path.append(os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/tools/'))
|
||||
|
||||
from lib_autotest import *
|
||||
|
||||
def find_open_port():
|
||||
global serial_port, ser
|
||||
max_ports=100
|
||||
serial_port=''
|
||||
while True:
|
||||
if os.path.exists(serial_port) == True:
|
||||
return serial_port
|
||||
for port in range(2,100):
|
||||
serial_port_tmp = '/dev/ttyUSB'+str(port)
|
||||
if os.path.exists(serial_port_tmp) == True:
|
||||
print 'New Serial Port : ' + serial_port_tmp
|
||||
serial_port = serial_port_tmp
|
||||
break
|
||||
if serial_port == '':
|
||||
print" Not able to detect valid serial ports. Resetting the modem now..."
|
||||
reset_ue()
|
||||
else :
|
||||
ser = serial.Serial(port=serial_port)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
#serial_port = '/dev/ttyUSB2'
|
||||
bandrich_ppd_config = os.environ.get('OPENAIR_DIR') + '/cmake_targets/autotests/tools/wdial.bandrich.conf'
|
||||
|
||||
exit_flag=0
|
||||
|
||||
def signal_handler(signal, frame):
|
||||
print('You pressed Ctrl+C!')
|
||||
print('Resetting the UE to detached state')
|
||||
timeout=10
|
||||
exit_flag=1
|
||||
send_command('AT+CGATT=0' , 'OK' , timeout)
|
||||
sys.exit(0)
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
|
||||
|
||||
#ser.open()
|
||||
#ser.isOpen()
|
||||
|
||||
class pppThread (threading.Thread):
|
||||
def __init__(self, threadID, name, counter):
|
||||
threading.Thread.__init__(self)
|
||||
self.threadID = threadID
|
||||
self.name = name
|
||||
self.counter = counter
|
||||
def run(self):
|
||||
print "Starting " + self.name
|
||||
#Here we keep running pppd thread in indefinite loop as this script terminates sometimes
|
||||
#while 1:
|
||||
while 1:
|
||||
time.sleep(5) #Hard coded, do not reduce this number!
|
||||
print "Starting wvdial now..."
|
||||
print 'exit_flag = ' + str(exit_flag)
|
||||
send_command('AT+CGATT=1','OK', 300)
|
||||
os.system('wvdial -C ' + bandrich_ppd_config + '' )
|
||||
if exit_flag == 1:
|
||||
print "Exit flag set to true. Exiting pppThread now"
|
||||
print "Terminating wvdial now..."
|
||||
|
||||
def send_command (cmd, response, timeout):
|
||||
count=0
|
||||
sleep_duration = 1
|
||||
print 'In function: send_command: cmd = <' + cmd + '> response: <' + response + '> \n'
|
||||
global serial_port, ser
|
||||
while count <= timeout:
|
||||
try:
|
||||
#Sometimes the port does not exist coz of reset in modem.
|
||||
#In that case, we need to search for this port again
|
||||
if os.path.exists(serial_port) == False:
|
||||
find_open_port()
|
||||
ser.write (cmd + '\r\n')
|
||||
out = ''
|
||||
time.sleep(sleep_duration)
|
||||
count = count + sleep_duration
|
||||
while ser.inWaiting() > 0:
|
||||
out += ser.read(1)
|
||||
print 'out = <' + out + '> response = <' + response + '> \n'
|
||||
if re.search(response, out):
|
||||
break
|
||||
except Exception, e:
|
||||
error = ' cmd : ' + cmd + ' response : ' + response
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
def start_ue () :
|
||||
#print 'Enter your commands below.\r\nInsert "exit" to leave the application.'
|
||||
timeout=60 #timeout in seconds
|
||||
send_command('AT', 'OK' , timeout)
|
||||
#send_command('AT+CFUN=1' , 'OK' , timeout)
|
||||
#send_command('AT+CGATT=0' , 'OK' , timeout)
|
||||
send_command('AT+CGATT=1','OK', 300)
|
||||
#os.system('wvdial -C ' + bandrich_ppd_config + ' &' )
|
||||
|
||||
thread_ppp = pppThread(1, "ppp_thread", 1)
|
||||
thread_ppp.start()
|
||||
|
||||
iface='ppp0'
|
||||
|
||||
while 1:
|
||||
time.sleep ( 2)
|
||||
#Now we check if ppp0 interface is up and running
|
||||
try:
|
||||
if exit_flag == 1:
|
||||
break
|
||||
ip = IPRoute()
|
||||
idx = ip.link_lookup(ifname=iface)[0]
|
||||
os.system ('route add ' + gw + ' ppp0')
|
||||
os.system('sleep 5')
|
||||
os.system ('ping ' + gw)
|
||||
break
|
||||
except Exception, e:
|
||||
error = ' Interface ' + iface + 'does not exist...'
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
|
||||
thread_ppp.join()
|
||||
|
||||
def stop_ue():
|
||||
stringIdBandrich='Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard'
|
||||
status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
|
||||
if (out == '') :
|
||||
print "Huawei E398 Adapter not found. Exiting now..."
|
||||
sys.exit()
|
||||
timeout=60
|
||||
os.system('killall wvdial')
|
||||
send_command('AT', 'OK' , timeout)
|
||||
send_command('AT+CGATT=0' , 'OK|ERROR' , timeout)
|
||||
#send_command('AT+CFUN=4' , 'OK' , timeout)
|
||||
|
||||
|
||||
#reset the USB BUS of Bandrich UE
|
||||
def reset_ue():
|
||||
stringIdBandrich='Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard'
|
||||
status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
|
||||
if (out == '') :
|
||||
print "Huawei E398 Adapter not found. Exiting now..."
|
||||
sys.exit()
|
||||
p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)')
|
||||
res=p.findall(out)
|
||||
BusId=res[0][0]
|
||||
DeviceId=res[0][1]
|
||||
VendorId=res[0][2]
|
||||
ProductId=res[0][3]
|
||||
usb_dir= find_usb_path(VendorId, ProductId)
|
||||
print "Bandrich 4G LTE Adapter found in..." + usb_dir
|
||||
cmd = "sudo sh -c \"echo 0 > " + usb_dir + "/authorized\""
|
||||
os.system(cmd + " ; sleep 15" )
|
||||
cmd = "sudo sh -c \"echo 1 > " + usb_dir + "/authorized\""
|
||||
os.system(cmd + " ; sleep 30" )
|
||||
stop_ue()
|
||||
|
||||
i=1
|
||||
gw='192.172.0.1'
|
||||
while i < len(sys.argv):
|
||||
arg=sys.argv[i]
|
||||
if arg == '--start-ue' :
|
||||
find_open_port()
|
||||
print 'Using Serial port : ' + serial_port
|
||||
start_ue()
|
||||
elif arg == '--stop-ue' :
|
||||
find_open_port()
|
||||
print 'Using Serial port : ' + serial_port
|
||||
stop_ue()
|
||||
elif arg == '--reset-ue' :
|
||||
find_open_port()
|
||||
reset_ue()
|
||||
elif arg == '-gw' :
|
||||
gw = sys.argv[i+1]
|
||||
i=i+1
|
||||
elif arg == '-h' :
|
||||
print "--reset-ue: Reset the UE on USB Bus. Similar to unplugging and plugging the UE"
|
||||
print "--stop-ue: Stop the UE. Send DETACH command"
|
||||
print "--start-ue: Start the UE. Send ATTACH command"
|
||||
print "-gw: Specify the default gw as sometimes the gateway/route arguments are not set properly via wvdial"
|
||||
else :
|
||||
print " Script called with wrong arguments, arg = " + arg
|
||||
sys.exit()
|
||||
i = i +1
|
||||
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
import time
|
||||
import serial
|
||||
import os
|
||||
from pyroute2 import IPRoute
|
||||
import sys
|
||||
import re
|
||||
import threading
|
||||
import signal
|
||||
import traceback
|
||||
import os
|
||||
import commands
|
||||
|
||||
# Find a device ID by running sudo adb devices
|
||||
# The device ID below is for Sony Xperia M4
|
||||
|
||||
device_id='YT9115PX1E'
|
||||
|
||||
|
||||
openair_dir = os.environ.get('OPENAIR_DIR')
|
||||
if openair_dir == None:
|
||||
print "Error getting OPENAIR_DIR environment variable"
|
||||
sys.exit(1)
|
||||
|
||||
sys.path.append(os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/tools/'))
|
||||
|
||||
from lib_autotest import *
|
||||
|
||||
def signal_handler(signal, frame):
|
||||
print('You pressed Ctrl+C!')
|
||||
print('Exiting now...')
|
||||
timeout=10
|
||||
exit_flag=1
|
||||
sys.exit(0)
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
# Find all the process IDs in a phone given the name of process
|
||||
def kill_processes(name):
|
||||
print " Killing all processes by name..." + name
|
||||
while 1:
|
||||
cmd = 'sudo adb -s ' + device_id +' shell "ps |grep ' + name + '"'
|
||||
status, out = commands.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
print "Error executing command to kill process " + name
|
||||
print "Error =" + out
|
||||
sys.exit(1)
|
||||
print "Out = " + out
|
||||
if out=='':
|
||||
break;
|
||||
out_arr = out.split()
|
||||
pid_to_kill = out_arr[1]
|
||||
print "Now killing process ID " + pid_to_kill + " on Phone"
|
||||
cmd = 'sudo adb -s ' + device_id +' shell "kill -9 ' + pid_to_kill + '"'
|
||||
status, out = commands.getstatusoutput(cmd)
|
||||
if status != 0:
|
||||
print "Error execting command to kill process " + name
|
||||
sys.exit(1)
|
||||
print "Out = " + out
|
||||
|
||||
def start_ue () :
|
||||
#print 'Enter your commands below.\r\nInsert "exit" to leave the application.'
|
||||
print 'Killing old iperf/ping sessions'
|
||||
kill_processes('iperf')
|
||||
kill_processes('iperf3')
|
||||
kill_processes('ping')
|
||||
print "Turning off airplane mode"
|
||||
os.system('sudo -E adb devices')
|
||||
os.system('sudo -E adb -s ' + device_id + ' shell \"settings put global airplane_mode_on 0; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false\"')
|
||||
|
||||
while 1:
|
||||
time.sleep ( 2)
|
||||
#Now we check if ppp0 interface is up and running
|
||||
try:
|
||||
cmd = 'sudo adb -s ' + device_id + ' shell netcfg |grep UP'
|
||||
status, out = commands.getstatusoutput(cmd)
|
||||
if (out == '') :
|
||||
print "Waiting for UE to connect and get IP Address..."
|
||||
else :
|
||||
print "UE is now connected. IP Address settings are..." + out
|
||||
os.system('sleep 5')
|
||||
os.system ('sudo adb -s ' + device_id + ' shell ping ' + gw)
|
||||
break
|
||||
except Exception, e:
|
||||
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
error = error + traceback.format_exc()
|
||||
print error
|
||||
|
||||
|
||||
|
||||
def stop_ue():
|
||||
print "Turning on airplane mode"
|
||||
os.system('sudo adb devices')
|
||||
os.system('sudo adb -s ' + device_id + ' shell \"settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true\" ')
|
||||
print "Killing iperf/ping sessions"
|
||||
kill_processes('iperf')
|
||||
kill_processes('iperf3')
|
||||
kill_processes('ping')
|
||||
|
||||
i=1
|
||||
gw='192.172.0.1'
|
||||
while i < len(sys.argv):
|
||||
arg=sys.argv[i]
|
||||
if arg == '--start-ue' :
|
||||
start_ue()
|
||||
elif arg == '--stop-ue' :
|
||||
stop_ue()
|
||||
elif arg == '-gw' :
|
||||
gw = sys.argv[i+1]
|
||||
i=i+1
|
||||
elif arg == '-h' :
|
||||
print "--stop-ue: Stop the UE. Turn on airplane mode"
|
||||
print "--start-ue: Start the UE. Turn off airplane mode"
|
||||
print "-gw: Specify the default gw as sometimes the gateway/route arguments are not set properly via wvdial"
|
||||
else :
|
||||
print " Script called with wrong arguments, arg = " + arg
|
||||
sys.exit()
|
||||
i = i +1
|
||||
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
import time
|
||||
import serial
|
||||
import os
|
||||
from pyroute2 import IPRoute
|
||||
import sys
|
||||
import re
|
||||
import threading
|
||||
import signal
|
||||
import traceback
|
||||
import os
|
||||
import commands
|
||||
|
||||
# configure the serial connections (the parameters differs on the device you are connecting to)
|
||||
#First we find an open port to work with
|
||||
serial_port=''
|
||||
openair_dir = os.environ.get('OPENAIR_DIR')
|
||||
if openair_dir == None:
|
||||
print "Error getting OPENAIR_DIR environment variable"
|
||||
sys.exit(1)
|
||||
|
||||
sys.path.append(os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/tools/'))
|
||||
|
||||
from lib_autotest import *
|
||||
|
||||
#Stop the USB BUS of USRPB210
|
||||
def stop_usrpb210():
|
||||
stringIdBandrich='National Instruments Corp.'
|
||||
status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
|
||||
if (out == '') :
|
||||
print "USRP B210 not found. Exiting now..."
|
||||
sys.exit()
|
||||
p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)')
|
||||
res=p.findall(out)
|
||||
BusId=res[0][0]
|
||||
DeviceId=res[0][1]
|
||||
VendorId=res[0][2]
|
||||
ProductId=res[0][3]
|
||||
usb_dir= find_usb_path(VendorId, ProductId)
|
||||
print "USRP B210 found in..." + usb_dir
|
||||
cmd = "sudo sh -c \"echo 0 > " + usb_dir + "/authorized\""
|
||||
os.system(cmd)
|
||||
|
||||
#Start the USB bus of USRP B210
|
||||
def start_usrpb210():
|
||||
stringIdBandrich='National Instruments Corp.'
|
||||
status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
|
||||
if (out == '') :
|
||||
print "USRP B210 not found. Exiting now..."
|
||||
sys.exit()
|
||||
p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)')
|
||||
res=p.findall(out)
|
||||
BusId=res[0][0]
|
||||
DeviceId=res[0][1]
|
||||
VendorId=res[0][2]
|
||||
ProductId=res[0][3]
|
||||
usb_dir= find_usb_path(VendorId, ProductId)
|
||||
print "USRP B210 found in..." + usb_dir
|
||||
cmd = "sudo sh -c \"echo 1 > " + usb_dir + "/authorized\""
|
||||
os.system(cmd)
|
||||
|
||||
i=1
|
||||
while i < len(sys.argv):
|
||||
arg=sys.argv[i]
|
||||
if arg == '--start-usrpb210' :
|
||||
start_usrpb210()
|
||||
elif arg == '--stop-usrpb210' :
|
||||
stop_usrpb210()
|
||||
elif arg == '-h' :
|
||||
print "--stop-usrpb210: Stop the USRP B210. It cannot be found in uhd_find_devices"
|
||||
print "--start-usrpb210: Start the USRP B210. It can now be found in uhd_find_devices"
|
||||
else :
|
||||
print " Script called with wrong arguments, arg = " + arg
|
||||
sys.exit()
|
||||
i = i +1
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
|
||||
#arg1 idVendor
|
||||
#arg2 idProduct
|
||||
argIdVendor=$1
|
||||
argIdProduct=$2
|
||||
|
||||
echo $1
|
||||
echo $2
|
||||
|
||||
for X in /sys/bus/usb/devices/*; do
|
||||
#echo "$X"
|
||||
idVendor=`cat "$X/idVendor" 2>/dev/null`
|
||||
idProduct=`cat "$X/idProduct" 2>/dev/null`
|
||||
if [ "$argIdVendor" == "$idVendor" ] && [ "$argIdProduct" == "$idProduct" ]
|
||||
then
|
||||
echo "$X"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
# To free unused memory else test setup runs out of memory
|
||||
|
||||
mem_threshold=0.2 #If free memory is less than this threshold, then VM drop cache is called
|
||||
mem_tot=`vmstat -s -S k |grep "total memory" | awk '{print $1}'`
|
||||
mem_free=`vmstat -s -S k |grep "free memory" | awk '{print $1}'`
|
||||
|
||||
mem_frac=`bc <<< "scale=4;$mem_free/$mem_tot"`
|
||||
echo $mem_frac
|
||||
#mem_frac=`bc <<< "scale=4;`echo $mem_free`/`echo $mem_tot`"`
|
||||
echo "Total Memory = $mem_tot k "
|
||||
echo "Free Memory = $mem_free k"
|
||||
echo "Fraction free memory = $mem_frac "
|
||||
|
||||
res=`bc <<< "$mem_frac < 0.2" `
|
||||
|
||||
echo "Comparison Result = $res"
|
||||
|
||||
if [ "$res" == "1" ]
|
||||
then
|
||||
echo "Free memory less than threshold = $mem_threshold"
|
||||
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches '
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
#Simple script to retry git clone in case of failure
|
||||
|
||||
REALGIT=/usr/bin/git
|
||||
|
||||
RETRIES=10
|
||||
DELAY=10
|
||||
COUNT=1
|
||||
while [ $COUNT -lt $RETRIES ]; do
|
||||
$REALGIT $* >> git-clone-`hostname`-log.txt 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
RETRIES=0
|
||||
break
|
||||
fi
|
||||
let COUNT=$COUNT+1
|
||||
sleep $DELAY
|
||||
done
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
#arg1 timeout to wait before running the script
|
||||
#arg2 interface
|
||||
#arg3 iperf arguments
|
||||
|
||||
args=($*)
|
||||
timeout=${args[0]}
|
||||
iface=${args[1]}
|
||||
iperf3_args=(${args[@]:2})
|
||||
|
||||
#array=${1:-1}
|
||||
echo "args = ${args[@]}"
|
||||
echo "timeout = $timeout"
|
||||
echo "iface = $iface"
|
||||
echo "iperf3_args = ${iperf3_args[@]}"
|
||||
|
||||
sleep $timeout
|
||||
|
||||
while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5
|
||||
|
||||
iperf3 ${iperf3_args[@]}
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
#arg1 timeout to wait before running the script
|
||||
#arg2 interface
|
||||
#arg3 iperf3 arguments
|
||||
|
||||
args=($*)
|
||||
timeout=${args[0]}
|
||||
device_id=${args[1]}
|
||||
iperf3_args=(${args[@]:2})
|
||||
|
||||
#array=${1:-1}
|
||||
echo "args = ${args[@]}"
|
||||
echo "timeout = $timeout"
|
||||
echo "device_id = $device_id"
|
||||
echo "iperf3_args = ${iperf3_args[@]}"
|
||||
|
||||
sleep $timeout
|
||||
|
||||
while true ; do
|
||||
cmd=`sudo adb -s $device_id shell netcfg |grep 192.`
|
||||
if [ -z "$cmd" ]; then
|
||||
echo "Wating for UE to connect and get IP Address..."
|
||||
sleep 1
|
||||
else
|
||||
echo "UE is now connected. IP Address settings are... $cmd"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Starting iperf3 now..."
|
||||
|
||||
sudo adb -s $device_id shell /data/local/tmp/iperf3 ${iperf3_args[@]}
|
||||
@@ -1,98 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
#arg1 timeout to wait before running the script
|
||||
#arg2 interface
|
||||
#arg3 iperf arguments
|
||||
|
||||
echo "Start time of script: `date`"
|
||||
|
||||
args=($*)
|
||||
timeout=${args[0]}
|
||||
iface=${args[1]}
|
||||
iperf_args=(${args[@]:2})
|
||||
|
||||
ip_client=`echo "$iperf_args" | sed -ne 's/.*\-c[ ]*\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*/\1/p'`
|
||||
|
||||
#array=${1:-1}
|
||||
echo "args = ${args[@]}"
|
||||
echo "timeout = $timeout"
|
||||
echo "iface = $iface"
|
||||
echo "iperf_args = ${iperf_args[@]}"
|
||||
echo "ip_client = $ip_client"
|
||||
|
||||
|
||||
|
||||
# Test an IP address for validity:
|
||||
# Usage:
|
||||
# valid_ip IP_ADDRESS
|
||||
# if [[ $? -eq 0 ]]; then echo good; else echo bad; fi
|
||||
# OR
|
||||
# if valid_ip IP_ADDRESS; then echo good; else echo bad; fi
|
||||
#
|
||||
function valid_ip()
|
||||
{
|
||||
local ip=$1
|
||||
local stat=1
|
||||
|
||||
if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
OIFS=$IFS
|
||||
IFS='.'
|
||||
ip=($ip)
|
||||
IFS=$OIFS
|
||||
[[ ${ip[0]} -le 255 && ${ip[1]} -le 255 \
|
||||
&& ${ip[2]} -le 255 && ${ip[3]} -le 255 ]]
|
||||
stat=$?
|
||||
fi
|
||||
return $stat
|
||||
}
|
||||
|
||||
if valid_ip $iface; then
|
||||
echo "$iface is Valid IP Address. Checking for connectivity..."
|
||||
ping -c 1 $iface >& /dev/null
|
||||
while [ "$?" != "0" ]; do
|
||||
ping -c 1 $iface >& /dev/null
|
||||
done
|
||||
echo "$iface connectivity achieved at `date`, Seconds = $SECONDS"
|
||||
|
||||
else
|
||||
|
||||
echo "Waiting for Interface $iface to come up..."
|
||||
while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done
|
||||
echo "$iface is now available at `date` , Seconds = $SECONDS"
|
||||
fi
|
||||
|
||||
|
||||
#if [ -n "$ip_client" ]; then
|
||||
#echo "Waiting for route to be setup before iperf makes connection..."
|
||||
# var=`route -n | grep $ip_client`
|
||||
# if ["$var" != "" ] ; then break; fi
|
||||
#
|
||||
#fi
|
||||
|
||||
echo "Sleeping for additional $timeout seconds"
|
||||
sleep $timeout
|
||||
|
||||
echo "Starting iperf at `date` , Seconds = $SECONDS ...."
|
||||
iperf ${iperf_args[@]}
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
#arg1 timeout to wait before running the script
|
||||
#arg2 interface
|
||||
#arg3 iperf arguments
|
||||
|
||||
args=($*)
|
||||
timeout=${args[0]}
|
||||
device_id=${args[1]}
|
||||
iperf_args=(${args[@]:2})
|
||||
|
||||
#array=${1:-1}
|
||||
echo "args = ${args[@]}"
|
||||
echo "timeout = $timeout"
|
||||
echo "device_id = $device_id"
|
||||
echo "iperf_args = ${iperf_args[@]}"
|
||||
|
||||
sleep $timeout
|
||||
|
||||
while true ; do
|
||||
cmd=`sudo adb -s $device_id shell netcfg |grep 192.`
|
||||
if [ -z "$cmd" ]; then
|
||||
echo "Wating for UE to connect and get IP Address..."
|
||||
sleep 1
|
||||
else
|
||||
echo "UE is now connected. IP Address settings are... $cmd"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Starting iperf now..."
|
||||
|
||||
sudo adb -s $device_id shell /data/local/tmp/iperf ${iperf_args[@]}
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
import os
|
||||
from pyroute2 import IPRoute
|
||||
import sys
|
||||
import re
|
||||
import threading
|
||||
import signal
|
||||
import traceback
|
||||
import commands
|
||||
|
||||
def read_file(filename):
|
||||
try:
|
||||
file = open(filename, 'r')
|
||||
return file.read()
|
||||
except Exception, e:
|
||||
# WE just ignore the exception as some files are probably not present
|
||||
#error = ' Filename ' + filename
|
||||
#error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
|
||||
#error = error + traceback.format_exc()
|
||||
#print error
|
||||
return ''
|
||||
|
||||
def find_usb_path(idVendor, idProduct):
|
||||
for root, dirs, files in os.walk("/sys/bus/usb/devices", topdown=False):
|
||||
for name in dirs:
|
||||
tmpdir= os.path.join(root, name)
|
||||
tmpidVendor = read_file(tmpdir+'/idVendor').replace("\n","")
|
||||
tmpidProduct = read_file(tmpdir+'/idProduct').replace("\n","")
|
||||
if tmpidVendor == idVendor and tmpidProduct == idProduct:
|
||||
return tmpdir
|
||||
return ''
|
||||
|
||||
@@ -1,544 +0,0 @@
|
||||
#******************************************************************************
|
||||
#
|
||||
# \file lib_autotest_analyser.py
|
||||
#
|
||||
# \par Informations
|
||||
# - \b Project : UED Autotest Framework
|
||||
# - \b Software :
|
||||
#
|
||||
# \date 16 september 2016
|
||||
#
|
||||
# \version 0.1
|
||||
#
|
||||
# \brief library to extract metrics from autotest logs and assign a verdict
|
||||
#
|
||||
# \author Benoit ROBERT (benoit.robert@syrtem.com)
|
||||
#
|
||||
# \par Statement of Ownership
|
||||
# COPYRIGHT (c) 2016 BY SYRTEM S.A.R.L
|
||||
# This software is furnished under license and may be used and copied
|
||||
# only in accordance with the terms of such license and with the inclusion
|
||||
# of the above COPYRIGHT notice. This SOFTWARE or any other copies thereof
|
||||
# may not be provided or otherwise made available to any other person.
|
||||
# No title to and ownership of the SOFTWARE is hereby transferred.
|
||||
#
|
||||
# The information in this SOFTWARE is subject to change without notice
|
||||
# and should not be constructed as a commitment by SYRTEM.
|
||||
# SYRTEM assumes no responsibility for the use or reliability of its
|
||||
# SOFTWARE on equipment or platform not explicitly validated by SYRTEM.
|
||||
#
|
||||
# *******************************************************************************
|
||||
|
||||
|
||||
import re
|
||||
from pylab import *
|
||||
from matplotlib.font_manager import FontProperties
|
||||
|
||||
import os
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
|
||||
PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
TEMPLATE_ENVIRONMENT = Environment(
|
||||
autoescape=False,
|
||||
loader=FileSystemLoader(os.path.join(PATH, '../templates')),
|
||||
trim_blocks=False)
|
||||
|
||||
|
||||
def render_template(template_filename, context):
|
||||
return TEMPLATE_ENVIRONMENT.get_template(template_filename).render(context)
|
||||
|
||||
|
||||
|
||||
def init(args = None):
|
||||
return
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
def do_extract_metrics(args):
|
||||
|
||||
# print ""
|
||||
# print "do_extract_metrics ... "
|
||||
|
||||
fname = args['file']
|
||||
metric = args['metric']
|
||||
# print(fname)
|
||||
# print 'metric id = ' + metric['id']
|
||||
# print 'metric regex = ' + metric['regex']
|
||||
|
||||
count = 0
|
||||
mmin = 0
|
||||
mmin_index = 0
|
||||
mmax = 0
|
||||
mmax_index = 0
|
||||
mean = 0
|
||||
median = 0
|
||||
|
||||
|
||||
output = np.fromregex(fname,metric['regex'], [('id', 'S20'), ('metric', np.float), ('frame', np.int)] )
|
||||
# print 'T0T0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
|
||||
# print output
|
||||
count = output['metric'].size
|
||||
# print count
|
||||
if count > 0:
|
||||
mmin = np.amin(output['metric']);
|
||||
mmin_index = np.argmin(output['metric']);
|
||||
mmax = np.amax(output['metric']);
|
||||
mmax_index = np.argmax(output['metric']);
|
||||
mean = np.mean(output['metric']);
|
||||
median = np.median(output['metric']);
|
||||
|
||||
# print ( ( (metric['min_limit'] > output['metric']).sum() / float(output['metric'].size) ) * 100 )
|
||||
|
||||
ret = { 'metric_count' : count,
|
||||
'metric_buf' : output,
|
||||
'metric_min' : mmin,
|
||||
'metric_min_index' : mmin_index,
|
||||
'metric_max' : mmax,
|
||||
'metric_max_index' : mmax_index,
|
||||
'metric_mean' : mean,
|
||||
'metric_median' : median,
|
||||
}
|
||||
return(ret)
|
||||
|
||||
|
||||
def do_extract_metrics_new(args):
|
||||
|
||||
# print ""
|
||||
# print "do_extract_metrics ... "
|
||||
|
||||
fname = args['file']
|
||||
metric = args['metric']
|
||||
print(fname)
|
||||
print 'metric id = ' + metric['id']
|
||||
print 'metric regex = ' + metric['regex']
|
||||
|
||||
|
||||
|
||||
count = 0
|
||||
mmin = 0
|
||||
mmin_index = 0
|
||||
mmax = 0
|
||||
mmax_index = 0
|
||||
mean = 0
|
||||
median = 0
|
||||
|
||||
toto = [('id', 'S20'), ('metric', np.float), ('frame', np.int)]
|
||||
print toto
|
||||
|
||||
|
||||
np_format = []
|
||||
|
||||
for x in range(0, metric['nb_metric']):
|
||||
np_format.append( ('id'+str(x), 'S20') )
|
||||
np_format.append( ('metric'+str(x), np.float) )
|
||||
np_format.append( ('uom'+str(x), 'S20') )
|
||||
np_format.append( ('frame', np.int))
|
||||
|
||||
print np_format
|
||||
|
||||
output = np.fromregex(fname,metric['regex'], np_format)
|
||||
print output
|
||||
count = output['frame'].size
|
||||
print count
|
||||
if count > 0:
|
||||
|
||||
|
||||
fontP = FontProperties()
|
||||
fontP.set_size('small')
|
||||
|
||||
fig = plt.figure(1)
|
||||
plt.figure(figsize=(10,10))
|
||||
|
||||
plot_xmax = np.amax(output['frame'])+np.amin(output['frame'])
|
||||
|
||||
for x in range(0, metric['nb_metric']):
|
||||
|
||||
metric_name = output['id'+str(x)][0]
|
||||
metric_uom = output['uom'+str(x)][0]
|
||||
|
||||
mmin = np.amin(output['metric'+str(x)])
|
||||
mmax = np.amax(output['metric'+str(x)])
|
||||
mmean = np.mean(output['metric'+str(x)])
|
||||
mmedian = np.median(output['metric'+str(x)])
|
||||
|
||||
plot_loc = 100*metric['nb_metric']+10+x+1
|
||||
|
||||
sbplt = plt.subplot(plot_loc)
|
||||
sbplt.plot(output['frame'], output['metric'+str(x)], color='b' )
|
||||
sbplt.set_title( metric_name+' ('+metric_uom+')')
|
||||
if mmin < 0:
|
||||
sbplot_ymin=mmin+mmin/10
|
||||
else:
|
||||
sbplot_ymin=0
|
||||
sbplt.set_ylim(ymin=sbplot_ymin)
|
||||
if mmax > 0:
|
||||
sbplot_ymax=mmax+mmax/10
|
||||
else:
|
||||
sbplot_ymax=0
|
||||
sbplt.set_ylim(ymax=sbplot_ymax)
|
||||
|
||||
sbplt.set_xlim(xmax=plot_xmax)
|
||||
sbplt.set_xlim(xmin=0)
|
||||
text='min: '+str(mmin)+'\nmax: '+str(mmax)+'\nmean: '+str(mmean)+'\nmedian: '+str(mmedian)
|
||||
sbplt.text( plot_xmax+10,sbplot_ymin,text)
|
||||
sbplt.set_xlabel('frame')
|
||||
sbplt.set_ylabel(metric_name)
|
||||
|
||||
plt.tight_layout()
|
||||
|
||||
fname = "toto.png"
|
||||
|
||||
# lgd = plt.legend(prop=fontP, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
|
||||
mng = plt.get_current_fig_manager()
|
||||
plt.savefig(fname, bbox_inches='tight')
|
||||
plt.close()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
mmin = np.amin(output['metric']);
|
||||
mmin_index = np.argmin(output['metric']);
|
||||
mmax = np.amax(output['metric']);
|
||||
mmax_index = np.argmax(output['metric']);
|
||||
mean = np.mean(output['metric']);
|
||||
median = np.median(output['metric']);
|
||||
|
||||
# print ( ( (metric['min_limit'] > output['metric']).sum() / float(output['metric'].size) ) * 100 )
|
||||
|
||||
ret = { 'metric_count' : count,
|
||||
'metric_buf' : output,
|
||||
|
||||
|
||||
'metric_min' : mmin,
|
||||
'metric_min_index' : mmin_index,
|
||||
'metric_max' : mmax,
|
||||
'metric_max_index' : mmax_index,
|
||||
'metric_mean' : mean,
|
||||
'metric_median' : median,
|
||||
}
|
||||
return(ret)
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
def do_check_verdict(metric_def, metric_data):
|
||||
verdict = 'INCON'
|
||||
|
||||
pass_fail_stat = metric_def['pass_fail_stat']
|
||||
|
||||
if pass_fail_stat == 'max_value':
|
||||
metric_stat = metric_data['metric_max']
|
||||
elif pass_fail_stat == 'min_value':
|
||||
metric_stat = metric_data['metric_min']
|
||||
elif pass_fail_stat == 'mean_value':
|
||||
metric_stat = metric_data['metric_mean']
|
||||
elif pass_fail_stat == 'median_value':
|
||||
metric_stat = metric_data['metric_median']
|
||||
else :
|
||||
print "do_check_verdict -> undef metric stat (pass_fail_stat in xml file)"
|
||||
return verdict
|
||||
|
||||
if 'max_limit' in metric_def:
|
||||
if metric_stat > metric_def['max_limit']:
|
||||
verdict = 'FAIL'
|
||||
else:
|
||||
verdict = 'PASS'
|
||||
|
||||
if 'min_limit' in metric_def:
|
||||
if metric_stat < metric_def['min_limit']:
|
||||
verdict = 'FAIL'
|
||||
else:
|
||||
verdict = 'PASS'
|
||||
return verdict
|
||||
|
||||
|
||||
def do_print_metrics(metric_def, metric_data):
|
||||
|
||||
|
||||
if metric_data['metric_count'] > 0 :
|
||||
|
||||
# output = np.array( metric_data['metric_buf'] , [('id', 'S20'), ('metric', np.float), ('frame', np.int)])
|
||||
output = metric_data['metric_buf']
|
||||
# print output
|
||||
|
||||
fontP = FontProperties()
|
||||
fontP.set_size('small')
|
||||
|
||||
plt.scatter(output['frame'], output['metric'], color='b', alpha=0.33, s = 1 )
|
||||
plt.plot([0, output['frame'][metric_data['metric_count']-1]],[ metric_def['min_limit'],metric_def['min_limit']], 'r-', lw=2) # Red straight line
|
||||
|
||||
plt.title('Physical throughput ')
|
||||
plt.xlabel('frame')
|
||||
plt.ylabel(metric_def['id'])
|
||||
plt.legend(prop=fontP)
|
||||
mng = plt.get_current_fig_manager()
|
||||
plt.show()
|
||||
|
||||
def do_img_metrics(metric_def, metric_data, fname):
|
||||
|
||||
|
||||
if metric_data['metric_count'] > 0 :
|
||||
|
||||
# output = np.array( metric_data['metric_buf'] , [('id', 'S20'), ('metric', np.float), ('frame', np.int)])
|
||||
output = metric_data['metric_buf']
|
||||
# print 'TITI !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
|
||||
# print output
|
||||
|
||||
# print metric_def['min_limit']
|
||||
# print metric_data['metric_count']
|
||||
# print output['frame'][metric_data['metric_count']-1]
|
||||
|
||||
fontP = FontProperties()
|
||||
fontP.set_size('small')
|
||||
|
||||
plt.figure()
|
||||
|
||||
# print output['frame'].size
|
||||
# print output['metric'].size
|
||||
|
||||
plt.scatter(output['frame'], output['metric'], color='b', alpha=0.33, s = 1 , label=metric_def['id'])
|
||||
|
||||
if 'min_limit' in metric_def:
|
||||
plt.plot([0, output['frame'][metric_data['metric_count']-1]],[ metric_def['min_limit'],metric_def['min_limit']], 'r-', lw=2, label='min limit') # Red straight line
|
||||
|
||||
plt.title(metric_def['id'] +' ('+metric_def['unit_of_meas']+')')
|
||||
plt.xlabel('frame')
|
||||
plt.ylabel(metric_def['id'])
|
||||
|
||||
# Set graphic minimum Y axis
|
||||
# -------------------------
|
||||
if metric_data['metric_min'] < 0:
|
||||
plt.ylim(ymin=metric_data['metric_min']+metric_data['metric_min']/10)
|
||||
else :
|
||||
plt.ylim(ymin=0)
|
||||
|
||||
y_axis_max = 0
|
||||
if 'min_limit' in metric_def:
|
||||
if metric_data['metric_max'] > metric_def['min_limit']:
|
||||
y_axis_max =metric_data['metric_max']+metric_data['metric_max']/10
|
||||
else:
|
||||
y_axis_max =metric_def['min_limit']+metric_def['min_limit']/10
|
||||
else:
|
||||
y_axis_max =metric_data['metric_max']+metric_data['metric_max']/10
|
||||
|
||||
|
||||
plt.ylim(ymax=y_axis_max)
|
||||
|
||||
lgd = plt.legend(prop=fontP, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
|
||||
mng = plt.get_current_fig_manager()
|
||||
plt.savefig(fname, bbox_extra_artists=(lgd,), bbox_inches='tight')
|
||||
plt.close()
|
||||
|
||||
# with open(fname, 'r') as f:
|
||||
# for line in f:
|
||||
# m = re.search(metric['regex'], line)
|
||||
# if m :
|
||||
# print m.group(1) + " -> "+m.group(2)
|
||||
|
||||
|
||||
|
||||
|
||||
def do_extract_traffic_metrics(args):
|
||||
|
||||
fname = args['file']
|
||||
|
||||
# print(fname)
|
||||
# print 'metric id = ' + metric['id']
|
||||
|
||||
#[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
|
||||
#[ 3] 0.0- 1.0 sec 238 KBytes 1.95 Mbits/sec 0.980 ms 2/ 174 (1.1%)
|
||||
# [ 3] 0.0- 1.0 sec 63.2 KBytes 517 Kbits/sec 0.146 ms 1/ 45 (2.2%)
|
||||
|
||||
# iperf_regex = '[\s*(\d+)]\s+\d+\.\d+-\s*(\d+\.\d+)\s+sec\s+(\d+).+(\d+\.\d+).+(\d+\.\d+).+(\d+)\/\s*(\d+)\s+\((\d+\.\d+)\%\)'
|
||||
# ID 0.0 1.0 63.2 KByte 517 Kbits/s 0.146
|
||||
iperf_regex = '\[\s*(\d+)\]\s+(\d+\.*\d*)-\s*(\d+\.*\d*)\s+sec\s+(\d+\.*\d*)\s+(\D+)\s+(\d+\.*\d*)\s+(\D+)\s+(\d+\.*\d*)\s+ms\s+(\d+)\/\s*(\d+)\s+\((\d+\.*\d*)\%\)'
|
||||
# print 'iperf regex = ' + iperf_regex
|
||||
|
||||
count = 0
|
||||
bw_min = 0
|
||||
bw_max = 0
|
||||
bw_mean = 0
|
||||
bw_median = 0
|
||||
jitter_min = 0
|
||||
jitter_max = 0
|
||||
jitter_mean = 0
|
||||
jitter_median = 0
|
||||
|
||||
rl_min = 0
|
||||
rl_max = 0
|
||||
rl_mean = 0
|
||||
rl_median = 0
|
||||
|
||||
interval_stop_max = 0
|
||||
|
||||
output = np.fromregex(fname,iperf_regex, [('id', np.int) , ('interval_start', np.float), ('interval_stop', np.float), ('transfer', np.float), ('transfer_uom', 'S20') ,('bandwidth', np.float), ('bandwidth_uom', 'S20') ,('jitter', np.float), ('lost', np.int) , ('total', np.int), ('rate_lost', np.float) ] )
|
||||
|
||||
count = output['id'].size -1
|
||||
# remove last line that is an iperf result resume
|
||||
|
||||
if count > 0:
|
||||
|
||||
output= np.delete(output, (count), axis=0 )
|
||||
# print output
|
||||
|
||||
bw_min = np.amin(output['bandwidth']);
|
||||
bw_max = np.amax(output['bandwidth']);
|
||||
bw_mean = np.mean(output['bandwidth']);
|
||||
bw_median = np.median(output['bandwidth']);
|
||||
|
||||
jitter_min = np.amin(output['jitter']);
|
||||
jitter_max = np.amax(output['jitter']);
|
||||
jitter_mean = np.mean(output['jitter']);
|
||||
jitter_median = np.median(output['jitter']);
|
||||
|
||||
rl_min = np.amin(output['rate_lost']);
|
||||
rl_max = np.amax(output['rate_lost']);
|
||||
rl_mean = np.mean(output['rate_lost']);
|
||||
rl_median = np.median(output['rate_lost']);
|
||||
|
||||
interval_stop_max = np.amax(output['interval_stop']);
|
||||
|
||||
else :
|
||||
count = 0
|
||||
|
||||
|
||||
ret = { 'traffic_count' : count,
|
||||
'traffic_buf' : output,
|
||||
'bw_min' : bw_min,
|
||||
'bw_max' : bw_max,
|
||||
'bw_mean' : bw_mean,
|
||||
'bw_median' : bw_median,
|
||||
'jitter_min' : jitter_min,
|
||||
'jitter_max' : jitter_max,
|
||||
'jitter_mean' : jitter_mean,
|
||||
'jitter_median' : jitter_median,
|
||||
'rl_min' : rl_min,
|
||||
'rl_max' : rl_max,
|
||||
'rl_mean' : rl_mean,
|
||||
'rl_median' : rl_median,
|
||||
'interval_stop_max' : interval_stop_max
|
||||
}
|
||||
return(ret)
|
||||
|
||||
|
||||
|
||||
|
||||
def do_img_traffic(traffic_data, fname):
|
||||
|
||||
|
||||
if traffic_data['traffic_count'] > 0 :
|
||||
|
||||
output = traffic_data['traffic_buf']
|
||||
|
||||
|
||||
fontP = FontProperties()
|
||||
fontP.set_size('small')
|
||||
|
||||
fig = plt.figure(1)
|
||||
|
||||
ax1= plt.subplot(311)
|
||||
plt.plot(output['interval_stop'], output['bandwidth'], color='b' )
|
||||
ax1.set_title('Bandwidth (Mbits/s)')
|
||||
ax1.set_ylim(ymin=-1)
|
||||
ax1.set_xlim(xmax=np.amax(output['interval_stop']))
|
||||
text='min: '+str(traffic_data['bw_min'])+'\nmax: '+str(traffic_data['bw_max'])+'\nmean: '+str(traffic_data['bw_mean'])+'\nmedian: '+str(traffic_data['bw_median'])
|
||||
ax1.text( np.amax(output['interval_stop'])+10,0,text)
|
||||
ax1.set_xlabel('time (s)')
|
||||
ax1.set_ylabel(' ')
|
||||
|
||||
ax2=plt.subplot(312)
|
||||
plt.plot(output['interval_stop'], output['jitter'], color='b' )
|
||||
ax2.set_title('Jitter (ms)')
|
||||
ax2.set_xlim(xmax=np.amax(output['interval_stop']))
|
||||
ax2.set_ylim(ymin=-1)
|
||||
text='min: '+str(traffic_data['jitter_min'])+'\nmax: '+str(traffic_data['jitter_max'])+'\nmean: '+str(traffic_data['jitter_mean'])+'\nmedian: '+str(traffic_data['jitter_median'])
|
||||
ax2.text( np.amax(output['interval_stop'])+10,0,text)
|
||||
ax2.set_xlabel('time (s)')
|
||||
ax2.set_ylabel(' ')
|
||||
|
||||
ax3=plt.subplot(313)
|
||||
plt.plot(output['interval_stop'], output['rate_lost'], color='b')
|
||||
ax3.set_title('Loss rate %')
|
||||
ax3.set_xlim(xmax=np.amax(output['interval_stop']))
|
||||
ax3.set_ylim(ymin=-1)
|
||||
text='min: '+str(traffic_data['rl_min'])+'\nmax: '+str(traffic_data['rl_max'])+'\nmean: '+str(traffic_data['rl_mean'])+'\nmedian: '+str(traffic_data['rl_median'])
|
||||
ax3.text( np.amax(output['interval_stop'])+10,0,text)
|
||||
ax3.set_xlabel('time (s)')
|
||||
ax3.set_ylabel(' ')
|
||||
|
||||
# plt.title('Physical throughput ('+metric_def['unit_of_meas']+')')
|
||||
# plt.xlabel('time (s)')
|
||||
# plt.ylabel(metric_def['id'])
|
||||
|
||||
# Set graphic minimum Y axis
|
||||
# -------------------------
|
||||
# if traffic_data['bw_min'] == 0 :
|
||||
# plt.ylim(ymin=-metric_def['min_limit']/10)
|
||||
# else :
|
||||
# plt.ylim(ymin=0)
|
||||
|
||||
# y_axis_max = 0
|
||||
# if traffic_data['metric_max'] > metric_def['min_limit']:
|
||||
# y_axis_max =traffic_data['metric_max']+traffic_data['metric_max']/10
|
||||
# else:
|
||||
# y_axis_max =metric_def['min_limit']+metric_def['min_limit']/10
|
||||
#
|
||||
# plt.ylim(ymax=y_axis_max)
|
||||
|
||||
plt.tight_layout()
|
||||
|
||||
# lgd = plt.legend(prop=fontP, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
|
||||
mng = plt.get_current_fig_manager()
|
||||
plt.savefig(fname, bbox_inches='tight')
|
||||
plt.close()
|
||||
|
||||
|
||||
|
||||
|
||||
def create_report_html(context):
|
||||
fname = context['report_path']+"/index.html"
|
||||
|
||||
#
|
||||
with open(fname, 'w') as f:
|
||||
html = render_template('index.html', context)
|
||||
f.write(html)
|
||||
|
||||
|
||||
def create_test_report_detailed_html(context, fname ):
|
||||
with open(fname, 'w') as f:
|
||||
html = render_template('testcase_report.html', context)
|
||||
f.write(html)
|
||||
|
||||
|
||||
def check_cell_synchro(fname):
|
||||
|
||||
with open(fname, 'r') as f:
|
||||
for line in f:
|
||||
|
||||
m = re.search('AUTOTEST Cell Sync \:', line)
|
||||
if m :
|
||||
#print line
|
||||
return 'CELL_SYNCH'
|
||||
|
||||
return 'CELL_NOT_SYNCH'
|
||||
|
||||
|
||||
def check_exec_seg_fault(fname):
|
||||
|
||||
with open(fname, 'r') as f:
|
||||
for line in f:
|
||||
m = re.search('Segmentation fault', line)
|
||||
if m :
|
||||
#print line
|
||||
return 'SEG_FAULT'
|
||||
|
||||
return 'NO_SEG_FAULT'
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#$1 programs to be killed and checked
|
||||
echo "removing old programs..."
|
||||
echo "args = $1"
|
||||
echo "script name = $0"
|
||||
filename=$(basename "$0")
|
||||
echo "filename = $filename"
|
||||
echo "programs to be killed...$1"
|
||||
|
||||
echo "bash PID = $$"
|
||||
pid="$$"
|
||||
echo "pid = $pid"
|
||||
|
||||
echo "Killing programs now..."
|
||||
|
||||
ps -aux |grep -E -i -w "$1"
|
||||
|
||||
var=`ps -aux |grep -E -i -w "$1" |awk '{print $2}'| tr '\n' ' ' | sed "s/$pid/ /"`
|
||||
echo "Killing processes...$var"
|
||||
#var=`ps -aux |grep -E -i '$1' |awk '{print $2}'| tr '\n' ' ' | sed "s/$pid/ /"`
|
||||
#echo $var
|
||||
if [ -n "$var" ] ; then sudo kill -9 $var ; fi
|
||||
|
||||
#| sudo xargs kill -9
|
||||
|
||||
echo "checking for old programs..."
|
||||
var=`ps -aux |grep -E -i -w '$1' |grep -Ev 'grep' | grep -Ev '$filename'`
|
||||
|
||||
echo $var
|
||||
if [ -n "$var" ]; then echo 'Match found'; else echo 'Match not found' ;fi
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
#!/bin/bash
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
|
||||
#arg0 -> Name of executable
|
||||
#args[1...N] -> arguments to be passed to executable
|
||||
if [ -z "$OPENAIR_DIR" ]
|
||||
then
|
||||
echo "OPENAIR_DIR environment not set. Exiting.."
|
||||
exit
|
||||
fi
|
||||
|
||||
source $OPENAIR_DIR/cmake_targets/tools/build_helper
|
||||
|
||||
args=($*)
|
||||
exec_name=${args[0]}
|
||||
exe_args=(${args[@]:1})
|
||||
gdb_file=$OPENAIR_DIR/targets/bin/gdb_file
|
||||
gdb_log=$OPENAIR_DIR/targets/bin/gdb_log.bt
|
||||
|
||||
echo "args = ${args[@]}"
|
||||
echo "exec_name = $exec_name"
|
||||
echo "exe_args = ${exe_args[@]}"
|
||||
echo "gdb log file = $gdb_log"
|
||||
|
||||
$SUDO rm -fr $gdb_file $gdb_log
|
||||
$SUDO touch $gdb_file $gdb_log
|
||||
$SUDO chmod 777 $gdb_file $gdb_log
|
||||
|
||||
$SUDO echo "file $exec_name" >> $gdb_file
|
||||
$SUDO echo "set args ${exe_args[@]}" >> $gdb_file
|
||||
$SUDO echo "run" >> $gdb_file
|
||||
$SUDO echo "set logging overwrite on" >> $gdb_file
|
||||
$SUDO echo "set logging file $gdb_log" >> $gdb_file
|
||||
$SUDO echo "set logging on" >> $gdb_file
|
||||
$SUDO echo "set pagination off" >> $gdb_file
|
||||
$SUDO echo "handle SIG33 pass nostop noprint" >> $gdb_file
|
||||
$SUDO echo "echo backtrace:\n" >> $gdb_file
|
||||
$SUDO echo "backtrace full" >> $gdb_file
|
||||
$SUDO echo "echo \n\nVariables:\n" >> $gdb_file
|
||||
$SUDO echo "info variables" >> $gdb_file
|
||||
$SUDO echo "echo \n\nlocals:\n" >> $gdb_file
|
||||
$SUDO echo "info locals" >> $gdb_file
|
||||
$SUDO echo "echo \n\nregisters:\n" >> $gdb_file
|
||||
$SUDO echo "info registers" >> $gdb_file
|
||||
$SUDO echo "echo \n\ncurrent instructions:\n" >> $gdb_file
|
||||
$SUDO echo "x/16i \$pc" >> $gdb_file
|
||||
$SUDO echo "echo \n\nthreads backtrace:\n" >> $gdb_file
|
||||
$SUDO echo "thread apply all backtrace" >> $gdb_file
|
||||
$SUDO echo "set logging off" >> $gdb_file
|
||||
$SUDO echo "quit" >> $gdb_file
|
||||
|
||||
echo "Contents of gdb_file...start"
|
||||
$SUDO cat $gdb_file
|
||||
echo "Contents of gdb_file...finish"
|
||||
|
||||
$SUDO gdb -n -x $gdb_file 2>&1
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \author Navid Nikaein, Rohit Gupta
|
||||
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
|
||||
#Arg 1 name of file
|
||||
#Arg 2 keyword
|
||||
#arg 3 replacement text
|
||||
#Note that these should be seperated by spaces
|
||||
if len(sys.argv) != 4:
|
||||
print "search_repl.py: Wrong number of arguments. This program needs 3 arguments. The number of arguments supplied : " + str(sys.argv)
|
||||
sys.exit()
|
||||
filename = os.path.expandvars(sys.argv[1])
|
||||
keyword = sys.argv[2]
|
||||
replacement_text = sys.argv[3]
|
||||
|
||||
|
||||
file = open(filename, 'r')
|
||||
string = file.read()
|
||||
file.close()
|
||||
|
||||
|
||||
if keyword == 'mme_ip_address':
|
||||
replacement_text = keyword + ' = ( { ' + replacement_text + ' } ) ; '
|
||||
string = re.sub(r"mme_ip_address\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M)
|
||||
elif keyword == 'IPV4_LIST' or keyword=='GUMMEI_LIST' or keyword == 'TAI_LIST':
|
||||
replacement_text = keyword + ' = ( ' + replacement_text + ' ) ; '
|
||||
string = re.sub(r"%s\s*=\s*\(([^\$]+?)\)\s*;" % keyword, replacement_text, string, re.M)
|
||||
elif keyword == 'rrh_gw_config':
|
||||
replacement_text = keyword + ' = ( { ' + replacement_text + ' } ) ; '
|
||||
string = re.sub(r"rrh_gw_config\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M)
|
||||
else :
|
||||
replacement_text = keyword + ' = ' + replacement_text + ' ; '
|
||||
string = re.sub(r"%s\s*=\s*([^\$]+?)\s*;" % keyword , replacement_text, string, re.M)
|
||||
#else :
|
||||
# replacement_text = keyword + ' =\"' + replacement_text + '\" ; '
|
||||
# string = re.sub(r"%s\s*=\s*\"([^\$]+?)\"\s*;" % keyword , replacement_text, string, re.M)
|
||||
|
||||
file = open(filename, 'w')
|
||||
file.write(string)
|
||||
file.close()
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
[Dialer Defaults]
|
||||
Modem = /dev/ttyUSB0
|
||||
ISDN = off
|
||||
Modem Type = Analog Modem
|
||||
Baud = 9600
|
||||
Init = ATZ
|
||||
Init2 = AT+CPIN?
|
||||
Init3 = AT+CGREG?
|
||||
Init4 = AT+COPS?
|
||||
Init5 = AT+CSQ
|
||||
Init6 =
|
||||
Init7 = AT+CGATT=1
|
||||
Init8 =
|
||||
Init9 =
|
||||
Phone = *99***1#
|
||||
Phone1 =
|
||||
Phone2 =
|
||||
Phone3 =
|
||||
Phone4 =
|
||||
Dial Prefix =
|
||||
Dial Attempts = 1
|
||||
Dial Command = ATM1L3DT
|
||||
Ask Password = off
|
||||
Password = ''
|
||||
Username = ImaginLab
|
||||
Auto Reconnect = off
|
||||
Abort on Busy = off
|
||||
Carrier Check = on
|
||||
Check Def Route = on
|
||||
Abort on No Dialtone = on
|
||||
Stupid Mode = on
|
||||
Idle Seconds = 0
|
||||
Auto DNS = on
|
||||
;Minimize = off
|
||||
;Dock = off
|
||||
;Do NOT edit this file by hand!
|
||||
@@ -1,13 +0,0 @@
|
||||
When running lsusb, if you have:
|
||||
|
||||
Bus 001 Device 002: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)
|
||||
|
||||
You need to run:
|
||||
|
||||
usb_modeswitch -v 12d1 -p 14fe -M '55534243123456780000000000000011062000000100000000000000000000'
|
||||
|
||||
After what, running lsusb should give:
|
||||
|
||||
Bus 001 Device 004: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
|
||||
|
||||
Values of 'Bus' and 'Device' may differ of course.
|
||||
@@ -1,2 +0,0 @@
|
||||
sudo /opt/ltebox/tools/stop_ltebox || true
|
||||
sudo /opt/ltebox/tools/start_ltebox
|
||||
@@ -1 +0,0 @@
|
||||
sudo /opt/ltebox/tools/stop_ltebox
|
||||
@@ -1,5 +0,0 @@
|
||||
sudo rmmod nasmesh || true
|
||||
sudo rmmod ue_ip || true
|
||||
sudo /opt/ltebox/tools/stop_ltebox || true
|
||||
sudo killall -9 hss_sim || true
|
||||
sudo /opt/hss_sim0609/starthss_real
|
||||
@@ -1,146 +0,0 @@
|
||||
The configuration for the bandrich in the test setup is a bit hackish.
|
||||
|
||||
Here come some notes explaining what we do here.
|
||||
|
||||
To get /dev/bandrich.data and /dev/bandrich.control (so that you don't need
|
||||
to look for which /dev/ttyUSBx are used by your dongle, and always use
|
||||
the same files, no matter what), add a udev file:
|
||||
|
||||
/etc/udev/rules.d/bandrich.rules
|
||||
|
||||
containing lines:
|
||||
|
||||
SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="1a8d", ENV{ID_MODEL_ID}=="100d", ENV{ID_SERIAL_SHORT}=="357473040068155", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="bandrich.data", MODE="0666"
|
||||
SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="1a8d", ENV{ID_MODEL_ID}=="100d", ENV{ID_SERIAL_SHORT}=="357473040068155", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="bandrich.control", MODE="0666"
|
||||
|
||||
To avoid NetworkManager to play with the bandrich, add also the line:
|
||||
|
||||
ENV{ID_VENDOR_ID}=="1a8d", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
|
||||
Maybe also add; , ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
to the two other lines.
|
||||
|
||||
Then run: udevadm control --reload-rules
|
||||
And: service network-manager restart
|
||||
|
||||
Change vendor_id/model_id/serial/interface num to match yours.
|
||||
Use lsusb -v to find values.
|
||||
|
||||
At first we used /dev/ttyUSB2 linked to /dev/bandrich for both data (in
|
||||
the wvdial configuration file) and control (in the python code, opening
|
||||
/dev/bandrich the standard unix way and read and write into it, with no
|
||||
special libusb commands).
|
||||
|
||||
But it turned out that using /dev/ttyUSB2 for data gives bad throughput
|
||||
results. We tested downlink UDP at 15Mb/s but the maximum throughput for
|
||||
a 5MHz cell was around 13, and we had a lot of packets lost at the iperf's
|
||||
UDP level. Radio was looking fine (all packets acked correctly), so it was
|
||||
not a radio problem. The dongle in a windows machine was working fine,
|
||||
15Mbs/s. Using the wvdial configuration file from test setup v1 gave also
|
||||
good results. The only difference was the use of /dev/ttyUSB0 instead of
|
||||
/dev/ttyUSB2. Using /dev/ttyUSB0 solved the throughput issue.
|
||||
|
||||
But using /dev/ttyUSB0 for control in the pyton code did not work. The
|
||||
output was incorrect.
|
||||
|
||||
So we decided to have /dev/bandrich.data linked to /dev/ttyUSB0 for data
|
||||
(wvdial) and /dev/bandrich.control linked to /dev/ttyUSB2 for control
|
||||
(in python code).
|
||||
|
||||
It may not be the correct way to go, but it seems to do the trick so far.
|
||||
|
||||
Your device may need some other solution.
|
||||
|
||||
Here, we get, as result of lsusb -v:
|
||||
|
||||
[SNIP]
|
||||
Bus 003 Device 009: ID 1a8d:100d BandRich, Inc. 4G LTE adapter
|
||||
Device Descriptor:
|
||||
bLength 18
|
||||
bDescriptorType 1
|
||||
bcdUSB 2.00
|
||||
bDeviceClass 0 (Defined at Interface level)
|
||||
bDeviceSubClass 0
|
||||
bDeviceProtocol 0
|
||||
bMaxPacketSize0 64
|
||||
idVendor 0x1a8d BandRich, Inc.
|
||||
idProduct 0x100d 4G LTE adapter
|
||||
bcdDevice 0.00
|
||||
iManufacturer 10 BandRich, Inc.
|
||||
iProduct 9 BandLuxe HSPA-LTE Adapter
|
||||
iSerial 11 357473040068155
|
||||
[SNIP]
|
||||
|
||||
You can also run:
|
||||
|
||||
udevadm monitor
|
||||
|
||||
and unplug/replug the dongle. It will print some information.
|
||||
|
||||
The command:
|
||||
|
||||
udevadm info --export-db
|
||||
|
||||
is also important to get the right identifier to put in ENV{}. (It also
|
||||
gives the correct value.)
|
||||
|
||||
Here is extracted what we have for our dongle:
|
||||
|
||||
P: /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.2/ttyUSB2/tty/ttyUSB2
|
||||
N: ttyUSB2
|
||||
S: bandrich
|
||||
S: serial/by-id/usb-BandRich__Inc._BandLuxe_HSPA-LTE_Adapter_357473040068155-if02-port0
|
||||
S: serial/by-path/pci-0000:00:1a.0-usb-0:1.2:1.2-port0
|
||||
E: DEVLINKS=/dev/bandrich /dev/serial/by-id/usb-BandRich__Inc._BandLuxe_HSPA-LTE_Adapter_357473040068155-if02-port0 /dev/serial/by-path/pci-0000:00:1a.0-usb-0:1.2:1.2-port0
|
||||
E: DEVNAME=/dev/ttyUSB2
|
||||
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.2/ttyUSB2/tty/ttyUSB2
|
||||
E: ID_BUS=usb
|
||||
E: ID_MM_CANDIDATE=1
|
||||
E: ID_MODEL=BandLuxe_HSPA-LTE_Adapter
|
||||
E: ID_MODEL_ENC=BandLuxe\x20HSPA-LTE\x20Adapter
|
||||
E: ID_MODEL_FROM_DATABASE=4G LTE adapter
|
||||
E: ID_MODEL_ID=100d
|
||||
E: ID_PATH=pci-0000:00:1a.0-usb-0:1.2:1.2
|
||||
E: ID_PATH_TAG=pci-0000_00_1a_0-usb-0_1_2_1_2
|
||||
E: ID_REVISION=0000
|
||||
E: ID_SERIAL=BandRich__Inc._BandLuxe_HSPA-LTE_Adapter_357473040068155
|
||||
E: ID_SERIAL_SHORT=357473040068155
|
||||
E: ID_TYPE=generic
|
||||
E: ID_USB_DRIVER=option
|
||||
E: ID_USB_INTERFACES=:ffffff:020600:0a0000:080650:
|
||||
E: ID_USB_INTERFACE_NUM=02
|
||||
E: ID_VENDOR=BandRich__Inc.
|
||||
E: ID_VENDOR_ENC=BandRich\x2c\x20Inc.
|
||||
E: ID_VENDOR_FROM_DATABASE=BandRich, Inc.
|
||||
E: ID_VENDOR_ID=1a8d
|
||||
E: MAJOR=188
|
||||
E: MINOR=2
|
||||
E: SUBSYSTEM=tty
|
||||
E: USEC_INITIALIZED=672068596
|
||||
|
||||
You can also run:
|
||||
|
||||
udevadm info -a -p /sys/bus/usb-serial/devices/ttyUSB0
|
||||
udevadm info -a -p /sys/bus/usb-serial/devices/ttyUSB2
|
||||
|
||||
Note: after creating the udev files, you need to unplug/replug your
|
||||
dongle for /dev/bandrich.data and /dev/bandrich.control to appear.
|
||||
|
||||
Note: the mode 0666 is for everyone to access the dongle (no need for
|
||||
root privileges). If you prefer you can set it to 0600 (only root)
|
||||
or 0660 (root and group).
|
||||
|
||||
Then you need to configure pppd, to get correct 'route' information when
|
||||
you run wvdial.
|
||||
|
||||
The file /etc/ppp/peers/wvdial should have the following content:
|
||||
|
||||
noauth
|
||||
name wvdial
|
||||
usepeerdns
|
||||
defaultroute
|
||||
replacedefaultroute
|
||||
|
||||
The file wvdial.bandrich.conf has been created by copying some information
|
||||
found on the Internet. Its content may not be fully correct. Adapt to your
|
||||
situation. It seems to work here.
|
||||
@@ -1,2 +0,0 @@
|
||||
echo $SERVER_IP
|
||||
timeout -s 9 20s iperf -c $SERVER_IP -i1
|
||||
@@ -1,3 +0,0 @@
|
||||
echo $SERVER_IP
|
||||
echo $UDP_BANDWIDTH
|
||||
timeout -s 9 20s iperf -c $SERVER_IP -i1 -u -b $UDP_BANDWIDTH
|
||||
@@ -1,6 +0,0 @@
|
||||
sudo rm -rf /tmp/oai_test_setup
|
||||
mkdir /tmp/oai_test_setup
|
||||
cd /tmp/oai_test_setup
|
||||
git clone $REPOSITORY_URL oai
|
||||
cd oai
|
||||
git checkout $COMMIT_ID
|
||||
@@ -1,9 +0,0 @@
|
||||
cd /tmp/oai_test_setup/oai
|
||||
source oaienv
|
||||
cd cmake_targets
|
||||
rm -rf log
|
||||
mkdir -p log
|
||||
echo $BUILD_ARGUMENTS
|
||||
./build_oai $BUILD_ARGUMENTS
|
||||
echo $BUILD_OUTPUT
|
||||
ls $BUILD_OUTPUT
|
||||
@@ -1,4 +0,0 @@
|
||||
cd /tmp/oai_test_setup/oai
|
||||
source oaienv
|
||||
echo $EXEC $EXEC_ARGS
|
||||
$EXEC $EXEC_ARGS
|
||||
@@ -1,13 +0,0 @@
|
||||
cd /tmp/oai_test_setup/oai
|
||||
source oaienv
|
||||
sudo rmmod nasmesh || true
|
||||
sudo rmmod ue_ip || true
|
||||
cd cmake_targets
|
||||
rm -rf log
|
||||
mkdir -p log
|
||||
echo $PRE_BUILD
|
||||
bash -c "$PRE_BUILD"
|
||||
echo $BUILD_PROG $BUILD_ARGUMENTS
|
||||
$BUILD_PROG $BUILD_ARGUMENTS
|
||||
echo $PRE_EXEC
|
||||
bash -c "$PRE_EXEC"
|
||||
@@ -1,103 +0,0 @@
|
||||
import sys, os, select, re, time
|
||||
|
||||
def quit(r):
|
||||
sys.stdout.flush()
|
||||
os._exit(r)
|
||||
|
||||
class ModemResponse:
|
||||
def __init__(self, retcode, retstring):
|
||||
self.ret = retcode
|
||||
self.data = retstring
|
||||
|
||||
class Modem:
|
||||
def open(self):
|
||||
self.i = os.open(self.devname, os.O_RDONLY)
|
||||
self.o = os.open(self.devname, os.O_WRONLY)
|
||||
#clear output of modem, if any is pending (not sure of this)
|
||||
while True:
|
||||
(ri, ro, re) = select.select([self.i], [], [self.i], 0)
|
||||
if len(ri) == 0:
|
||||
break
|
||||
l = os.read(self.i, 65536)
|
||||
print "WARNING: modem had unread data: '" + \
|
||||
l.replace('\r', '\\r') + "'"
|
||||
|
||||
def __init__(self, devname):
|
||||
self.devname = devname
|
||||
self.i = -1
|
||||
self.o = -1
|
||||
self.open()
|
||||
|
||||
def send(self, s):
|
||||
print "DEBUG: SEND TO MODEM: '" + s + "'"
|
||||
os.write(self.o, s+"\r")
|
||||
|
||||
def recv(self):
|
||||
return os.read(self.i, 65536)
|
||||
|
||||
def wait(self):
|
||||
ok = '\r\nOK\r\n'
|
||||
error = '\r\nERROR\r\n'
|
||||
cme_error = '\r\nCME ERROR:[^\r]*\r\n'
|
||||
no_carrier = '\r\nNO CARRIER\r\n'
|
||||
l = ''
|
||||
while True:
|
||||
l = l + self.recv()
|
||||
print "DEBUG: CURRENT MODEM RESPONSE: '" + \
|
||||
l.replace('\r','\\r').replace('\n','\\n') + "'"
|
||||
|
||||
#AT returned 'things' are "\r\nXXXX\r\n", look for that.
|
||||
#Check if last one matches 'ok', 'error' or 'cme_error'.
|
||||
#(Hopefully this is enough and no other reply is possible.)
|
||||
#This code accepts invalid responses from modem, ie. all
|
||||
#that does not fit in the 'findall' is thrashed away, maybe
|
||||
#we want to do something in this case?
|
||||
|
||||
res = re.findall('\r\n[^\r]*\r\n', l)
|
||||
if len(res) == 0:
|
||||
print "DEBUG: NO MATCH: wait for more input from modem"
|
||||
continue
|
||||
last_res = res[len(res)-1]
|
||||
print "DEBUG: CURRENT LAST LINE: '" + \
|
||||
last_res.replace('\r','\\r').replace('\n','\\n')+"'"
|
||||
if re.match(ok, last_res) != None:
|
||||
return ModemResponse(True, l)
|
||||
if ( re.match(error, last_res) != None or
|
||||
re.match(cme_error, last_res) != None or
|
||||
re.match(no_carrier, last_res) != None):
|
||||
return ModemResponse(False, l)
|
||||
#TODO purge?
|
||||
#re.purge()
|
||||
|
||||
def modem_reset_cycle(self):
|
||||
#close all
|
||||
os.close(self.i)
|
||||
os.close(self.o)
|
||||
self.i = -1
|
||||
self.o = -1
|
||||
|
||||
print "DEBUG: RESET CYCLE: wait for modem to go away"
|
||||
#wait for file descriptor to go away
|
||||
while True:
|
||||
try:
|
||||
test = os.open(self.devname, os.O_RDONLY)
|
||||
os.close(test)
|
||||
time.sleep(0.1)
|
||||
except BaseException, e:
|
||||
break
|
||||
print "DEBUG: RESET CYCLE: modem has gone away"
|
||||
|
||||
print "DEBUG: RESET CYCLE: wait for modem to come back"
|
||||
#wait for file descriptor to be back, try to open it over and over
|
||||
#TODO: use inotify here? (it's not in basic python as it seems)
|
||||
while True:
|
||||
try:
|
||||
test = os.open(self.devname, os.O_RDONLY)
|
||||
os.close(test)
|
||||
break
|
||||
except BaseException, e:
|
||||
time.sleep(0.1)
|
||||
print "DEBUG: RESET CYCLE: modem is back"
|
||||
|
||||
#back to business
|
||||
self.open()
|
||||
@@ -1,12 +0,0 @@
|
||||
#enable control+C reception (to be refined if it does not work)
|
||||
stty isig intr ^C
|
||||
|
||||
cd /tmp/oai_test_setup/oai
|
||||
source oaienv
|
||||
sudo rmmod nasmesh || true
|
||||
sudo rmmod ue_ip || true
|
||||
cd cmake_targets/ran_build/build
|
||||
ulimit -c unlimited
|
||||
sudo rm -f core
|
||||
#sudo -E ./lte-softmodem -O $OPENAIR_DIR/cmake_targets/autotests/v2/config/enb.band7.tm1.usrpb210.conf
|
||||
sudo -E ./lte-softmodem -O /tmp/enb.conf
|
||||
@@ -1,4 +0,0 @@
|
||||
stty isig intr ^C
|
||||
|
||||
#timeout -s 9 20s iperf -s -i1
|
||||
iperf -s -i1
|
||||
@@ -1,4 +0,0 @@
|
||||
stty isig intr ^C
|
||||
|
||||
#timeout -s 9 20s iperf -s -i1 -u
|
||||
iperf -s -i1 -u
|
||||
@@ -1,13 +0,0 @@
|
||||
#enable control+C reception (to be refined if it does not work)
|
||||
stty isig intr ^C
|
||||
|
||||
cd /tmp/oai_test_setup/oai
|
||||
source oaienv
|
||||
sudo rmmod nasmesh || true
|
||||
sudo rmmod ue_ip || true
|
||||
cd cmake_targets/autotests/v2/actions
|
||||
sudo python start_3276.py
|
||||
|
||||
sudo wvdial -C wvdial.3276.conf || true
|
||||
|
||||
sudo python stop_3276.py
|
||||
@@ -1,59 +0,0 @@
|
||||
import time
|
||||
|
||||
from modem import quit, Modem
|
||||
|
||||
try:
|
||||
modem = Modem("/dev/ttyUSB0")
|
||||
|
||||
#test that modem is there
|
||||
print "INFO: check modem's presence"
|
||||
modem.send('AT')
|
||||
if modem.wait().ret != True:
|
||||
print "ERROR: no modem?"
|
||||
quit(1)
|
||||
|
||||
#first deactivate
|
||||
print "INFO: deactivate the modem"
|
||||
modem.send('AT+CFUN=0')
|
||||
if modem.wait().ret != True:
|
||||
print "ERROR: failed deactivating the modem"
|
||||
quit(1)
|
||||
|
||||
#activate the modem
|
||||
print "INFO: activate the modem"
|
||||
modem.send('AT+CFUN=1')
|
||||
if modem.wait().ret != True:
|
||||
print "ERROR: failed asking modem for activation"
|
||||
quit(1)
|
||||
|
||||
#wait for modem to be connected
|
||||
#timeout after one minute
|
||||
print "INFO: wait for modem to be connected (timeout: one minute)"
|
||||
start_time = time.time()
|
||||
while True:
|
||||
modem.send('AT+CGATT?')
|
||||
r = modem.wait()
|
||||
if r.ret != True:
|
||||
print "ERROR: failed checking attachment status of modem"
|
||||
quit(1)
|
||||
if "+CGATT: 1" in r.data:
|
||||
break
|
||||
if not "CGATT: 0" in r.data:
|
||||
print "ERROR: bad data when checking attachment status of modem"
|
||||
quit(1)
|
||||
time.sleep(0.1)
|
||||
if time.time() > start_time + 60:
|
||||
print "ERROR: modem not connected after one minute, close modem"
|
||||
modem.send('AT+CFUN=0')
|
||||
r = modem.wait()
|
||||
if r.ret != True:
|
||||
print "ERROR: closing modem failed"
|
||||
quit(1)
|
||||
|
||||
print "INFO: modem is connected"
|
||||
|
||||
except BaseException, e:
|
||||
print "ERROR: " + str(e)
|
||||
quit(1)
|
||||
|
||||
quit(0)
|
||||
@@ -1,26 +0,0 @@
|
||||
#enable control+C reception (to be refined if it does not work)
|
||||
stty isig intr ^C
|
||||
|
||||
#If /dev/bandrich is not present when we start the test, what to do?
|
||||
#The following commented lines are an attempt at solving this.
|
||||
#This is not satisfying, so we rather do nothing.
|
||||
|
||||
##the UE got stuck once, I had to run usb_modeswitch by hand.
|
||||
##So at this point, if /dev/bandrich does not exist, maybe the UE is
|
||||
##stuck for whatever reason. Let's forcefully run usb_modeswitch.
|
||||
#if [ ! -e /dev/bandrich ]; then sudo usb_modeswitch -v 1a8d -p 1000 -I -W -K; true; fi
|
||||
#
|
||||
##wait for /dev/bandrich (TODO: use inotify?)
|
||||
##may fail if the bandrich is in a bad state
|
||||
#while [ ! -e /dev/bandrich ]; do sleep 1; done
|
||||
|
||||
cd /tmp/oai_test_setup/oai
|
||||
source oaienv
|
||||
sudo rmmod nasmesh || true
|
||||
sudo rmmod ue_ip || true
|
||||
cd cmake_targets/autotests/v2/actions
|
||||
python start_bandrich.py
|
||||
|
||||
sudo wvdial -C wvdial.bandrich.conf || true
|
||||
|
||||
python stop_bandrich.py
|
||||
@@ -1,55 +0,0 @@
|
||||
import time
|
||||
|
||||
from modem import quit, Modem
|
||||
|
||||
try:
|
||||
modem = Modem("/dev/bandrich.control")
|
||||
|
||||
#test that modem is there
|
||||
print "INFO: check modem's presence"
|
||||
modem.send('AT')
|
||||
if modem.wait().ret != True:
|
||||
print "ERROR: no modem?"
|
||||
quit(1)
|
||||
|
||||
#activate the modem, be brutal and reset it too!
|
||||
print "INFO: reset and activate the modem"
|
||||
modem.send('AT+CFUN=1,1')
|
||||
if modem.wait().ret != True:
|
||||
print "ERROR: failed asking modem for activation"
|
||||
quit(1)
|
||||
|
||||
#modem has gone! wait for it to pop up again
|
||||
modem.modem_reset_cycle()
|
||||
|
||||
#wait for modem to be connected
|
||||
#timeout after one minute
|
||||
print "INFO: wait for modem to be connected (timeout: one minute)"
|
||||
start_time = time.time()
|
||||
while True:
|
||||
modem.send('AT+CGATT?')
|
||||
r = modem.wait()
|
||||
if r.ret != True:
|
||||
print "ERROR: failed checking attachment status of modem"
|
||||
quit(1)
|
||||
if "+CGATT: 1" in r.data:
|
||||
break
|
||||
if not "CGATT: 0" in r.data:
|
||||
print "ERROR: bad data when checking attachment status of modem"
|
||||
quit(1)
|
||||
time.sleep(0.1)
|
||||
if time.time() > start_time + 60:
|
||||
print "ERROR: modem not connected after one minute, close modem"
|
||||
modem.send('AT+CFUN=4')
|
||||
r = modem.wait()
|
||||
if r.ret != True:
|
||||
print "ERROR: closing modem failed"
|
||||
quit(1)
|
||||
|
||||
print "INFO: modem is connected"
|
||||
|
||||
except BaseException, e:
|
||||
print "ERROR: " + str(e)
|
||||
quit(1)
|
||||
|
||||
quit(0)
|
||||
@@ -1,29 +0,0 @@
|
||||
import time
|
||||
|
||||
from modem import quit, Modem
|
||||
|
||||
try:
|
||||
modem = Modem("/dev/ttyUSB0")
|
||||
|
||||
#test that modem is there
|
||||
print "INFO: check modem's presence"
|
||||
modem.send('AT')
|
||||
r = modem.wait()
|
||||
if r.ret != True and "NO CARRIER" not in r.data:
|
||||
print "ERROR: no modem?"
|
||||
quit(1)
|
||||
if "NO CARRIER" in r.data:
|
||||
print "WARNING: 'NO CARRIER' detected, not sure if handled correctly"
|
||||
|
||||
#deactivate the modem
|
||||
print "INFO: deactivate the modem"
|
||||
modem.send('AT+CFUN=0')
|
||||
if modem.wait().ret != True:
|
||||
print "ERROR: failed asking modem for deactivation"
|
||||
quit(1)
|
||||
|
||||
except BaseException, e:
|
||||
print "ERROR: " + str(e)
|
||||
quit(1)
|
||||
|
||||
quit(0)
|
||||
@@ -1,29 +0,0 @@
|
||||
import time
|
||||
|
||||
from modem import quit, Modem
|
||||
|
||||
try:
|
||||
modem = Modem("/dev/bandrich.control")
|
||||
|
||||
#test that modem is there
|
||||
print "INFO: check modem's presence"
|
||||
modem.send('AT')
|
||||
r = modem.wait()
|
||||
if r.ret != True and "NO CARRIER" not in r.data:
|
||||
print "ERROR: no modem?"
|
||||
quit(1)
|
||||
if "NO CARRIER" in r.data:
|
||||
print "WARNING: 'NO CARRIER' detected, not sure if handled correctly"
|
||||
|
||||
#deactivate the modem
|
||||
print "INFO: deactivate the modem"
|
||||
modem.send('AT+CFUN=4')
|
||||
if modem.wait().ret != True:
|
||||
print "ERROR: failed asking modem for deactivation"
|
||||
quit(1)
|
||||
|
||||
except BaseException, e:
|
||||
print "ERROR: " + str(e)
|
||||
quit(1)
|
||||
|
||||
quit(0)
|
||||
@@ -1,27 +0,0 @@
|
||||
[Dialer Defaults]
|
||||
Modem = /dev/ttyUSB0
|
||||
ISDN = off
|
||||
Modem Type = Analog Modem
|
||||
Baud = 9600
|
||||
Init1 = ATZ
|
||||
Init2 = AT&F &D2 &C1
|
||||
Init3 = AT+CGDCONT=1,"IP","oai.ipv4"
|
||||
Phone = *99#
|
||||
Phone1 =
|
||||
Phone2 =
|
||||
Phone3 =
|
||||
Phone4 =
|
||||
Ask Password = off
|
||||
Password = ''
|
||||
Username = ImaginLab
|
||||
Auto Reconnect = off
|
||||
Abort on Busy = off
|
||||
Carrier Check = on
|
||||
Check Def Route = on
|
||||
Abort on No Dialtone = on
|
||||
Stupid Mode = on
|
||||
Idle Seconds = 0
|
||||
Auto DNS = on
|
||||
;Minimize = off
|
||||
;Dock = off
|
||||
;Do NOT edit this file by hand!
|
||||
@@ -1,36 +0,0 @@
|
||||
[Dialer Defaults]
|
||||
Modem = /dev/bandrich.data
|
||||
ISDN = off
|
||||
Modem Type = Analog Modem
|
||||
Baud = 9600
|
||||
Init = ATZ
|
||||
Init2 = AT+CPIN?
|
||||
Init3 = AT+CGREG?
|
||||
Init4 = AT+COPS?
|
||||
Init5 = AT+CSQ
|
||||
Init6 =
|
||||
Init7 = AT+CGATT=1
|
||||
Init8 =
|
||||
Init9 =
|
||||
Phone = *99***1#
|
||||
Phone1 =
|
||||
Phone2 =
|
||||
Phone3 =
|
||||
Phone4 =
|
||||
Dial Prefix =
|
||||
Dial Attempts = 1
|
||||
Dial Command = ATM1L3DT
|
||||
Ask Password = off
|
||||
Password = ''
|
||||
Username = ImaginLab
|
||||
Auto Reconnect = off
|
||||
Abort on Busy = off
|
||||
Carrier Check = on
|
||||
Check Def Route = on
|
||||
Abort on No Dialtone = on
|
||||
Stupid Mode = on
|
||||
Idle Seconds = 0
|
||||
Auto DNS = on
|
||||
;Minimize = off
|
||||
;Dock = off
|
||||
;Do NOT edit this file by hand!
|
||||
@@ -1,551 +0,0 @@
|
||||
import threading, os, re
|
||||
|
||||
from utils import quickshell, log, TestFailed, do_tests
|
||||
from task import Task, WAITLOG_SUCCESS
|
||||
|
||||
class alu_test:
|
||||
def __init__(self,
|
||||
epc, enb, ue,
|
||||
openair,
|
||||
user, password,
|
||||
log_subdir,
|
||||
env,
|
||||
enb_rru = "",
|
||||
enb_rcc = ""):
|
||||
self.epc_machine = epc
|
||||
self.enb_machine = enb
|
||||
self.ue_machine = ue
|
||||
self.openair_dir = openair
|
||||
self.oai_user = user
|
||||
self.oai_password = password
|
||||
self.env = env
|
||||
self.enb_rru_machine = enb_rru
|
||||
self.enb_rcc_machine = enb_rcc
|
||||
|
||||
self.task_hss = None
|
||||
self.task_enb = None
|
||||
self.task_ue = None
|
||||
self.task_rru_enb = None
|
||||
self.task_rcc_enb = None
|
||||
|
||||
self.logdir = openair + '/cmake_targets/autotests/log/' + log_subdir
|
||||
quickshell('mkdir -p ' + self.logdir)
|
||||
|
||||
#event object used to wait for several tasks at once
|
||||
self.event = threading.Event()
|
||||
|
||||
##########################################################################
|
||||
# finish
|
||||
##########################################################################
|
||||
def finish(self):
|
||||
#brutally kill tasks still running
|
||||
#TODO: call 'wait', some processes may still be there as zombies
|
||||
if self.task_hss != None and self.task_hss.alive():
|
||||
self.task_hss.kill()
|
||||
if self.task_enb != None and self.task_enb.alive():
|
||||
self.task_enb.kill()
|
||||
if self.task_ue != None and self.task_ue.alive():
|
||||
self.task_ue.kill()
|
||||
if self.task_rru_enb != None and self.task_rru_enb.alive():
|
||||
self.task_rru_enb.kill()
|
||||
if self.task_rcc_enb != None and self.task_rcc_enb.alive():
|
||||
self.task_rcc_enb.kill()
|
||||
|
||||
##########################################################################
|
||||
# start_epc
|
||||
##########################################################################
|
||||
def start_epc(self):
|
||||
#launch HSS, wait for prompt
|
||||
log("INFO: ALU test: run HSS")
|
||||
self.task_hss = Task("actions/alu_hss.bash",
|
||||
"alu_hss",
|
||||
self.epc_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
self.env,
|
||||
self.logdir + "/alu_hss." + self.epc_machine,
|
||||
event=self.event)
|
||||
self.task_hss.waitlog('S6AS_SIM-> ')
|
||||
|
||||
#then launch EPC, wait for connection on HSS side
|
||||
log("INFO: ALU test: run EPC")
|
||||
task_epc = Task("actions/alu_epc.bash",
|
||||
"ALU EPC",
|
||||
self.epc_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
self.env,
|
||||
self.logdir + "/alu_epc." + self.epc_machine)
|
||||
ret = task_epc.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: EPC start failure");
|
||||
raise TestFailed()
|
||||
self.task_hss.waitlog('Connected\n')
|
||||
|
||||
##########################################################################
|
||||
# stop_epc
|
||||
##########################################################################
|
||||
def stop_epc(self):
|
||||
#stop EPC, wait for disconnection on HSS side
|
||||
log("INFO: ALU test: stop EPC")
|
||||
task_epc = Task("actions/alu_epc_stop.bash",
|
||||
"alu_epc_stop",
|
||||
self.epc_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
self.env,
|
||||
self.logdir + "/alu_epc_stop." + self.epc_machine)
|
||||
ret = task_epc.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: ALU test: ALU EPC stop failed")
|
||||
raise TestFailed()
|
||||
self.task_hss.waitlog('Disconnected\n')
|
||||
|
||||
log("INFO: ALU test: stop HSS")
|
||||
self.task_hss.sendnow("exit\n")
|
||||
ret = self.task_hss.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: ALU test: ALU HSS failed")
|
||||
raise TestFailed()
|
||||
|
||||
##########################################################################
|
||||
# compile_enb
|
||||
##########################################################################
|
||||
def compile_enb(self, build_arguments, log_suffix=""):
|
||||
log("INFO: ALU test: compile softmodem on " + self.enb_machine)
|
||||
envcomp = list(self.env)
|
||||
envcomp.append('BUILD_ARGUMENTS="' + build_arguments + '"')
|
||||
#we don't care about BUILD_OUTPUT but required (TODO: change that)
|
||||
envcomp.append('BUILD_OUTPUT=/')
|
||||
logdir = self.logdir + "/compile_log"
|
||||
remote_files = "'/tmp/oai_test_setup/oai/cmake_targets/log/*'"
|
||||
post_action = "mkdir -p "+ logdir + \
|
||||
" && sshpass -p " + self.oai_password + \
|
||||
" scp -r " + self.oai_user + \
|
||||
"@" + self.enb_machine + ":" + remote_files + " " + logdir + \
|
||||
" || true"
|
||||
task = Task("actions/compilation.bash",
|
||||
"compile_softmodem",
|
||||
self.enb_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
envcomp,
|
||||
self.logdir + "/compile_softmodem." + log_suffix + \
|
||||
self.enb_machine,
|
||||
post_action=post_action)
|
||||
ret = task.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: softmodem compilation failure");
|
||||
raise TestFailed()
|
||||
task.postaction()
|
||||
|
||||
##########################################################################
|
||||
# start_enb
|
||||
##########################################################################
|
||||
def start_enb(self, config_file):
|
||||
#copy wanted configuration file
|
||||
quickshell("sshpass -p " + self.oai_password +
|
||||
" scp config/" + config_file + " " +
|
||||
self.oai_user + "@" + self.enb_machine + ":/tmp/enb.conf")
|
||||
|
||||
#run softmodem
|
||||
log("INFO: ALU test: run softmodem with configuration file " +
|
||||
config_file)
|
||||
self.task_enb = Task("actions/run_enb.bash",
|
||||
"run_softmodem",
|
||||
self.enb_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
self.env,
|
||||
self.logdir + "/run_softmodem." + self.enb_machine,
|
||||
event=self.event)
|
||||
self.task_enb.waitlog('got sync')
|
||||
|
||||
##########################################################################
|
||||
# stop_enb
|
||||
##########################################################################
|
||||
def stop_enb(self):
|
||||
log("INFO: ALU test: stop softmodem")
|
||||
self.task_enb.sendnow("%c" % 3)
|
||||
ret = self.task_enb.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: ALU test: softmodem failed")
|
||||
#not sure if we have to quit here or not
|
||||
#os._exit(1)
|
||||
|
||||
##########################################################################
|
||||
# start_enb_rru_rcc
|
||||
##########################################################################
|
||||
def start_enb_rru_rcc(self, rru_config_file, rcc_config_file):
|
||||
#copy wanted configuration files
|
||||
quickshell("sshpass -p " + self.oai_password +
|
||||
" scp config/" + rru_config_file + " " +
|
||||
self.oai_user + "@" + self.enb_rru_machine+":/tmp/enb.conf")
|
||||
quickshell("sshpass -p " + self.oai_password +
|
||||
" scp config/" + rcc_config_file + " " +
|
||||
self.oai_user + "@" + self.enb_rcc_machine+":/tmp/enb.conf")
|
||||
|
||||
#run RRU/RCC softmodem
|
||||
log("INFO: ALU test: run RRU softmodem with configuration file " +
|
||||
rru_config_file)
|
||||
self.task_rru_enb = Task("actions/run_enb.bash",
|
||||
"run_RRU_softmodem",
|
||||
self.enb_rru_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
self.env,
|
||||
self.logdir + "/run_softmodem." + self.enb_rru_machine,
|
||||
event=self.event)
|
||||
self.task_rru_enb.waitlog('[RRH] binding to')
|
||||
log("INFO: ALU test: run RCC softmodem with configuration file " +
|
||||
rcc_config_file)
|
||||
self.task_rcc_enb = Task("actions/run_enb.bash",
|
||||
"run_RCC_softmodem",
|
||||
self.enb_rcc_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
self.env,
|
||||
self.logdir + "/run_softmodem." + self.enb_rcc_machine,
|
||||
event=self.event)
|
||||
self.task_rcc_enb.waitlog('[BBU] local ip addr')
|
||||
#wait for RRU and RCC to be connected
|
||||
self.task_rru_enb.waitlog('devices ok (eNB_thread_asynch_rx)')
|
||||
|
||||
##########################################################################
|
||||
# stop_enb_rru_rcc
|
||||
##########################################################################
|
||||
def stop_enb_rru_rcc(self):
|
||||
log("INFO: ALU test: stop RRU/RCC softmodem")
|
||||
self.task_rru_enb.sendnow("%c" % 3)
|
||||
ret = self.task_rru_enb.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: ALU test: RRU softmodem failed")
|
||||
#not sure if we have to quit here or not
|
||||
#os._exit(1)
|
||||
self.task_rcc_enb.sendnow("%c" % 3)
|
||||
ret = self.task_rcc_enb.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: ALU test: RCC softmodem failed")
|
||||
#not sure if we have to quit here or not
|
||||
#os._exit(1)
|
||||
|
||||
##########################################################################
|
||||
# start_ue
|
||||
##########################################################################
|
||||
def start_ue(self, ue):
|
||||
log("INFO: ALU test: start " + ue + " UE")
|
||||
self.task_ue = Task("actions/start_" + ue + ".bash",
|
||||
"start_" + ue,
|
||||
self.ue_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
self.env,
|
||||
self.logdir + "/start_" + ue + "." + self.ue_machine,
|
||||
event=self.event)
|
||||
self.task_ue.waitlog("local IP address", event=self.event)
|
||||
self.event.wait()
|
||||
|
||||
#at this point one task has died or we have the line in the log
|
||||
if self.task_ue.waitlog_state != WAITLOG_SUCCESS:
|
||||
log("ERROR: ALU test: " + ue + " UE did not connect")
|
||||
raise TestFailed()
|
||||
|
||||
self.event.clear()
|
||||
|
||||
if ( (self.task_enb != None and not self.task_enb.alive()) or
|
||||
(self.task_rru_enb!=None and not self.task_rru_enb.alive()) or
|
||||
(self.task_rcc_enb!=None and not self.task_rcc_enb.alive()) or
|
||||
not self.task_hss.alive() or
|
||||
not self.task_ue.alive()):
|
||||
log("ERROR: ALU test: eNB, HSS or UE task died")
|
||||
raise TestFailed()
|
||||
|
||||
#get UE IP
|
||||
l = open(self.task_ue.logfile, "r").read()
|
||||
self.ue_ip = re.search("local IP address (.*)\n", l) \
|
||||
.groups()[0]
|
||||
log("INFO: ALU test: " + ue + " UE IP address: " + self.ue_ip)
|
||||
|
||||
##########################################################################
|
||||
# stop_ue
|
||||
##########################################################################
|
||||
def stop_ue(self, ue):
|
||||
log("INFO: ALU test: stop " + ue + " UE")
|
||||
self.task_ue.sendnow("%c" % 3)
|
||||
ret = self.task_ue.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: ALU test: task " + ue + " UE failed")
|
||||
#not sure if we have to quit here or not
|
||||
#os._exit(1)
|
||||
|
||||
##########################################################################
|
||||
# _do_traffic (internal function, do not call out of the class)
|
||||
##########################################################################
|
||||
def _do_traffic(self, name,
|
||||
server_code, server_machine, server_ip,
|
||||
client_code, client_machine,
|
||||
waitlog,
|
||||
server_logfile, client_logfile,
|
||||
udp_bandwidth=None):
|
||||
log("INFO: ALU test: run traffic: " + name)
|
||||
|
||||
log("INFO: ALU test: launch server")
|
||||
task_traffic_server = Task("actions/" + server_code + ".bash",
|
||||
server_logfile,
|
||||
server_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
self.env,
|
||||
self.logdir + "/" + server_logfile + "." + server_machine,
|
||||
event=self.event)
|
||||
task_traffic_server.waitlog(waitlog)
|
||||
|
||||
env = list(self.env)
|
||||
if udp_bandwidth != None:
|
||||
env.append("UDP_BANDWIDTH=" + udp_bandwidth)
|
||||
env.append("SERVER_IP=" + server_ip)
|
||||
|
||||
log("INFO: ALU test: launch client")
|
||||
task_traffic_client = Task("actions/" + client_code + ".bash",
|
||||
client_logfile,
|
||||
client_machine,
|
||||
self.oai_user,
|
||||
self.oai_password,
|
||||
env,
|
||||
self.logdir + "/" + client_logfile + "." + client_machine,
|
||||
event=self.event)
|
||||
log("INFO: ALU test: wait for client to finish (or some error)")
|
||||
|
||||
self.event.wait()
|
||||
log("DEBUG: event.wait() done")
|
||||
|
||||
if ( (self.task_enb != None and not self.task_enb.alive()) or
|
||||
(self.task_rru_enb!=None and not self.task_rru_enb.alive()) or
|
||||
(self.task_rcc_enb!=None and not self.task_rcc_enb.alive()) or
|
||||
not self.task_hss.alive() or
|
||||
not self.task_ue.alive()):
|
||||
log("ERROR: unexpected task exited, test failed, kill all")
|
||||
if task_traffic_client.alive():
|
||||
task_traffic_client.kill()
|
||||
if (self.task_enb != None and self.task_enb.alive()):
|
||||
self.task_enb.kill()
|
||||
if (self.task_rru_enb != None and self.task_rru_enb.alive()):
|
||||
self.task_rru_enb.kill()
|
||||
if (self.task_rcc_enb != None and self.task_rcc_enb.alive()):
|
||||
self.task_rcc_enb.kill()
|
||||
if self.task_ue.alive():
|
||||
self.task_ue.kill()
|
||||
|
||||
ret = task_traffic_client.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: ALU test: downlink traffic failed")
|
||||
#not sure if we have to quit here or not
|
||||
#os._exit(1)
|
||||
|
||||
#stop downlink server
|
||||
#log("INFO: ALU test: stop server (kill ssh connection)")
|
||||
#task_traffic_server.kill()
|
||||
log("INFO: ALU test: stop server (ctrl+z then kill -9 %1)")
|
||||
task_traffic_server.sendnow("%ckill -9 %%1 || true\n" % 26)
|
||||
log("INFO: ALU test: wait for server to quit")
|
||||
task_traffic_server.wait()
|
||||
|
||||
self.event.clear()
|
||||
|
||||
if ( (self.task_enb != None and not self.task_enb.alive()) or
|
||||
(self.task_rru_enb!=None and not self.task_rru_enb.alive()) or
|
||||
(self.task_rcc_enb!=None and not self.task_rcc_enb.alive()) or
|
||||
not self.task_hss.alive() or
|
||||
not self.task_ue.alive()):
|
||||
log("ERROR: ALU test: eNB, HSS or UE task died")
|
||||
raise TestFailed()
|
||||
|
||||
##########################################################################
|
||||
# dl_tcp
|
||||
##########################################################################
|
||||
def dl_tcp(self, ue):
|
||||
self._do_traffic(ue + " downlink TCP",
|
||||
"server_tcp", self.ue_machine, self.ue_ip,
|
||||
"client_tcp", self.epc_machine,
|
||||
"Server listening on TCP port 5001",
|
||||
ue + "_downlink_tcp_server",
|
||||
ue + "_downlink_tcp_client")
|
||||
|
||||
##########################################################################
|
||||
# ul_tcp
|
||||
##########################################################################
|
||||
def ul_tcp(self, ue):
|
||||
self._do_traffic(ue + " uplink TCP",
|
||||
"server_tcp", self.epc_machine, "192.172.0.1",
|
||||
"client_tcp", self.ue_machine,
|
||||
"Server listening on TCP port 5001",
|
||||
ue + "_uplink_tcp_server",
|
||||
ue + "_uplink_tcp_client")
|
||||
|
||||
##########################################################################
|
||||
# dl_udp
|
||||
##########################################################################
|
||||
def dl_udp(self, ue, bandwidth):
|
||||
self._do_traffic(ue + " downlink UDP",
|
||||
"server_udp", self.ue_machine, self.ue_ip,
|
||||
"client_udp", self.epc_machine,
|
||||
"Server listening on UDP port 5001",
|
||||
ue + "_downlink_udp_server",
|
||||
ue + "_downlink_udp_client",
|
||||
udp_bandwidth=bandwidth)
|
||||
|
||||
##########################################################################
|
||||
# ul_udp
|
||||
##########################################################################
|
||||
def ul_udp(self, ue, bandwidth):
|
||||
self._do_traffic(ue + " uplink UDP",
|
||||
"server_udp", self.epc_machine, "192.172.0.1",
|
||||
"client_udp", self.ue_machine,
|
||||
"Server listening on UDP port 5001",
|
||||
ue + "_uplink_udp_server",
|
||||
ue + "_uplink_udp_client",
|
||||
udp_bandwidth=bandwidth)
|
||||
|
||||
##############################################################################
|
||||
# run_b210_alu
|
||||
##############################################################################
|
||||
|
||||
def run_b210_alu(tests, openair_dir, oai_user, oai_password, env):
|
||||
|
||||
#compile eNB (two cases: one for FDD and one for TDD)
|
||||
|
||||
if do_tests(tests['b210']['alu']['fdd']):
|
||||
alu = alu_test(epc='amerique', enb='hutch', ue='stevens',
|
||||
openair=openair_dir,
|
||||
user=oai_user, password=oai_password,
|
||||
log_subdir='enb_tests/b210_alu/compile_enb_fdd',
|
||||
env=env)
|
||||
|
||||
try:
|
||||
alu.compile_enb("--eNB -w USRP -x -c --disable-cpu-affinity")
|
||||
except BaseException, e:
|
||||
log("ERROR: ALU test failed: eNB compilation failed: " + str(e))
|
||||
return
|
||||
|
||||
if do_tests(tests['b210']['alu']['tdd']):
|
||||
alu = alu_test(epc='amerique', enb='calisson', ue='mozart',
|
||||
openair=openair_dir,
|
||||
user=oai_user, password=oai_password,
|
||||
log_subdir='enb_tests/b210_alu/compile_enb_tdd',
|
||||
env=env)
|
||||
|
||||
try:
|
||||
alu.compile_enb("--eNB -w USRP -x -c --disable-cpu-affinity")
|
||||
except BaseException, e:
|
||||
log("ERROR: ALU test failed: eNB compilation failed: " + str(e))
|
||||
return
|
||||
|
||||
#compile RRU/RCC eNB
|
||||
|
||||
if do_tests(tests['remote b210']['alu']['fdd']):
|
||||
#RRU
|
||||
alu = alu_test(epc='amerique', ue='stevens',
|
||||
openair=openair_dir,
|
||||
user=oai_user, password=oai_password,
|
||||
log_subdir='enb_tests/remote_b210_alu/compile_enb_rru',
|
||||
env=env,
|
||||
#hack: set 'enb' to reuse 'compile_enb'
|
||||
enb = 'superserver',
|
||||
enb_rru = 'superserver', enb_rcc = 'starsky')
|
||||
|
||||
try:
|
||||
alu.compile_enb("--eNB -x -c -w USRP -t ETHERNET",
|
||||
log_suffix='rru.')
|
||||
except BaseException, e:
|
||||
log("ERROR: ALU test failed: RRU eNB compilation failed: "+str(e))
|
||||
return
|
||||
|
||||
#RCC
|
||||
alu = alu_test(epc='amerique', ue='stevens',
|
||||
openair=openair_dir,
|
||||
user=oai_user, password=oai_password,
|
||||
log_subdir='enb_tests/remote_b210_alu/compile_enb_rcc',
|
||||
env=env,
|
||||
#hack: set 'enb' to reuse 'compile_enb'
|
||||
enb = 'starsky',
|
||||
enb_rru = 'superserver', enb_rcc = 'starsky')
|
||||
|
||||
try:
|
||||
alu.compile_enb("--eNB -w None -t ETHERNET",
|
||||
log_suffix='rcc.')
|
||||
except BaseException, e:
|
||||
log("ERROR: ALU test failed: RCC eNB compilation failed: "+str(e))
|
||||
return
|
||||
|
||||
|
||||
#run tests
|
||||
|
||||
udp_dl_bandwidth = { "5" : "15M",
|
||||
"10" : "30M",
|
||||
"20" : "60M" }
|
||||
|
||||
udp_ul_bandwidth = { "5" : "7M",
|
||||
"10" : "15M",
|
||||
"20" : "15M" }
|
||||
|
||||
ue_machine = { "fdd" : "stevens",
|
||||
"tdd" : "mozart" }
|
||||
|
||||
enb_machine = { "fdd" : "hutch",
|
||||
"tdd" : "calisson" }
|
||||
|
||||
band = { "fdd" : "7",
|
||||
"tdd" : "38" }
|
||||
|
||||
for mode in ('fdd', 'tdd'):
|
||||
for bw in ('5', '10', '20'):
|
||||
if do_tests(tests['b210']['alu'][mode][bw]):
|
||||
log("INFO: ALU test: run tests for bandwidth " + bw + " MHz")
|
||||
ctest = tests['b210']['alu'][mode][bw]
|
||||
alu = alu_test(epc='amerique', enb=enb_machine[mode], ue=ue_machine[mode],
|
||||
openair=openair_dir,
|
||||
user=oai_user, password=oai_password,
|
||||
log_subdir='enb_tests/b210_alu/' + mode + "/" + bw,
|
||||
env=env)
|
||||
try:
|
||||
alu.start_epc()
|
||||
alu.start_enb("enb.band" + band[mode] + ".tm1.usrpb210." + mode + "." + bw + "MHz.conf")
|
||||
for ue in ('bandrich', '3276'):
|
||||
if ue in ctest and do_tests(ctest[ue]):
|
||||
alu.start_ue(ue)
|
||||
if do_tests(ctest[ue]['tcp']['dl']): alu.dl_tcp(ue)
|
||||
if do_tests(ctest[ue]['tcp']['ul']): alu.ul_tcp(ue)
|
||||
if do_tests(ctest[ue]['udp']['dl']): alu.dl_udp(ue, udp_dl_bandwidth[bw])
|
||||
if do_tests(ctest[ue]['udp']['ul']): alu.ul_udp(ue, udp_ul_bandwidth[bw])
|
||||
alu.stop_ue(ue)
|
||||
alu.stop_enb()
|
||||
alu.stop_epc()
|
||||
except BaseException, e:
|
||||
log("ERROR: ALU test failed: " + str(e))
|
||||
alu.finish()
|
||||
if do_tests(tests['remote b210']['alu'][mode][bw]):
|
||||
log("INFO: ALU test: run RRU/RCC tests for bandwidth " + bw + " MHz")
|
||||
ctest = tests['remote b210']['alu'][mode][bw]
|
||||
alu = alu_test(epc='amerique', enb='', ue=ue_machine[mode],
|
||||
openair=openair_dir,
|
||||
user=oai_user, password=oai_password,
|
||||
log_subdir='enb_tests/remote_b210_alu/' + bw,
|
||||
env=env,
|
||||
enb_rru='superserver', enb_rcc='starsky')
|
||||
try:
|
||||
alu.start_epc()
|
||||
alu.start_enb_rru_rcc("rru.band7.tm1.if4p5." + bw + "MHz.udp.usrpb210.conf",
|
||||
"rcc.band7.tm1.if4p5." + bw + "MHz.conf")
|
||||
for ue in ('bandrich', '3276'):
|
||||
if ue in ctest and do_tests(ctest[ue]):
|
||||
alu.start_ue(ue)
|
||||
if do_tests(ctest[ue]['tcp']['dl']): alu.dl_tcp(ue)
|
||||
if do_tests(ctest[ue]['tcp']['ul']): alu.ul_tcp(ue)
|
||||
if do_tests(ctest[ue]['udp']['dl']): alu.dl_udp(ue, udp_dl_bandwidth[bw])
|
||||
if do_tests(ctest[ue]['udp']['ul']): alu.ul_udp(ue, udp_ul_bandwidth[bw])
|
||||
alu.stop_ue(ue)
|
||||
alu.stop_enb_rru_rcc()
|
||||
alu.stop_epc()
|
||||
except BaseException, e:
|
||||
log("ERROR: ALU test failed: " + str(e))
|
||||
alu.finish()
|
||||
@@ -1,176 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 38;
|
||||
downlink_frequency = 2580000000L;
|
||||
uplink_frequency_offset = 0;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -96;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth6";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.82/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,176 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 38;
|
||||
downlink_frequency = 2580000000L;
|
||||
uplink_frequency_offset = 0;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -96;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth6";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.82/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,176 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "TDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 38;
|
||||
downlink_frequency = 2580000000L;
|
||||
uplink_frequency_offset = 0;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -96;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth6";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.82/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,176 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -103;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.19/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,176 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -103;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.19/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,176 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "eNodeB_3GPP";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -24;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -103;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.19/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.19/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.19/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,193 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RCC_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.18/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.18/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.18/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "eth1";
|
||||
remote_address = "10.10.10.157";
|
||||
local_address = "10.10.10.18";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,193 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RCC_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.18/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.18/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.18/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "eth1";
|
||||
remote_address = "10.10.10.157";
|
||||
local_address = "10.10.10.18";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,193 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RCC_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.26";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.18/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.18/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.18/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "eth1";
|
||||
remote_address = "10.10.10.157";
|
||||
local_address = "10.10.10.18";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,195 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RRU_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "eth3";
|
||||
remote_address = "10.10.10.18";
|
||||
local_address = "10.10.10.157";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,195 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RRU_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 100;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "eth3";
|
||||
remote_address = "10.10.10.18";
|
||||
local_address = "10.10.10.157";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,195 +0,0 @@
|
||||
Active_eNBs = ( "eNB-Eurecom-LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB-Eurecom-LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
node_function = "NGFI_RRU_IF4p5";
|
||||
node_timing = "synch_to_ext_device";
|
||||
node_synch_ref = 0;
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -104;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
pucch_deltaF_Format2 = "deltaF0";
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
|
||||
ue_TransmissionMode = 1;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
timer_poll_retransmit = 80;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
|
||||
timer_reordering = 35;
|
||||
|
||||
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
|
||||
timer_status_prohibit = 0;
|
||||
|
||||
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
|
||||
poll_pdu = 4;
|
||||
|
||||
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
|
||||
poll_byte = 99999;
|
||||
|
||||
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
|
||||
max_retx_threshold = 4;
|
||||
}
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
t_dc_prep = 1000; /* unit: millisecond */
|
||||
t_dc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "eth3";
|
||||
remote_address = "10.10.10.18";
|
||||
local_address = "10.10.10.157";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "udp_if4p5";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 80;
|
||||
tx_scheduling_advance = 9;
|
||||
if_compression = "alaw";
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -1,104 +0,0 @@
|
||||
import os, subprocess, time, fcntl, termios, tty, signal, thread
|
||||
|
||||
from utils import log
|
||||
|
||||
class connection:
|
||||
def __init__(self, description, host, user, password):
|
||||
self.description = description
|
||||
self.host = host
|
||||
self.user = user
|
||||
self.password = password
|
||||
self.sendlock = thread.allocate_lock()
|
||||
|
||||
try:
|
||||
(pid, fd) = os.forkpty()
|
||||
except BaseException, e:
|
||||
log("ERROR: forkpty for '" + description + "': " + str(e))
|
||||
(pid, fd) = (-1, -1)
|
||||
|
||||
if pid == -1:
|
||||
log("ERROR: creating connection for '" + description + "'")
|
||||
os._exit(1)
|
||||
|
||||
# child process, run ssh
|
||||
if pid == 0:
|
||||
try:
|
||||
os.execvp('sshpass', ['sshpass', '-p', password,
|
||||
'ssh', user + '@' + host])
|
||||
except BaseException, e:
|
||||
log("ERROR: execvp for '" + description + "': " + str(e))
|
||||
log("ERROR: execvp failed for '" + description + "'")
|
||||
os._exit(1)
|
||||
|
||||
# parent process
|
||||
# make the TTY raw to avoid getting input printed and no ^M
|
||||
try:
|
||||
tty.setraw(fd, termios.TCSANOW)
|
||||
except BaseException, e:
|
||||
log("ERROR: failed configuring TTY: " + str(e))
|
||||
os._exit(1)
|
||||
|
||||
# try:
|
||||
# fcntl.fcntl(fd, fcntl.F_SETFL,
|
||||
# fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK)
|
||||
# except:
|
||||
# log("ERROR: fcntl failed for '" + description + "'")
|
||||
# os._exit(1)
|
||||
|
||||
self.pid = pid
|
||||
self.fd = fd
|
||||
self.active = True
|
||||
self.retcode = -1
|
||||
|
||||
def send(self, string):
|
||||
if self.active == False:
|
||||
log("ERROR: send: child is dead for '" + self.description + "'")
|
||||
return -1
|
||||
|
||||
try:
|
||||
(pid, out) = os.waitpid(self.pid, os.WNOHANG)
|
||||
except BaseException, e:
|
||||
log("ERROR: send: waitpid failed for '" + self.description +
|
||||
"': " + str(e))
|
||||
(pid, out) = (self.pid, 1)
|
||||
if pid != 0:
|
||||
log("ERROR: send: child process dead for '" +
|
||||
self.description + "'")
|
||||
try:
|
||||
os.close(self.fd)
|
||||
except BaseException, e:
|
||||
#we don't care about errors at this point
|
||||
pass
|
||||
self.active = False
|
||||
self.retcode = out
|
||||
return -1
|
||||
|
||||
self.sendlock.acquire()
|
||||
|
||||
length = len(string)
|
||||
while length != 0:
|
||||
try:
|
||||
ret = os.write(self.fd, string)
|
||||
except BaseException, e:
|
||||
log("ERROR: send fails for '" + self.description + "': " +
|
||||
str(e))
|
||||
os._exit(1)
|
||||
|
||||
if ret == 0:
|
||||
log("ERROR: send: write returns 0 for '" +
|
||||
self.description + "'")
|
||||
os._exit(1)
|
||||
|
||||
length = length - ret
|
||||
string = string[ret:]
|
||||
|
||||
self.sendlock.release()
|
||||
|
||||
return 0
|
||||
|
||||
def kill(self, signal=signal.SIGTERM):
|
||||
log("INFO: kill connection '" + self.description + "'")
|
||||
try:
|
||||
os.kill(self.pid, signal)
|
||||
except BaseException, e:
|
||||
log("ERROR: connection.kill: " + str(e))
|
||||
@@ -1,79 +0,0 @@
|
||||
import threading, os
|
||||
|
||||
from utils import log
|
||||
|
||||
class MachineWaiterThread(threading.Thread):
|
||||
def __init__(self, machine, tasks):
|
||||
threading.Thread.__init__(self)
|
||||
self.machine = machine
|
||||
self.tasks = tasks
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
for task in self.tasks:
|
||||
ret = task.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: task '" + task.description + "' failed " +
|
||||
"on machine " + self.machine.name)
|
||||
task.postaction()
|
||||
self.machine.unbusy()
|
||||
except BaseException, e:
|
||||
log("ERROR: MachineWaiterThread: " + str(e))
|
||||
os._exit(1)
|
||||
|
||||
class Machine():
|
||||
def __init__(self, machine, cond):
|
||||
self.name = machine
|
||||
self.free = True
|
||||
self.cond = cond
|
||||
def busy(self, tasks):
|
||||
waiter = MachineWaiterThread(self, tasks)
|
||||
waiter.start()
|
||||
def unbusy(self):
|
||||
self.cond.acquire()
|
||||
self.free = True
|
||||
self.cond.notify()
|
||||
self.cond.release()
|
||||
|
||||
class MachineList():
|
||||
def __init__(self, list):
|
||||
self.list = []
|
||||
self.cond = threading.Condition()
|
||||
for m in list:
|
||||
self.list.append(Machine(m, self.cond))
|
||||
|
||||
def get_free_machine(self):
|
||||
try:
|
||||
self.cond.acquire()
|
||||
while True:
|
||||
free_machine = None
|
||||
for m in self.list:
|
||||
if m.free == True:
|
||||
free_machine = m
|
||||
break
|
||||
if free_machine != None:
|
||||
break
|
||||
self.cond.wait()
|
||||
free_machine.free = False
|
||||
self.cond.release()
|
||||
except BaseException, e:
|
||||
log("ERROR: machine_list: " + str(e))
|
||||
os._exit(1)
|
||||
return free_machine
|
||||
|
||||
def wait_all_free(self):
|
||||
try:
|
||||
self.cond.acquire()
|
||||
while True:
|
||||
all_free = True
|
||||
for m in self.list:
|
||||
if m.free == False:
|
||||
all_free = False
|
||||
break
|
||||
if all_free == True:
|
||||
break
|
||||
self.cond.wait()
|
||||
self.cond.release()
|
||||
except BaseException, e:
|
||||
log("ERROR: machine_list: " + str(e))
|
||||
os._exit(1)
|
||||
@@ -1,705 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os, re, sys, time, threading, thread
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from utils import test_in_list, quickshell, log
|
||||
from task import Task, WAITLOG_SUCCESS, WAITLOG_FAILURE
|
||||
from machine_list import MachineList
|
||||
|
||||
oai_user = os.environ.get('OAI_USER')
|
||||
oai_password = os.environ.get('OAI_PASS')
|
||||
requested_tests = os.environ.get('OAI_TEST_CASE_GROUP')
|
||||
machines = os.environ.get('MACHINELIST')
|
||||
generic_machines = os.environ.get('MACHINELISTGENERIC')
|
||||
result_dir = os.environ.get('RESULT_DIR')
|
||||
nruns_softmodem = os.environ.get('NRUNS_LTE_SOFTMODEM')
|
||||
openair_dir = os.environ.get('OPENAIR_DIR')
|
||||
|
||||
some_undef = False
|
||||
if (oai_user == None) :
|
||||
log("variable OAI_USER is not defined")
|
||||
some_undef = True
|
||||
if (oai_password == None) :
|
||||
log("variable OAI_PASS is not defined")
|
||||
some_undef = True
|
||||
if (requested_tests == None) :
|
||||
log("variable OAI_TEST_CASE_GROUP is not defined")
|
||||
some_undef = True
|
||||
if (machines == None) :
|
||||
log("variable MACHINELIST is not defined")
|
||||
some_undef = True
|
||||
if (generic_machines == None) :
|
||||
log("variable MACHINELISTGENERIC is not defined")
|
||||
some_undef = True
|
||||
if (result_dir == None) :
|
||||
log("variable RESULT_DIR is not defined")
|
||||
some_undef = True
|
||||
if (nruns_softmodem == None) :
|
||||
log("variable NRUNS_LTE_SOFTMODEM is not defined")
|
||||
some_undef = True
|
||||
if (openair_dir == None) :
|
||||
log("variable OPENAIR_DIR is not defined")
|
||||
some_undef = True
|
||||
if (some_undef == True):
|
||||
os._exit(1)
|
||||
|
||||
requested_tests = requested_tests .replace('"','')
|
||||
machines = machines .replace('"','')
|
||||
generic_machines = generic_machines .replace('"','')
|
||||
|
||||
xml_test_file = os.environ.get('OPENAIR_DIR') + \
|
||||
"/cmake_targets/autotests/test_case_list.xml"
|
||||
|
||||
xmlTree = ET.parse(xml_test_file)
|
||||
xmlRoot = xmlTree.getroot()
|
||||
|
||||
exclusion_tests=xmlRoot.findtext('TestCaseExclusionList',default='')
|
||||
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)):
|
||||
log("ERROR: exclusion test is invalidly formatted: " + test)
|
||||
os._exit(1)
|
||||
|
||||
#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)):
|
||||
log("INFO: test group/case requested: " + test)
|
||||
else:
|
||||
log("ERROR: requested test is invalidly formatted: " + test)
|
||||
os._exit(1)
|
||||
|
||||
#get the list of tests to be done
|
||||
todo_tests=[]
|
||||
for test in all_tests:
|
||||
if (test_in_list(test.get('id'), requested_tests) and
|
||||
not test_in_list(test.get('id'), exclusion_tests)):
|
||||
log("INFO: test will be run: " + test.get('id'))
|
||||
todo_tests.append(test)
|
||||
else:
|
||||
log("INFO: test will be skipped: " + test.get('id'))
|
||||
|
||||
#get commit ID to use
|
||||
commit_id = quickshell("git rev-parse --verify HEAD").replace('\n','')
|
||||
if (len(commit_id) != 20*2):
|
||||
log("ERROR: bad commit '" + commit_id + "'")
|
||||
log("INFO: test for commit " + commit_id)
|
||||
|
||||
#get repository URL
|
||||
repository_url = quickshell("git config remote.origin.url").replace('\n','')
|
||||
log("INFO: repository URL: " + repository_url)
|
||||
|
||||
#prepare environment for tasks
|
||||
env = []
|
||||
env.append("REPOSITORY_URL=" + repository_url)
|
||||
env.append("COMMIT_ID=" + commit_id)
|
||||
|
||||
#clone repository on all machines in the test setup
|
||||
tasks=[]
|
||||
for machine in machines.split():
|
||||
tasks.append(Task("actions/clone_repository.bash",
|
||||
"clone repository on " + machine,
|
||||
machine,
|
||||
oai_user,
|
||||
oai_password,
|
||||
env,
|
||||
openair_dir + "/cmake_targets/autotests/log/clone." \
|
||||
+ machine))
|
||||
for task in tasks:
|
||||
log("INFO: wait for task: " + task.description)
|
||||
ret = task.wait()
|
||||
if ret != 0 or not "TEST_SETUP_SUCCESS" in open(task.logfile).read():
|
||||
log("ERROR: task failed: " + task.description)
|
||||
os._exit(1)
|
||||
|
||||
##############################################################################
|
||||
# run compilation tests #
|
||||
##############################################################################
|
||||
|
||||
machine_list = MachineList(generic_machines.split())
|
||||
|
||||
for test in todo_tests:
|
||||
action = test.findtext('class')
|
||||
if action != 'compilation':
|
||||
continue
|
||||
id = test.get('id')
|
||||
machine = machine_list.get_free_machine()
|
||||
log("INFO: start " + action + " test " + id + " on machine " +
|
||||
machine.name)
|
||||
tasks = []
|
||||
runenv = list(env)
|
||||
runenv.append('OPENAIR_DIR=/tmp/oai_test_setup/oai')
|
||||
runenv.append('BUILD_ARGUMENTS="'
|
||||
+ test.findtext('compile_prog_args')
|
||||
+ '"')
|
||||
runenv.append('BUILD_OUTPUT="'
|
||||
+ test.findtext('compile_prog_out')
|
||||
.replace('\n','')
|
||||
+ '"')
|
||||
logdir = openair_dir +"/cmake_targets/autotests/log/"+ id +"/compile_log"
|
||||
remote_files = "'/tmp/oai_test_setup/oai/cmake_targets/log/*'"
|
||||
post_action = "mkdir -p "+ logdir + \
|
||||
" && sshpass -p " + oai_password + " scp -r " + oai_user + \
|
||||
"@" + machine.name + ":" + remote_files + " " + logdir + \
|
||||
" || true"
|
||||
tasks.append(Task("actions/" + action + ".bash",
|
||||
action + " of test " + id + " on " + machine.name,
|
||||
machine.name,
|
||||
oai_user,
|
||||
oai_password,
|
||||
runenv,
|
||||
openair_dir + "/cmake_targets/autotests/log/"
|
||||
+ id + "."
|
||||
+ machine.name,
|
||||
post_action=post_action))
|
||||
machine.busy(tasks)
|
||||
|
||||
##############################################################################
|
||||
# run execution tests #
|
||||
##############################################################################
|
||||
|
||||
class ExecutionThread(threading.Thread):
|
||||
def __init__(self, id, machine, test):
|
||||
threading.Thread.__init__(self)
|
||||
self.machine = machine
|
||||
self.id = id
|
||||
self.test = test
|
||||
|
||||
def run(self):
|
||||
id = self.id
|
||||
machine = self.machine
|
||||
test = self.test
|
||||
|
||||
# step 1: compile
|
||||
|
||||
log("INFO: start compilation of test " + id + " on machine " +
|
||||
machine.name)
|
||||
tasks = []
|
||||
runenv = list(env)
|
||||
runenv.append('OPENAIR_DIR=/tmp/oai_test_setup/oai')
|
||||
runenv.append('PRE_BUILD="'
|
||||
+ test.findtext('pre_compile_prog')
|
||||
+ '"')
|
||||
runenv.append('BUILD_PROG="'
|
||||
+ test.findtext('compile_prog')
|
||||
+ '"')
|
||||
runenv.append('BUILD_ARGUMENTS="'
|
||||
+ test.findtext('compile_prog_args')
|
||||
+ '"')
|
||||
runenv.append('PRE_EXEC="'
|
||||
+ test.findtext('pre_exec') + " "
|
||||
+ test.findtext('pre_exec_args')
|
||||
+ '"')
|
||||
logdir = openair_dir +"/cmake_targets/autotests/log/"+ id + \
|
||||
"/compile_log"
|
||||
remote_files = "'/tmp/oai_test_setup/oai/cmake_targets/log/*'"
|
||||
post_action = "mkdir -p "+ logdir + \
|
||||
" && sshpass -p " + oai_password + \
|
||||
" scp -r " + oai_user + "@" + machine.name + ":" + \
|
||||
remote_files + " " + logdir + \
|
||||
" || true"
|
||||
task = Task("actions/execution_compile.bash",
|
||||
"compilation of test " + id + " on " + machine.name,
|
||||
machine.name,
|
||||
oai_user,
|
||||
oai_password,
|
||||
runenv,
|
||||
openair_dir + "/cmake_targets/autotests/log/"
|
||||
+ id + "_compile."
|
||||
+ machine.name,
|
||||
post_action=post_action)
|
||||
ret = task.wait()
|
||||
task.postaction()
|
||||
if ret != 0:
|
||||
log("ERROR: compilation of test " + id + " failed: " + str(ret))
|
||||
machine.unbusy()
|
||||
return
|
||||
|
||||
#step 2: run all tests
|
||||
|
||||
nruns = test.findtext('nruns')
|
||||
args = test.findtext('main_exec_args')
|
||||
i = 0
|
||||
for arg in args.splitlines():
|
||||
i = i+1
|
||||
runenv2 = list(runenv)
|
||||
runenv2.append('OPENAIR_TARGETS=/tmp/oai_test_setup/oai/targets')
|
||||
runenv2.append('EXEC="'
|
||||
+ test.findtext('main_exec')
|
||||
+ '"')
|
||||
runenv2.append('EXEC_ARGS="' + arg + '"')
|
||||
for run in range(int(nruns)):
|
||||
log("INFO: start execution of test " + id + " case " +
|
||||
str(i) + " run " + str(run) + " on machine " +
|
||||
machine.name)
|
||||
task =Task("actions/execution.bash",
|
||||
"execution of test " + id + " on " + machine.name,
|
||||
machine.name,
|
||||
oai_user,
|
||||
oai_password,
|
||||
runenv2,
|
||||
openair_dir + "/cmake_targets/autotests/log/"
|
||||
+ id + "_case_" + str(i) + "_run_" + str(run)
|
||||
+ "." + machine.name)
|
||||
ret = task.wait()
|
||||
if ret != 0:
|
||||
log("ERROR: execution of test " +id+ " failed: " +
|
||||
str(ret))
|
||||
|
||||
machine.unbusy()
|
||||
|
||||
for test in todo_tests:
|
||||
action = test.findtext('class')
|
||||
if action != 'execution':
|
||||
continue
|
||||
id = test.get('id')
|
||||
machine = machine_list.get_free_machine()
|
||||
ExecutionThread(id, machine, test).start()
|
||||
|
||||
#wait for compilation/execution tests to be finished
|
||||
#log only if some compilation/execution tests are actually done
|
||||
for test in todo_tests:
|
||||
action = test.findtext('class')
|
||||
if action == 'execution' or action == 'compilation':
|
||||
log("INFO: requested compilation/execution tests " +
|
||||
"have been launched, waiting for completion")
|
||||
break
|
||||
machine_list.wait_all_free()
|
||||
|
||||
##############################################################################
|
||||
# run eNB softmodem tests #
|
||||
##############################################################################
|
||||
|
||||
tests = {}
|
||||
for a in { 'b210', 'remote b210', 'x310', 'exmimo2' }:
|
||||
tests[a] = {}
|
||||
for b in { 'alu', 'openair-cn' }:
|
||||
tests[a][b] = {}
|
||||
for c in { 'fdd', 'tdd' }:
|
||||
tests[a][b][c] = {}
|
||||
for d in { '5', '10', '20' }:
|
||||
tests[a][b][c][d] = {}
|
||||
for e in { 'bandrich', 'sony', '3276' }:
|
||||
tests[a][b][c][d][e] = {}
|
||||
for f in { 'tcp', 'udp' }:
|
||||
tests[a][b][c][d][e][f] = {}
|
||||
for g in { 'dl', 'ul' }:
|
||||
tests[a][b][c][d][e][f][g] = False
|
||||
|
||||
todo_tests_ids = []
|
||||
for test in todo_tests:
|
||||
todo_tests_ids.append(test.get('id'))
|
||||
|
||||
for test in todo_tests_ids:
|
||||
if test=='015500':tests['b210']['alu']['fdd'][ '5']['bandrich']['udp']['ul']=True
|
||||
if test=='015501':tests['b210']['alu']['fdd']['10']['bandrich']['udp']['ul']=True
|
||||
if test=='015502':tests['b210']['alu']['fdd']['20']['bandrich']['udp']['ul']=True
|
||||
if test=='015503':tests['b210']['alu']['fdd'][ '5']['bandrich']['udp']['dl']=True
|
||||
if test=='015504':tests['b210']['alu']['fdd']['10']['bandrich']['udp']['dl']=True
|
||||
if test=='015505':tests['b210']['alu']['fdd']['20']['bandrich']['udp']['dl']=True
|
||||
if test=='015506':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015507':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015508':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015509':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015510':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015511':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015512':tests['b210']['alu']['fdd'][ '5']['bandrich']['tcp']['ul']=True
|
||||
if test=='015513':tests['b210']['alu']['fdd']['10']['bandrich']['tcp']['ul']=True
|
||||
if test=='015514':tests['b210']['alu']['fdd']['20']['bandrich']['tcp']['ul']=True
|
||||
if test=='015515':tests['b210']['alu']['fdd'][ '5']['bandrich']['tcp']['dl']=True
|
||||
if test=='015516':tests['b210']['alu']['fdd']['10']['bandrich']['tcp']['dl']=True
|
||||
if test=='015517':tests['b210']['alu']['fdd']['20']['bandrich']['tcp']['dl']=True
|
||||
if test=='015518':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015519':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015520':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015521':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015522':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015523':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='015600':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015601':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015602':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015603':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015604':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015605':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='015700':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015701':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015702':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015703':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015704':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015705':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='015800':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015801':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015802':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015803':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015804':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015805':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015806':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015807':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015808':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015809':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015810':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015811':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015812':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015813':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015814':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015815':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015816':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015817':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015818':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015819':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015820':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015821':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015822':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='015823':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='016000':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016001':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016002':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016003':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016004':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016005':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='016100':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016101':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016102':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016103':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016104':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016105':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='016300':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016301':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016302':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016303':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016304':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016305':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='016500':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016501':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016502':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016503':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016504':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='016505':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='017000':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017001':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017002':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017003':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017004':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017005':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='017500':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017501':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017502':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017503':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017504':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='017505':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='017600':tests['remote b210']['alu']['fdd'][ '5']['bandrich']['udp']['ul']=True
|
||||
if test=='017601':tests['remote b210']['alu']['fdd']['10']['bandrich']['udp']['ul']=True
|
||||
if test=='017602':tests['remote b210']['alu']['fdd']['20']['bandrich']['udp']['ul']=True
|
||||
if test=='017603':tests['remote b210']['alu']['fdd'][ '5']['bandrich']['udp']['dl']=True
|
||||
if test=='017604':tests['remote b210']['alu']['fdd']['10']['bandrich']['udp']['dl']=True
|
||||
if test=='017605':tests['remote b210']['alu']['fdd']['20']['bandrich']['udp']['dl']=True
|
||||
if test=='017606':tests['remote b210']['alu']['fdd'][ '5']['bandrich']['tcp']['ul']=True
|
||||
if test=='017607':tests['remote b210']['alu']['fdd']['10']['bandrich']['tcp']['ul']=True
|
||||
if test=='017608':tests['remote b210']['alu']['fdd']['20']['bandrich']['tcp']['ul']=True
|
||||
if test=='017609':tests['remote b210']['alu']['fdd'][ '5']['bandrich']['tcp']['dl']=True
|
||||
if test=='017610':tests['remote b210']['alu']['fdd']['10']['bandrich']['tcp']['dl']=True
|
||||
if test=='017611':tests['remote b210']['alu']['fdd']['20']['bandrich']['tcp']['dl']=True
|
||||
|
||||
if test=='018000':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018001':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018002':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018003':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018004':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018005':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='018500':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018501':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018502':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018503':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018504':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018505':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='018600':tests['b210']['alu']['tdd'][ '5']['3276']['udp']['ul']=True
|
||||
if test=='018601':tests['b210']['alu']['tdd']['10']['3276']['udp']['ul']=True
|
||||
if test=='018602':tests['b210']['alu']['tdd']['20']['3276']['udp']['ul']=True
|
||||
if test=='018603':tests['b210']['alu']['tdd'][ '5']['3276']['udp']['dl']=True
|
||||
if test=='018604':tests['b210']['alu']['tdd']['10']['3276']['udp']['dl']=True
|
||||
if test=='018605':tests['b210']['alu']['tdd']['20']['3276']['udp']['dl']=True
|
||||
if test=='018606':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018607':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018608':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018609':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018610':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018611':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018612':tests['b210']['alu']['tdd'][ '5']['3276']['tcp']['ul']=True
|
||||
if test=='018613':tests['b210']['alu']['tdd']['10']['3276']['tcp']['ul']=True
|
||||
if test=='018614':tests['b210']['alu']['tdd']['20']['3276']['tcp']['ul']=True
|
||||
if test=='018615':tests['b210']['alu']['tdd'][ '5']['3276']['tcp']['dl']=True
|
||||
if test=='018616':tests['b210']['alu']['tdd']['10']['3276']['tcp']['dl']=True
|
||||
if test=='018617':tests['b210']['alu']['tdd']['20']['3276']['tcp']['dl']=True
|
||||
if test=='018618':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018619':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018620':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018621':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018622':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='018623':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='025500':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025501':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025502':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025503':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025504':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025505':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025506':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025507':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025508':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025509':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025510':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025511':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025512':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025513':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025514':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025515':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025516':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025517':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025518':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025519':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025520':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025521':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025522':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025523':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
if test=='025700':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025701':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025702':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025703':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025704':log('WARNING: skip test ' + test) #TODO
|
||||
if test=='025705':log('WARNING: skip test ' + test) #TODO
|
||||
|
||||
from alu_test import run_b210_alu
|
||||
|
||||
#B210 ALU tests
|
||||
|
||||
run_b210_alu(tests, openair_dir, oai_user, oai_password, env)
|
||||
|
||||
#for test in todo_tests:
|
||||
# action = test.findtext('class')
|
||||
# if action != 'lte-softmodem':
|
||||
# continue
|
||||
# if not "start_ltebox" in test.findtext('EPC_main_exec'):
|
||||
# continue
|
||||
# id = test.get('id')
|
||||
# log("INFO: Running ALU test " + id)
|
||||
# logdir = openair_dir + "/cmake_targets/autotests/log/" + id
|
||||
# quickshell("mkdir -p " + logdir)
|
||||
# epc_machine = test.findtext('EPC')
|
||||
# enb_machine = test.findtext('eNB')
|
||||
# ue_machine = test.findtext('UE')
|
||||
#
|
||||
# #event object used to wait for several tasks at once
|
||||
# event = threading.Event()
|
||||
#
|
||||
# #launch HSS, wait for prompt
|
||||
# log("INFO: " + id + ": run HSS")
|
||||
# task_hss = Task("actions/alu_hss.bash",
|
||||
# "ALU HSS",
|
||||
# epc_machine,
|
||||
# oai_user,
|
||||
# oai_password,
|
||||
# env,
|
||||
# logdir + "/alu_hss." + epc_machine, event=event)
|
||||
# task_hss.waitlog('S6AS_SIM-> ')
|
||||
#
|
||||
# #then launch EPC, wait for connection on HSS side
|
||||
# log("INFO: " + id + ": run EPC")
|
||||
# task = Task("actions/alu_epc.bash",
|
||||
# "ALU EPC",
|
||||
# epc_machine,
|
||||
# oai_user,
|
||||
# oai_password,
|
||||
# env,
|
||||
# logdir + "/alu_epc." + epc_machine)
|
||||
# ret = task.wait()
|
||||
# if ret != 0:
|
||||
# log("ERROR: EPC start failure");
|
||||
# os._exit(1)
|
||||
# task_hss.waitlog('Connected\n')
|
||||
#
|
||||
# #compile softmodem
|
||||
# log("INFO: " + id + ": compile softmodem")
|
||||
# envcomp = list(env)
|
||||
# envcomp.append('BUILD_ARGUMENTS="' +
|
||||
# test.findtext('eNB_compile_prog_args') + '"')
|
||||
# #we don't care about BUILD_OUTPUT but it's required (TODO: change that)
|
||||
# envcomp.append('BUILD_OUTPUT=/')
|
||||
# task = Task("actions/compilation.bash",
|
||||
# "compile softmodem",
|
||||
# enb_machine,
|
||||
# oai_user,
|
||||
# oai_password,
|
||||
# envcomp,
|
||||
# logdir + "/compile_softmodem." + enb_machine)
|
||||
# ret = task.wait()
|
||||
# if ret != 0:
|
||||
# log("ERROR: softmodem compilation failure");
|
||||
# os._exit(1)
|
||||
#
|
||||
## #copy wanted configuration file
|
||||
## quickshell("sshpass -p " + oai_password +
|
||||
## " scp config/enb.band7.tm1.usrpb210.conf " +
|
||||
## oai_user + "@" + enb_machine + ":/tmp/enb.conf")
|
||||
#
|
||||
# #run softmodem
|
||||
# log("INFO: " + id + ": run softmodem")
|
||||
# task_enb = Task("actions/run_enb.bash",
|
||||
# "run softmodem",
|
||||
# enb_machine,
|
||||
# oai_user,
|
||||
# oai_password,
|
||||
# env,
|
||||
# logdir + "/run_softmodem." + enb_machine, event=event)
|
||||
# task_enb.waitlog('got sync')
|
||||
#
|
||||
# #start UE
|
||||
# log("INFO: " + id + ": start bandrich UE")
|
||||
# task_ue = Task("actions/start_bandrich.bash",
|
||||
# "start bandrich UE",
|
||||
# ue_machine,
|
||||
# oai_user,
|
||||
# oai_password,
|
||||
# env,
|
||||
# logdir + "/start_bandrich." + ue_machine, event=event)
|
||||
# task_ue.waitlog("local IP address", event=event)
|
||||
#
|
||||
# event.wait()
|
||||
#
|
||||
# #at this point one task has died or we have the line in the log
|
||||
# if task_ue.waitlog_state != WAITLOG_SUCCESS:
|
||||
# log("ERROR: " + id + ": bandrich UE did not connect")
|
||||
# os._exit(1)
|
||||
#
|
||||
# event.clear()
|
||||
#
|
||||
# if ( not task_enb.alive() or
|
||||
# not task_hss.alive() or
|
||||
# not task_ue.alive()):
|
||||
# log("ERROR: " + id + ": eNB or UE tasks died")
|
||||
# os._exit(1)
|
||||
#
|
||||
# #get bandrich UE IP
|
||||
# l = open(task_ue.logfile, "r").read()
|
||||
# ue_ip = re.search("local IP address (.*)\n", l).groups()[0]
|
||||
# log("INFO: " + id + ": bandrich UE IP address: " + ue_ip)
|
||||
#
|
||||
# #run traffic
|
||||
# log("INFO: " + id + ": run downlink TCP traffic")
|
||||
#
|
||||
# log("INFO: " + id + ": launch server")
|
||||
# task_traffic_ue = Task("actions/downlink_bandrich.bash",
|
||||
# "start iperf on bandrich UE as server",
|
||||
# ue_machine,
|
||||
# oai_user,
|
||||
# oai_password,
|
||||
# env,
|
||||
# logdir + "/downlink_bandrich." + ue_machine,
|
||||
# event=event)
|
||||
# task_traffic_ue.waitlog("Server listening on TCP port 5001")
|
||||
#
|
||||
# log("INFO: " + id + ": launch client")
|
||||
# envepc = list(env)
|
||||
# envepc.append("UE_IP=" + ue_ip)
|
||||
# task = Task("actions/downlink_epc.bash",
|
||||
# "start iperf on EPC as client",
|
||||
# epc_machine,
|
||||
# oai_user,
|
||||
# oai_password,
|
||||
# envepc,
|
||||
# logdir + "/downlink_epc." + epc_machine, event=event)
|
||||
# log("INFO: " + id + ": wait for client (or some error)")
|
||||
#
|
||||
# event.wait()
|
||||
# log("DEBUG: event.wait() done")
|
||||
#
|
||||
# if ( not task_enb.alive() or
|
||||
# not task_hss.alive() or
|
||||
# not task_ue.alive()):
|
||||
# log("ERROR: unexpected task exited, test failed, kill all")
|
||||
# if task.alive():
|
||||
# task.kill()
|
||||
# if task_enb.alive():
|
||||
# task_enb.kill()
|
||||
# if task_ue.alive():
|
||||
# task_ue.kill()
|
||||
#
|
||||
# ret = task.wait()
|
||||
# if ret != 0:
|
||||
# log("ERROR: " + id + ": downlink traffic failed")
|
||||
# #not sure if we have to quit here or not
|
||||
# #os._exit(1)
|
||||
#
|
||||
# #stop downlink server
|
||||
# log("INFO: " + id + ": stop server (kill ssh connection)")
|
||||
# task_traffic_ue.kill()
|
||||
# log("INFO: " + id + ": wait for server to quit")
|
||||
# task_traffic_ue.wait()
|
||||
#
|
||||
# #stop UE
|
||||
# log("INFO: " + id + ": stop bandrich UE")
|
||||
# task_ue.sendnow("%c" % 3)
|
||||
# ret = task_ue.wait()
|
||||
# if ret != 0:
|
||||
# log("ERROR: " + id + ": task bandrich UE failed")
|
||||
# #not sure if we have to quit here or not
|
||||
# #os._exit(1)
|
||||
#
|
||||
# #stop softmodem
|
||||
# log("INFO: " + id + ": stop softmodem")
|
||||
# task_enb.sendnow("%c" % 3)
|
||||
# ret = task_enb.wait()
|
||||
# if ret != 0:
|
||||
# log("ERROR: " + id + ": softmodem failed")
|
||||
# #not sure if we have to quit here or not
|
||||
# #os._exit(1)
|
||||
#
|
||||
# #stop EPC, wait for disconnection on HSS side
|
||||
# log("INFO: " + id + ": stop EPC")
|
||||
# task = Task("actions/alu_epc_stop.bash",
|
||||
# "ALU EPC stop",
|
||||
# epc_machine,
|
||||
# oai_user,
|
||||
# oai_password,
|
||||
# env,
|
||||
# logdir + "/alu_epc_stop." + epc_machine)
|
||||
# ret = task.wait()
|
||||
# if ret != 0:
|
||||
# log("ERROR: " + id + ": ALU EPC stop failed")
|
||||
# os._exit(1)
|
||||
# task_hss.waitlog('Disconnected\n')
|
||||
#
|
||||
# log("INFO: " + id + ": stop HSS")
|
||||
# task_hss.sendnow("exit\n")
|
||||
# ret = task_hss.wait()
|
||||
# if ret != 0:
|
||||
# log("ERROR: " + id + ": ALU HSS failed")
|
||||
# os._exit(1)
|
||||
|
||||
import utils
|
||||
log(utils.GREEN + "GOODBYE" + utils.RESET)
|
||||
#os._exit(0)
|
||||
|
||||
#run lte softmodem tests
|
||||
@@ -1,370 +0,0 @@
|
||||
import os, time, threading, sys, os, errno, select
|
||||
from connection import connection
|
||||
|
||||
import utils
|
||||
from utils import log
|
||||
|
||||
#this class is to communicate between reader and sender threads
|
||||
#the reader increments a count each time it receives the prompt
|
||||
#and wakes up the sender
|
||||
#it also indicates when it exits so the sender can exit too
|
||||
#the sender (calling get) waits for the count to be greated than passed
|
||||
#argument or if reader exited
|
||||
#it returns argument+1 if things okay, -1 if reader exited
|
||||
class Counter:
|
||||
def __init__(self):
|
||||
self.count = 0
|
||||
self.cond = threading.Condition()
|
||||
|
||||
def inc(self):
|
||||
self.cond.acquire()
|
||||
self.count = self.count + 1
|
||||
self.cond.notify()
|
||||
self.cond.release()
|
||||
|
||||
def set(self, value):
|
||||
self.cond.acquire()
|
||||
self.count = value
|
||||
self.cond.notify()
|
||||
self.cond.release()
|
||||
|
||||
def get(self, current):
|
||||
self.cond.acquire()
|
||||
while True:
|
||||
if self.count == -1:
|
||||
ret = -1
|
||||
break
|
||||
if self.count >= current + 1:
|
||||
ret = current + 1
|
||||
break
|
||||
self.cond.wait()
|
||||
self.cond.release()
|
||||
return ret
|
||||
|
||||
#this class is used for the main application to wait for some specific
|
||||
#output from the remote program (typically the ALU HSS prompt, indicating
|
||||
#it is ready and we can proceed further)
|
||||
#(too much classes...)
|
||||
class ProducerConsumer:
|
||||
def __init__(self):
|
||||
self.count = 0
|
||||
self.cond = threading.Condition()
|
||||
|
||||
def add(self, v):
|
||||
self.cond.acquire()
|
||||
self.count = self.count + v
|
||||
self.cond.notify()
|
||||
self.cond.release()
|
||||
|
||||
def set(self, v):
|
||||
self.cond.acquire()
|
||||
self.count = v
|
||||
self.cond.notify()
|
||||
self.cond.release()
|
||||
|
||||
def get(self, old):
|
||||
self.cond.acquire()
|
||||
while True:
|
||||
if self.count == -1:
|
||||
ret = -1
|
||||
break
|
||||
if self.count > old:
|
||||
ret = self.count
|
||||
break
|
||||
self.cond.wait()
|
||||
self.cond.release()
|
||||
return ret
|
||||
|
||||
#this thread gets input from the child process of the task
|
||||
#it removes the prompts it gets (be carefully to use a prompt
|
||||
#that will not be output of any command otherwise you dead)
|
||||
class ReaderThread(threading.Thread):
|
||||
def __init__(self, fdin, logfile, prompt, prompt_counter, producer):
|
||||
threading.Thread.__init__(self)
|
||||
self.fdin = fdin
|
||||
self.logfile = logfile
|
||||
self.prompt_counter = prompt_counter
|
||||
self.prompt = prompt
|
||||
self.promptsize = len(prompt)
|
||||
self.stack = ""
|
||||
self.stacksize = 0
|
||||
self.producer = producer
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
outfile = open(self.logfile, "w")
|
||||
except BaseException, e:
|
||||
log("ERROR: ReaderThread: " + self.logfile + ": " + str(e))
|
||||
os._exit(1)
|
||||
while True:
|
||||
try:
|
||||
(a, b, c) = select.select([ self.fdin ], [], [ self.fdin ])
|
||||
except BaseException, e:
|
||||
log("ERROR: ReaderThread: " + self.logfile +
|
||||
": select failed: " + str(e))
|
||||
os._exit(1)
|
||||
try:
|
||||
z = os.read(self.fdin, 1024)
|
||||
except OSError, e:
|
||||
if e.errno == errno.EIO:
|
||||
#pipe has died, quit the thread
|
||||
break
|
||||
else:
|
||||
log("ERROR: ReaderThread: " + self.logfile +
|
||||
": unhandled error: " + str(e))
|
||||
except BaseException, e:
|
||||
log("ERROR: ReaderThread: " + self.logfile +
|
||||
": unhandled error: " + str(e))
|
||||
break
|
||||
try:
|
||||
produced = 0
|
||||
#this part is to remove the prompt
|
||||
for x in z:
|
||||
if x == self.prompt[self.stacksize]:
|
||||
self.stack = self.stack + x
|
||||
self.stacksize = self.stacksize + 1
|
||||
if self.stacksize == self.promptsize:
|
||||
self.prompt_counter.inc()
|
||||
self.stack = ""
|
||||
self.stacksize = 0
|
||||
else:
|
||||
outfile.write(self.stack)
|
||||
outfile.write(x)
|
||||
produced = produced + len(self.stack) + len(x)
|
||||
self.stack = ""
|
||||
self.stacksize = 0
|
||||
outfile.flush()
|
||||
self.producer.add(produced)
|
||||
except BaseException, e:
|
||||
log("ERROR: ReaderThread: " + self.logfile + ": " + str(e))
|
||||
os._exit(1)
|
||||
try:
|
||||
outfile.close()
|
||||
except BaseException, e:
|
||||
log("ERROR: ReaderThread: " + self.logfile + ": " + str(e))
|
||||
os._exit(1)
|
||||
#close the pipe, don't care about errors
|
||||
try:
|
||||
os.close(self.fdin)
|
||||
except:
|
||||
pass
|
||||
#signal sender to quit
|
||||
self.prompt_counter.set(-1)
|
||||
self.producer.set(-1)
|
||||
|
||||
class SenderQuit(Exception):
|
||||
pass
|
||||
|
||||
#this thread sends commands to the child process of the task
|
||||
#it waits for the prompt between each command
|
||||
#'event' is used for the main thread to wait for one of several tasks
|
||||
#to quit, meaning error or end-of-test
|
||||
class SenderThread(threading.Thread):
|
||||
def __init__(self, fdout, prompt_counter, connection, env, action,
|
||||
description, prompt, event=None):
|
||||
threading.Thread.__init__(self)
|
||||
self.fdin = fdout
|
||||
self.prompt_counter = prompt_counter
|
||||
self.connection = connection
|
||||
self.env = env
|
||||
self.action = action
|
||||
self.description = description
|
||||
self.prompt = prompt
|
||||
self.count = 0
|
||||
self.event = event
|
||||
self.alive = True
|
||||
|
||||
def wait_prompt(self):
|
||||
self.count = self.prompt_counter.get(self.count)
|
||||
if self.count == -1:
|
||||
raise SenderQuit()
|
||||
|
||||
def _run(self):
|
||||
self.connection.send('export PS1=' + self.prompt + '\n')
|
||||
self.wait_prompt()
|
||||
self.connection.send('set +o emacs\n')
|
||||
self.wait_prompt()
|
||||
self.connection.send('echo\n')
|
||||
self.wait_prompt()
|
||||
self.connection.send('echo\n')
|
||||
self.wait_prompt()
|
||||
self.connection.send("echo -e '" + utils.GREEN +
|
||||
'---------------------------------------------'
|
||||
+ utils.RESET + "'\n")
|
||||
self.wait_prompt()
|
||||
self.connection.send('echo\n')
|
||||
self.wait_prompt()
|
||||
self.connection.send("echo -n -e '" + utils.YELLOW +
|
||||
"COMMANDS START: " +
|
||||
utils.RESET + "'\n")
|
||||
self.wait_prompt()
|
||||
self.connection.send('date\n')
|
||||
self.wait_prompt()
|
||||
|
||||
for l in self.env:
|
||||
self.connection.send('export ' + l + '\n')
|
||||
self.wait_prompt()
|
||||
|
||||
with open(self.action) as f:
|
||||
for line in f:
|
||||
self.connection.send("echo -n -e '" + utils.GREEN +
|
||||
"RUNNING: " + utils.RESET + "'\n")
|
||||
self.wait_prompt()
|
||||
self.connection.send("echo '" +
|
||||
line.replace('\n','')
|
||||
.replace("'", "'\\''") + "'\n")
|
||||
self.wait_prompt()
|
||||
self.connection.send(line)
|
||||
self.wait_prompt()
|
||||
self.connection.send("if [ $? != 0 ]; then " +
|
||||
"echo -e '" + utils.RED +
|
||||
"TEST_SETUP_ERROR: " + utils.RESET +
|
||||
"last command failed, exiting'; " +
|
||||
"date; exit 1; fi\n")
|
||||
self.wait_prompt()
|
||||
|
||||
self.connection.send("echo -n -e '" + utils.YELLOW +
|
||||
"COMMANDS DONE: " +
|
||||
utils.RESET + "'\n")
|
||||
self.wait_prompt()
|
||||
self.connection.send('date\n')
|
||||
self.wait_prompt()
|
||||
self.connection.send("echo -e '" + utils.GREEN +
|
||||
"TEST_SETUP_SUCCESS" + utils.RESET + "'\n")
|
||||
self.wait_prompt()
|
||||
self.connection.send('exit\n')
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
self._run()
|
||||
except SenderQuit:
|
||||
log("WARNING: '" + self.description + "' exits too early?")
|
||||
pass
|
||||
except BaseException, e:
|
||||
log("ERROR: task failed: " + str(e))
|
||||
log("ERROR: action is: " + self.action)
|
||||
log("ERROR: description is: " + self.description)
|
||||
os._exit(1)
|
||||
|
||||
self.alive = False
|
||||
|
||||
if self.event != None:
|
||||
self.event.set()
|
||||
|
||||
WAITLOG_RUNNING = 0
|
||||
WAITLOG_SUCCESS = 1
|
||||
WAITLOG_FAILURE = 2
|
||||
|
||||
class WaitlogFailed(Exception):
|
||||
pass
|
||||
|
||||
#'event' is used by main thread to wait for any of several threads to quit.
|
||||
#'Task' passes it the 'SenderThread' above, which sets it when it finishes.
|
||||
class Task:
|
||||
def __init__(self, action, description, machine, user, password, env,
|
||||
logfile, post_action = None, event=None):
|
||||
self.action = action
|
||||
self.description = description
|
||||
self.machine = machine
|
||||
self.user = user
|
||||
self.password = password
|
||||
self.post_action = post_action
|
||||
self.producer = ProducerConsumer()
|
||||
self.logfile = logfile
|
||||
|
||||
prompt = "__OAI_TEST_SETUP_PROMPT__:"
|
||||
prompt_counter = Counter()
|
||||
|
||||
self.connection = connection(description, machine, user, password)
|
||||
|
||||
self.reader = ReaderThread(self.connection.fd, logfile, prompt,
|
||||
prompt_counter, self.producer)
|
||||
self.reader.start()
|
||||
|
||||
self.sender = SenderThread(self.connection.fd, prompt_counter,
|
||||
self.connection, env, action, description,
|
||||
prompt, event)
|
||||
self.sender.start()
|
||||
|
||||
def wait(self, timeout=-1):
|
||||
if self.connection.active == False:
|
||||
return self.connection.retcode
|
||||
try:
|
||||
(pid, ret) = os.waitpid(self.connection.pid, 0)
|
||||
except KeyboardInterrupt, e:
|
||||
log("ERROR: ctrl+c catched! " + str(e))
|
||||
os._exit(1)
|
||||
except BaseException, e:
|
||||
log("ERROR: " + str(e))
|
||||
os._exit(1)
|
||||
self.sender.join()
|
||||
self.reader.join()
|
||||
return ret
|
||||
|
||||
#this function should not be called, it is used internally by 'waitlog'
|
||||
#in mode 'background thread'
|
||||
#TODO: join() the thread at some point
|
||||
def _waitlog_thread(self, task, s):
|
||||
consumed = 0
|
||||
while True:
|
||||
consumed = task.producer.get(consumed)
|
||||
if consumed == -1:
|
||||
log("ERROR: string '" + s + "' not found in logfile " +
|
||||
task.logfile)
|
||||
task.waitlog_state = WAITLOG_FAILURE
|
||||
task.waitlog_event.set()
|
||||
return
|
||||
if s in open(task.logfile).read():
|
||||
task.waitlog_state = WAITLOG_SUCCESS
|
||||
task.waitlog_event.set()
|
||||
return
|
||||
|
||||
#two ways to wait for a string in the log file:
|
||||
# - blocking way
|
||||
# - background thread, using an Event to signal success/failure
|
||||
def waitlog(self, s, event=None):
|
||||
if event != None:
|
||||
self.waitlog_state = WAITLOG_RUNNING
|
||||
self.waitlog_event = event
|
||||
self.waitlog_thread = \
|
||||
threading.Thread(target=self._waitlog_thread,
|
||||
args=(self, s))
|
||||
self.waitlog_thread.start()
|
||||
return
|
||||
|
||||
#TODO: optimize, do not process all the file at each wakeup
|
||||
consumed = 0
|
||||
while True:
|
||||
consumed = self.producer.get(consumed)
|
||||
if consumed == -1:
|
||||
log("ERROR: string '" + s + "' not found in logfile " +
|
||||
self.logfile)
|
||||
raise WaitlogFailed()
|
||||
if s in open(self.logfile).read():
|
||||
return
|
||||
|
||||
def sendnow(self, x):
|
||||
self.connection.send(x)
|
||||
|
||||
def alive(self):
|
||||
return self.sender.alive
|
||||
|
||||
def kill(self):
|
||||
self.connection.kill()
|
||||
#put some error log in logfile, for verbosity
|
||||
try:
|
||||
f = open(self.logfile, "a+")
|
||||
f.write("\n\n" + utils.RED + "TEST_SETUP_ERROR: " + utils.RESET +
|
||||
"task killed by test setup\n\n");
|
||||
close(f)
|
||||
except BaseException, e:
|
||||
pass
|
||||
|
||||
def postaction(self):
|
||||
if self.post_action != None:
|
||||
out = utils.quickshell(self.post_action)
|
||||
if len(out):
|
||||
log("INFO: task '" + self.description +
|
||||
"' post_action '" + self.post_action + "' says: ")
|
||||
for l in out.splitlines():
|
||||
log("INFO: " + l)
|
||||
@@ -1,84 +0,0 @@
|
||||
import subprocess, os, thread, sys, time
|
||||
|
||||
#logging facitiliy
|
||||
#TODO: simplify (a first version redefined stdout, then we replaced 'print'
|
||||
#instead, keeping stuff as is)
|
||||
class Logger:
|
||||
def __init__(self, stream):
|
||||
self.stream = stream
|
||||
self.start_of_line = True
|
||||
self.lock = thread.allocate_lock()
|
||||
openair_dir = os.environ.get('OPENAIR_DIR')
|
||||
if openair_dir == None:
|
||||
print "FATAL: no OPENAIR_DIR"
|
||||
os._exit(1)
|
||||
try:
|
||||
self.logfile = open(openair_dir +
|
||||
"/cmake_targets/autotests/log/python.stdout", "w")
|
||||
except BaseException, e:
|
||||
print "FATAL: cannot create log file"
|
||||
print e
|
||||
os._exit(1)
|
||||
def put(self, data):
|
||||
self.stream.write(data)
|
||||
self.logfile.write(data)
|
||||
def write(self, data):
|
||||
self.lock.acquire()
|
||||
for c in data:
|
||||
if self.start_of_line:
|
||||
self.start_of_line = False
|
||||
t = time.strftime("%H:%M:%S", time.localtime()) + ": "
|
||||
self.stream.write(t)
|
||||
self.logfile.write(t)
|
||||
self.put(c)
|
||||
if c == '\n':
|
||||
self.start_of_line = True
|
||||
self.stream.flush()
|
||||
self.logfile.flush()
|
||||
self.lock.release()
|
||||
logger = Logger(sys.stdout)
|
||||
def log(x):
|
||||
logger.write(x + "\n")
|
||||
|
||||
#check if given test is in list
|
||||
#it is in list if one of the strings in 'list' is at the beginning of 'test'
|
||||
def test_in_list(test, list):
|
||||
for check in list:
|
||||
check=check.replace('+','')
|
||||
if (test.startswith(check)):
|
||||
return True
|
||||
return False
|
||||
|
||||
#run a local command in a shell
|
||||
def quickshell(command):
|
||||
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
(retout, reterr) = process.communicate()
|
||||
if (process.returncode != 0):
|
||||
log("ERROR: shell command failed: " + command)
|
||||
if len(retout):
|
||||
log("ERROR: command says: ")
|
||||
for l in retout.splitlines():
|
||||
log("ERROR: " + l)
|
||||
os._exit(1)
|
||||
return retout
|
||||
|
||||
RED="\x1b[31m"
|
||||
GREEN="\x1b[32m"
|
||||
YELLOW="\x1b[33m"
|
||||
RESET="\x1b[m"
|
||||
|
||||
#an exception raised when a test fails
|
||||
class TestFailed(Exception):
|
||||
pass
|
||||
|
||||
#this function returns True if a test in 'x' is set to True
|
||||
#to be used as: if do_tests(tests['b210']['alu']) ...
|
||||
def do_tests(x):
|
||||
if type(x) == list:
|
||||
for v in x:
|
||||
if do_tests(v): return True
|
||||
return False
|
||||
if type(x) == dict: return do_tests(x.values())
|
||||
if x == True: return True
|
||||
return False
|
||||
@@ -114,7 +114,6 @@ COPY --from=phy-sim-build \
|
||||
/oai-ran/cmake_targets/autotests/test_case_list.xml \
|
||||
/opt/oai-physim/cmake_targets/autotests/
|
||||
COPY --from=phy-sim-build \
|
||||
/oai-ran/cmake_targets/autotests/tools/free_mem.bash \
|
||||
/oai-ran/cmake_targets/tools/build_helper \
|
||||
/oai-ran/cmake_targets/tools/test_helper \
|
||||
/opt/oai-physim/cmake_targets/tools/
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
OAI Test PLAN
|
||||
|
||||
Obj.# Case# Test# Description
|
||||
|
||||
01 pre-commit test case
|
||||
01 01 Build OAI
|
||||
01 01 00 Check Makefiles and
|
||||
01 01 01 Build oaisim Rel8
|
||||
01 01 02 Build oaisim Rel8 + network device driver(nasmesh_fix)
|
||||
01 01 03 Build lte-softmode Rel8
|
||||
01 01 04 Build dlsim Rel8
|
||||
01 01 05 Build ulsim Rel8
|
||||
01 01 06 Build oaisim Rel10
|
||||
01 01 07 Build oaisim Rel8 with cellular RRC for eNB
|
||||
01 01 08 Build oaisim Rel8 with cellular RRC for UE
|
||||
01 01 09 "commented test in targets/TEST/OAI/case01.py"
|
||||
01 01 10 "commented test in targets/TEST/OAI/case01.py"
|
||||
01 01 11 "commented test in targets/TEST/OAI/case01.py"
|
||||
01 01 12 "commented test in targets/TEST/OAI/case01.py"
|
||||
01 01 13 Build network device driver(oai_nw_drv type ethernet)
|
||||
01 01 14 Build oaisim Rel8 with RRC lite (new cellular+ITTI) + RAL (802.21)
|
||||
01 01 15 Build oaisim Rel10 with RRC lite (new cellular+ITTI) + RAL (802.21)
|
||||
|
||||
01 02 Run OAI Rel8, and check the operation
|
||||
01 02 00 Run OAI Rel8, and search for segmentation fault or exit
|
||||
01 02 01 Run OAI Rel8, and search for execution errors
|
||||
01 02 02 Run OAI Rel8 in abstraction mode and check that RRC proc is finished completely for the configured number of eNB and UE
|
||||
01 02 03 Run OAI Rel8 in abstraction mode, send ping from from one eNB to each UE, and check that there is no packet losses
|
||||
01 02 04 Run OAI Rel8 with full PHY, and check that the RRC proc for eNBsxUEs
|
||||
01 02 05 Run OAI Rel8 with full PHY in FDD mode, and check that the RRC proc for eNBsxUEs
|
||||
|
||||
01 03 Run OAI Rel10, and check the operation
|
||||
01 03 00 Run OAI Rel10, and search for segmentation fault or exit
|
||||
01 03 01 Run OAI Rel10, and search for execution errors
|
||||
01 03 02 Run OAI Rel10 in abstraction mode, and check the RRC proc for eNBsxUEs
|
||||
01 03 03 Run OAI Rel10 in full phy mode, and check the RRC proc for eNBsxUEs
|
||||
01 03 04 Run OAI Rel10 in full phy mode in FDD mode, and check the RRC proc for eNBsxUEs
|
||||
01 03 05 Run OAI Rel10 with eMBMS enabled, and check the SIB13 and MCCH
|
||||
01 03 06 Run OAI Rel10 with eMBMS enabled, and check the MTCH
|
||||
01 03 07 Run OAI Rel10 with eMBMS enabled and FDD mode, and check the MTCH
|
||||
|
||||
02 Functional test case
|
||||
|
||||
03 Non-Functional test case
|
||||
|
||||
04 Failure test case
|
||||
|
||||
05 Performance test case
|
||||
@@ -1,285 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file case01.py
|
||||
# \brief test case 01 for OAI: compilations
|
||||
# \author Navid Nikaein
|
||||
# \date 2013 - 2015
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import log
|
||||
import openair
|
||||
import core
|
||||
|
||||
makerr1 = '***'
|
||||
makerr2 = 'Error 1'
|
||||
|
||||
def execute(oai, user, pw, host, logfile,logdir,debug,timeout):
|
||||
|
||||
case = '01'
|
||||
rv = 1
|
||||
oai.send_recv('cd $OPENAIR_TARGETS;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '00'
|
||||
name = 'Check oai.svn.add'
|
||||
conf = 'svn st -q | grep makefile'
|
||||
diag = 'Makefile(s) changed. If you are adding a new file, make sure that it is added to the svn'
|
||||
rsp = oai.send_recv('svn st -q | grep -i makefile;')
|
||||
for item in rsp.split("\n"):
|
||||
if "Makefile" in item:
|
||||
rsp2=item.strip() + '\n'
|
||||
oai.find_false_re(rsp,'Makefile')
|
||||
except log.err, e:
|
||||
diag = diag + "\n" + rsp2
|
||||
#log.skip(case, test, name, conf, e.value, logfile)
|
||||
log.skip(case, test, name, conf, '', diag, logfile)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
oai.send('cd SIMU/USER;')
|
||||
oai.send('mkdir ' + logdir + ';')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '01'
|
||||
name = 'Compile oai.rel8.make'
|
||||
conf = 'make'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = "check the compilation errors for oai"
|
||||
oai.send('make cleanall;')
|
||||
oai.send('make cleanasn1;')
|
||||
oai.send('rm -f ./oaisim.rel8.'+host)
|
||||
oai.send_expect_false('make -j4 JF=1' + tee, makerr1, timeout)
|
||||
oai.send('cp ./oaisim ./oaisim.rel8.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '02'
|
||||
name = 'Compile oai.rel8.nas.make'
|
||||
conf = 'make nasmesh_fix; make LINK_ENB_PDCP_TO_IP_DRIVER=1'
|
||||
diag = 'check the compilation errors for oai and nas driver'
|
||||
oai.send('make cleanall;')
|
||||
oai.send('rm -f ./oaisim.rel8.nas'+host)
|
||||
oai.send('rm -f ./nasmesh;')
|
||||
oai.send('make nasmesh_clean;')
|
||||
trace = logdir + '/log_' + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('make nasmesh_fix' + tee, makerr1, 60)
|
||||
oai.send('cp $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko .')
|
||||
trace = logdir + '/log_' + case + test + '_2.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('make LINK_ENB_PDCP_TO_IP_DRIVER=1 JF=1 -j4' + tee, makerr1, timeout)
|
||||
oai.send('cp ./oaisim ./oaisim.rel8.nas.'+host)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
oai.send('cd $OPENAIR_TARGETS;')
|
||||
oai.send('cd RT/USER;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '03'
|
||||
name = 'Compile oai.rel8.rf.make'
|
||||
conf = 'make RTAI=0 EXMIMO=1 Rel8=1'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for Rel8'
|
||||
oai.send('make cleanall;')
|
||||
oai.send('rm -f ./oaisim.rel8.rf.'+host)
|
||||
oai.send_expect_false('make RTAI=0 EXMIMO=1 -j4' + tee, makerr1, timeout)
|
||||
oai.send('cp ./oaisim ./oaisim.rel8.rf.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
oai.send('cd $OPENAIR1_DIR;')
|
||||
oai.send('cd SIMULATION/LTE_PHY;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '04'
|
||||
name = 'Compile oai.rel8.phy.dlsim.make'
|
||||
conf = 'make dlsim'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for dlsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
|
||||
oai.send('make clean;')
|
||||
oai.send('rm -f ./dlsim.rel8.'+host)
|
||||
oai.send_expect_false('make dlsim -j4 PERFECT_CE=1' + tee, makerr1, timeout)
|
||||
oai.send('cp ./dlsim ./dlsim.rel8.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '05'
|
||||
name = 'Compile oai.rel8.phy.ulsim.make'
|
||||
conf = 'make ulsim'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for ulsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
|
||||
oai.send('make clean;')
|
||||
oai.send('rm -f ./ulsim.rel8.'+host)
|
||||
oai.send_expect_false('make ulsim -j4' + tee, makerr1, timeout)
|
||||
oai.send('cp ./ulsim ./ulsim.rel8.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
oai.send('cd $OPENAIR_TARGETS;')
|
||||
oai.send('cd SIMU/USER;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '06'
|
||||
name = 'Compile oai.rel8.itti.make'
|
||||
conf = 'make DISABLE_XER_PRINT=1 ENABLE_ITTI=1 Rel8=1'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for ITTI Rel8'
|
||||
oai.send('make clean;')
|
||||
oai.send('rm -f ./oaisim.rel8.itti.'+host)
|
||||
oai.send_expect_false('make DISABLE_XER_PRINT=1 ENABLE_ITTI=1 Rel8=1 -j4' + tee, makerr1, timeout)
|
||||
oai.send('cp ./oaisim ./oaisim.rel8.itti.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '07'
|
||||
name = 'Compile oai.rel10.make'
|
||||
conf = 'make RLC_STOP_ON_LOST_PDU=1 Rel10=1'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for Rel10'
|
||||
oai.send('make clean;')
|
||||
oai.send('make cleanall;')
|
||||
oai.send('make cleanasn1;')
|
||||
oai.send('rm -f ./oaisim.rel10.'+host)
|
||||
oai.send_expect_false('make RLC_STOP_ON_LOST_PDU=1 Rel10=1 -j4' + tee, makerr1, timeout)
|
||||
oai.send('cp ./oaisim ./oaisim.rel10.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '08'
|
||||
name = 'Compile oai.rel10.itti.make'
|
||||
conf = 'make DISABLE_XER_PRINT=1 ENABLE_ITTI=1 RLC_STOP_ON_LOST_PDU=1 Rel10=1'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for ITTI Rel10'
|
||||
oai.send('make cleanall;')
|
||||
oai.send('rm -f ./oaisim.rel10.itti.'+host)
|
||||
oai.send_expect_false('make DISABLE_XER_PRINT=1 ENABLE_ITTI=1 RLC_STOP_ON_LOST_PDU=1 Rel10=1 -j4' + tee, makerr1, timeout)
|
||||
oai.send('cp ./oaisim ./oaisim.rel10.itti.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '13'
|
||||
name = 'Compile oai_nw_ether IP driver'
|
||||
conf = 'make oai_nw_drv'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for ITTI Rel8'
|
||||
oai.send('make clean;')
|
||||
oai.send('make cleanall;')
|
||||
oai.send('make cleanasn1;')
|
||||
oai.send('rm -f ./oai_nw_drv;')
|
||||
oai.send('make oai_nw_drv_clean;')
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('make oai_nw_drv' + tee, makerr1, 60)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '14'
|
||||
name = 'Compile oai.rel8.itti.ral.make'
|
||||
conf = 'make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel8=1'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for ITTI Rel8'
|
||||
oai.send('make clean;')
|
||||
oai.send('make cleanall;')
|
||||
oai.send('make cleanasn1;')
|
||||
oai.send('rm -f ./oaisim.rel8.itti.ral.'+host)
|
||||
oai.send_expect_false('make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel8=1 -j4' + tee, makerr1, timeout)
|
||||
oai.send('cp ./oaisim ./oaisim.rel8.itti.ral.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '15'
|
||||
name = 'Compile oai.rel10.itti.ral.make'
|
||||
conf = 'make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel10=1'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for ITTI Rel10'
|
||||
oai.send('make clean;')
|
||||
oai.send('make cleanall;')
|
||||
oai.send('make cleanasn1;')
|
||||
oai.send('rm -f ./oaisim.rel10.itti.ral.'+host)
|
||||
oai.send_expect_false('make DISABLE_XER_PRINT=1 LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 ENABLE_ITTI=1 OPENAIR2=1 ENABLE_RAL=1 MIH_C_MEDIEVAL_EXTENSIONS=1 RLC_STOP_ON_LOST_PDU=1 Rel10=1 -j4' + tee, makerr1, timeout)
|
||||
oai.send('cp ./oaisim ./oaisim.rel10.itti.ral.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
return rv
|
||||
|
||||
|
||||
@@ -1,247 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file case02.py
|
||||
# \brief test case 02 for OAI: executions
|
||||
# \author Navid Nikaein
|
||||
# \date 2013 - 2015
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import time
|
||||
import random
|
||||
import log
|
||||
import openair
|
||||
import core
|
||||
|
||||
NUM_UE=2
|
||||
NUM_eNB=1
|
||||
NUM_TRIALS=3
|
||||
|
||||
def execute(oai, user, pw, host, logfile,logdir,debug):
|
||||
|
||||
case = '02'
|
||||
oai.send('cd $OPENAIR_TARGETS;')
|
||||
oai.send('cd SIMU/USER;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '00'
|
||||
name = 'Run oai.rel8.sf'
|
||||
conf = '-a -A AWGN -n 100'
|
||||
diag = 'OAI is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./oaisim.rel8.' + host + ' ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_2.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./oaisim.rel8.' + host + ' ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_3.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./oaisim.rel8.' + host + ' ' + conf + tee, 'FATAL', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '01'
|
||||
name = 'Run oai.rel8.err'
|
||||
conf = '-a -A AWGN -n 100 '
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = '[E] Error(s) found during the execution, check the execution logs'
|
||||
oai.send_expect_false('./oaisim.rel8.'+ host + ' ' + conf, '[E]', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '02'
|
||||
name = 'Run oai.rel8.tdd.5MHz.rrc.abs'
|
||||
diag = 'RRC procedure is not finished completely, check the execution logs and trace BCCH, CCCH, and DCCH channels'
|
||||
for i in range(NUM_UE) :
|
||||
for j in range(NUM_eNB) :
|
||||
conf = '-a -A AWGN -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1)
|
||||
trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '03'
|
||||
name = 'Run oai.rel8.tdd.5MHz.rrc.itti.abs'
|
||||
diag = 'RRC procedure is not finished completely, check the eNB config file (default is enb.band7.generic.conf), in addition to the execution logs and trace BCCH, CCCH, and DCCH channels'
|
||||
for i in range(NUM_UE) :
|
||||
for j in range(NUM_eNB) :
|
||||
log_name = logdir + '/log_' + host + case + test + '_' + str(i) + str(j)
|
||||
itti_name = log_name + '.log'
|
||||
trace_name = log_name + '.txt'
|
||||
conf = '-a -l7 -A AWGN --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name
|
||||
tee = ' 2>&1 | tee ' + trace_name
|
||||
command = './oaisim.rel8.itti.' + host + ' ' + conf
|
||||
oai.send('echo ' + command + ' > ' + trace_name + ';')
|
||||
oai.send_expect(command + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 500)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile, trace_name)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test='04'
|
||||
name = 'Run oai.rel8.tdd.5MHz.abs.ocg.otg'
|
||||
diag = 'Check the scenario if the test 0202 is passed.'
|
||||
conf = '-a -c26'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' DL and UL loss rate below 10 ', 500)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test='05'
|
||||
name = 'Run oai.rel8.fdd.5MHz.abs.ocg.otg'
|
||||
diag = 'Check the template 26 and the results of test 0202.'
|
||||
conf = '-a -F -c26'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' DL and UL loss rate below 10 ', 500)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '06'
|
||||
name = 'Run oai.rel8.tdd.5MHz.abs.ping'
|
||||
diag = 'Data-plane is not working normally, check the OAI protocol stack, OAI driver, and normal operation of the OS'
|
||||
|
||||
oai.driver(oai,user,pw)
|
||||
|
||||
for i in range(NUM_eNB) :
|
||||
for j in range(NUM_UE) :
|
||||
conf = '-a -A AWGN -u' + str(j+1) +' -b'+ str(i+1)
|
||||
trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt;'
|
||||
tee = ' 2>&1 > ' + trace
|
||||
|
||||
if user == 'root' :
|
||||
oai.send_nowait('./oaisim.rel8.nas.' + host + ' ' + conf + ' &')
|
||||
else :
|
||||
oai.send_nowait('echo '+pw+ ' | sudo -S -E ./oaisim.rel8.nas.'+ host + ' ' + conf + tee + ' &')
|
||||
time.sleep(10)
|
||||
for k in range(NUM_TRIALS) :
|
||||
trace_ping = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + str(k) + '_ping.txt;'
|
||||
tee_ping = ' 2>&1 | tee ' + trace_ping
|
||||
|
||||
oai.send_expect('ping 10.0.'+str(j+1)+'.'+str(NUM_eNB+i+1) + ' -c ' + str(random.randint(2, 10))+ ' -s ' + str(random.randint(128, 1500)) + tee_ping, ' 0% packet loss', 20)
|
||||
if user == 'root' :
|
||||
oai.send('pkill -f oaisim.rel8.nas.'+host)
|
||||
time.sleep(1)
|
||||
oai.send('pkill -f oaisim.rel8.nas.'+host)
|
||||
else :
|
||||
oai.send('pkill -f oaisim.rel8.nas.'+host)
|
||||
time.sleep(1)
|
||||
oai.send('echo '+pw+ ' | sudo -S pkill -f oaisim.rel8.nas.'+host)
|
||||
time.sleep(1)
|
||||
oai.send('echo '+pw+ ' | sudo -S pkill -f oaisim.rel8.nas.'+host)
|
||||
time.sleep(1)
|
||||
|
||||
oai.rm_driver(oai,user,pw)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '07'
|
||||
name = 'Run oai.rel8.tdd.5MHz.phy.rrc'
|
||||
diag = 'RRC procedure is not finished completely, check the execution logs and trace BCCH, CCCH, and DCCH channels'
|
||||
for i in range(NUM_UE) :
|
||||
for j in range(NUM_eNB) :
|
||||
conf = '-A AWGN -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -x1'
|
||||
trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 500)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '08'
|
||||
name = 'Run oai.rel8.fdd.5MHz.phy.rrc'
|
||||
diag = 'RRC procedure is not finished completely in FDD mode, check the execution logs and trace BCCH, CCCH, and DCCH channels'
|
||||
for i in range(NUM_UE) :
|
||||
for j in range(NUM_eNB) :
|
||||
conf = '-A AWGN -F -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -x1'
|
||||
trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 500)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '09'
|
||||
name = 'Run oai.rel8.fdd.10MHz.phy.rrc'
|
||||
diag = 'RRC procedure is not finished completely, check th execution logs and trace BCCH, CCCH, and DCCH channels and the results of test 0204'
|
||||
conf = '-A AWGN -F -R 50 -n 150 -u 1 -b 1 -x1'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE 0', 600)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '10'
|
||||
name = 'Run oai.rel8.fdd.20MHz.phy.rrc'
|
||||
diag = 'RRC procedure is not finished completely, check th execution logs and trace BCCH, CCCH, and DCCH channels and the results of test 0204'
|
||||
conf = '-A AWGN -F -R 100 -n 200 -u 1 -b 1 -x1'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel8.' + host + ' ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE 0', 700)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
@@ -1,208 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file case03.py
|
||||
# \brief test case 03 for OAI: executions
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import time
|
||||
import random
|
||||
import log
|
||||
import openair
|
||||
import core
|
||||
|
||||
NUM_UE=2
|
||||
NUM_eNB=1
|
||||
NUM_TRIALS=3
|
||||
|
||||
def execute(oai, user, pw, host, logfile,logdir,debug):
|
||||
|
||||
case = '03'
|
||||
oai.send('cd $OPENAIR_TARGETS;')
|
||||
oai.send('cd SIMU/USER;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '00'
|
||||
name = 'Run oai.rel10.sf'
|
||||
conf = '-a -A AWGN -l7 -n 100'
|
||||
diag = 'OAI is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./oaisim.rel10.' + host + ' ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_2.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./oaisim.rel10.' + host + ' ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_3.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./oaisim.rel10.' + host + ' ' + conf + tee, 'FATAL', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '01'
|
||||
name = 'Run oai.rel10.err'
|
||||
conf = '-a -A AWGN -l7 -n 100'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'Error(s) found in the execution, check the execution logs'
|
||||
oai.send_expect_false('./oaisim.rel10.' + host + ' ' + conf + tee, '[E]', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '02'
|
||||
name = 'Run oai.rel10.tdd.5MHz.abs.rrc'
|
||||
diag = 'RRC procedure is not finished completely, check the execution logs and trace BCCH, CCCH, and DCCH channels'
|
||||
for i in range(NUM_UE) :
|
||||
for j in range(NUM_eNB) :
|
||||
conf = '-a -l7 -A AWGN -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1)
|
||||
trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel10.' + host + ' ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 100)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '03'
|
||||
name = 'Run oai.rel10.tdd.5MHz.phy.rrc'
|
||||
diag = 'RRC procedure is not finished completely, check the execution logs and trace BCCH, CCCH, and DCCH channels'
|
||||
for i in range(NUM_UE) :
|
||||
for j in range(NUM_eNB) :
|
||||
conf = '-A AWGN -l7 -x 1 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1)
|
||||
trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel10.' + host + ' ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 500)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '04'
|
||||
name = 'Run oai.rel10.fdd.5MHz.phy.rrc'
|
||||
diag = 'RRC procedure is not finished completely in FDD mode, check the execution logs and trace BCCH, CCCH, and DCCH channels'
|
||||
for i in range(NUM_UE) :
|
||||
for j in range(NUM_eNB) :
|
||||
conf = '-A AWGN -l7 -F -x 1 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1)
|
||||
trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect('./oaisim.rel10.' + host + ' ' + conf + tee, ' Received RRCConnectionReconfigurationComplete from UE ' + str(i), (i+1) * 500)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
|
||||
# try:
|
||||
# test = '05'
|
||||
# name = 'Run oai.rel10.phy.eMBMS.MCCH'
|
||||
# diag = 'eMBMS procedure is not finished completely, make sure that the SIB13/MCCH have been correclty received by UEs'
|
||||
# for i in range(NUM_UE) :
|
||||
# for j in range(NUM_eNB) :
|
||||
# conf = '-A AWGN -l7 -x 1 -Q3 -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1)
|
||||
# trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt'
|
||||
# tee = ' 2>&1 | tee ' + trace
|
||||
# oai.send_expect('./oaisim.rel10.' + host + ' ' + conf + tee, ' Found MBSFNAreaConfiguration from eNB ' + str(j), (i+1) * 200)
|
||||
# except log.err, e:
|
||||
# log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
# else:
|
||||
# log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
# try:
|
||||
# test = '06'
|
||||
# name = 'Run oai.rel10.phy.eMBMS.OTG'
|
||||
# diag = 'eMBMS multicast/broadcast data is not received, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs'
|
||||
# for i in range(NUM_UE) :
|
||||
# for j in range(NUM_eNB) :
|
||||
# conf = '-A AWGN -l7 -x 1 -T mscbr -Q3 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1)
|
||||
# trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt'
|
||||
# tee = ' 2>&1 | tee ' + trace
|
||||
# oai.send_expect('./oaisim.rel10.' + host + ' ' + conf + tee, ' Received a multicast packet', (i+1) * 200)
|
||||
# except log.err, e:
|
||||
# log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
# else:
|
||||
# log.ok(case, test, name, conf, 'Note: check the packet loss from the OTG stats', logfile)
|
||||
|
||||
# try:
|
||||
# test = '07'
|
||||
# name = 'Run oai.rel10.phy.eMBMS.OTG.fdd'
|
||||
# diag = 'eMBMS multicast/broadcast data is not received in fdd mode, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs'
|
||||
# for i in range(NUM_UE) :
|
||||
# for j in range(NUM_eNB) :
|
||||
# conf = '-A AWGN -l7 -F -x 1 -T mscbr -Q3 -n' + str((i+1+j) * 100) + ' -u' + str(i+1) +' -b'+ str(j+1)
|
||||
# trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt'
|
||||
# tee = ' 2>&1 | tee ' + trace
|
||||
# oai.send_expect('./oaisim.rel10.' + host + ' ' + conf + tee, ' Received a multicast packet', (i+1) * 200)
|
||||
# except log.err, e:
|
||||
# log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
# else:
|
||||
# log.ok(case, test, name, conf, 'Note: check the packet loss from the OTG stats', logfile)
|
||||
|
||||
# try:
|
||||
# test = '08'
|
||||
# name = 'Run oai.rel10.phy.eMBMS.Relay.OTG.fdd'
|
||||
# diag = 'eMBMS multicast/broadcast DF relaying is not working properly in fdd mode, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs'
|
||||
# conf = '-c43 -F -T mbvbr -Q4 -j1 -n120'
|
||||
# tee = ' | tee ' + logs_dir + '/log_' + case + test + '.txt'
|
||||
# oai.send_expect('./oaisim.rel10 ' + conf + tee, ' MTCH for sync area 1', 100)
|
||||
# except log.err, e:
|
||||
# log.fail(case, test, name, conf, e.value, diag, logfile)
|
||||
# else:
|
||||
# log.ok(case, test, name, conf, 'Note: check the packet loss from the OTG stats', logfile)
|
||||
|
||||
# try:
|
||||
# test = '09'
|
||||
# name = 'Run oai.rel10.itti.phy.eMBMS.MCCH'
|
||||
# diag = 'eMBMS procedure is not finished completely, check the eNB config file (enb.band7.generic.conf), and make sure that the SIB13/MCCH have been correclty received by UEs'
|
||||
# for i in range(NUM_UE) :
|
||||
# for j in range(NUM_eNB) :
|
||||
# log_name = logdir + '/log_' + host + case + test + '_' + str(i) + str(j)
|
||||
# itti_name = log_name + '.log'
|
||||
# trace_name = log_name + '.txt'
|
||||
# conf = '-A AWGN -l7 -x 1 -Q3 --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name
|
||||
# tee = ' 2>&1 | tee -a ' + trace_name
|
||||
# command = './oaisim.rel10.itti.' + host + ' ' + conf
|
||||
# oai.send('echo ' + command + ' > ' + trace_name + ';')
|
||||
# oai.send_expect(command + tee, ' Found MBSFNAreaConfiguration from eNB ' + str(j), (i+1) * 200)
|
||||
# except log.err, e:
|
||||
# log.fail(case, test, name, conf, e.value, diag, logfile, trace_name)
|
||||
# else:
|
||||
# log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file case04.py
|
||||
# \brief test case 04 for OAI: executions
|
||||
# \author Navid Nikaein
|
||||
# \date 2013 - 2015
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import time
|
||||
import random
|
||||
import log
|
||||
import openair
|
||||
import core
|
||||
|
||||
NUM_UE=2
|
||||
NUM_eNB=1
|
||||
NUM_TRIALS=3
|
||||
|
||||
def execute(oai, user, pw, host, logfile,logdir,debug):
|
||||
|
||||
case = '04'
|
||||
oai.send('cd $OPENAIR1_DIR;')
|
||||
oai.send('cd SIMULATION/LTE_PHY;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '00'
|
||||
name = 'Perf oai.dlsim.sanity'
|
||||
conf = '-a -A AWGN -n 100'
|
||||
diag = 'dlsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8.' + host + ' ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_2.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8.' + host + ' ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_3.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8.' + host + ' ' + conf + tee, 'FATAL', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '01'
|
||||
name = 'Perf oai.dlsim.test1'
|
||||
diag = 'Test 1, 10 MHz, R2.FDD (MCS 5), EVA5, -1dB'
|
||||
conf = '-m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test +'.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
# try:
|
||||
# test = '05'
|
||||
# name = 'Perf oai.dlsim.test5'
|
||||
# diag = 'Test 5, 1.4 MHz, R4.FDD (MCS 4), EVA5, 0dB (70%)'
|
||||
# conf = '-m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O70'
|
||||
# trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
# tee = ' 2>&1 | tee ' + trace
|
||||
# cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
# oai.send_expect(cmd, 'passed', 150)
|
||||
# except log.err, e:
|
||||
# log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
# else:
|
||||
# log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '06'
|
||||
name = 'Perf oai.dlsim.test6'
|
||||
diag = 'Test 6, 10 MHz, R3.FDD (MCS 15), EVA5, 6.7dB (70%)'
|
||||
conf = '-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '06b'
|
||||
name = 'Perf oai.dlsim.test6b'
|
||||
diag = 'Test 6b, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (70%)'
|
||||
conf = '-m14 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '07'
|
||||
name = 'Perf oai.dlsim.test7'
|
||||
diag = 'Test 6b, 5 MHz, R3-1.FDD (MCS 15), EVA5, 6.7dB (30%)'
|
||||
conf = '-m15 -gG -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O30 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '07b'
|
||||
name = 'Perf oai.dlsim.test7b'
|
||||
diag = 'Test 7b, 5 MHz, R3-1.FDD (MCS 15), ETU70, 1.4 dB (30%)'
|
||||
conf = '-m14 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O30 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '10'
|
||||
name = 'Perf oai.dlsim.test10'
|
||||
diag = 'Test 10, 5 MHz, R6.FDD (MCS 25), EVA5, 17.4 dB (70%)'
|
||||
conf = '-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '10b'
|
||||
name = 'Perf oai.dlsim.test10b'
|
||||
diag = 'Test 10b, 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)'
|
||||
conf = '-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '11'
|
||||
name = 'Perf oai.dlsim.test11'
|
||||
diag = 'Test 11, 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)'
|
||||
conf = '-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
cmd = 'taskset -c 0 ./dlsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file case05.py
|
||||
# \brief test case 05 for OAI: executions
|
||||
# \author Navid Nikaein
|
||||
# \date 2013 - 2015
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import time
|
||||
import random
|
||||
import log
|
||||
import openair
|
||||
import core
|
||||
|
||||
NUM_UE=2
|
||||
NUM_eNB=1
|
||||
NUM_TRIALS=3
|
||||
|
||||
def execute(oai, user, pw, host,logfile,logdir,debug):
|
||||
|
||||
case = '04'
|
||||
oai.send('cd $OPENAIR1_DIR;')
|
||||
oai.send('cd SIMULATION/LTE_PHY;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '00'
|
||||
name = 'Perf oai.ulsim.sanity'
|
||||
conf = '-a -A AWGN -n 100'
|
||||
diag = 'ulsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.rel8.' + host + ' ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_2.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.rel8.' + host + ' ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_3.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.rel8.' + host + ' ' + conf + tee, 'FATAL', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '01'
|
||||
name = 'Perf oai.ulsim.test1'
|
||||
diag = 'Test 1, 5 MHz, FDD (MCS 5), AWGN, 6dB'
|
||||
conf = '-B25 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test +'.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
#print test + 'not performed'
|
||||
cmd = 'taskset -c 0 ./ulsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '02'
|
||||
name = 'Perf oai.ulsim.test2'
|
||||
diag = 'Test 2, 5 MHz, FDD (MCS 16), AWGN , 12dB (70%)'
|
||||
conf = '-B25 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
#print test + 'not performed'
|
||||
cmd = 'taskset -c 0 ./ulsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '03'
|
||||
name = 'Perf oai.ulsim.test3'
|
||||
diag = 'Test 3, 10 MHz, R3.FDD (MCS 5), AWGN, 6dB (70%)'
|
||||
conf = '-B50 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
#print test + 'not performed'
|
||||
cmd = 'taskset -c 0 ./ulsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '04'
|
||||
name = 'Perf oai.ulsim.test4'
|
||||
diag = 'Test 4, 10 MHz, R3-1.FDD (MCS 16), AWGN, 12dB (70%)'
|
||||
conf = '-B50 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
#print test + 'not performed'
|
||||
cmd = 'taskset -c 0 ./ulsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '05'
|
||||
name = 'Perf oai.ulsim.test7'
|
||||
diag = 'Test 5, 20 MHz, FDD (MCS 5), AWGN, 6dB (70%)'
|
||||
conf = '-B100 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
#print test + 'not performed'
|
||||
cmd = 'taskset -c 0 ./ulsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '06'
|
||||
name = 'Perf oai.ulsim.test10'
|
||||
diag = 'Test 06, 20 MHz, FDD (MCS 16), AWGN, 12 dB (70%)'
|
||||
conf = '-B100 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L'
|
||||
trace = logdir + '/log_' + host + case + test + '.txt'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
#print test + 'not performed'
|
||||
cmd = 'taskset -c 0 ./ulsim.rel8.' + host + ' ' + conf + tee
|
||||
oai.send_expect(cmd, 'passed', 150)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file case01.py
|
||||
# \brief test case 01 for OAI: compilations
|
||||
# \author Navid Nikaein
|
||||
# \date 2014
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import log
|
||||
import openair
|
||||
import core
|
||||
|
||||
makerr1 = '***'
|
||||
makerr2 = 'Error 1'
|
||||
|
||||
|
||||
def execute(oai, user, pw, host,logfile,logdir,debug):
|
||||
|
||||
case = '101'
|
||||
rv = 1;
|
||||
oai.send('cd $OPENAIR1_DIR;')
|
||||
oai.send('cd SIMULATION/LTE_PHY;')
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '01'
|
||||
name = 'Compile oai.rel8.phy.dlsim.make'
|
||||
conf = 'make dlsim' # PERFECT_CE=1 # for perfect channel estimation
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for dlsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
|
||||
oai.send('make clean; make cleanall;')
|
||||
oai.send('rm -f ./dlsim.rel8.'+host)
|
||||
oai.send_expect_false('make dlsim -j4' + tee, makerr1, 1500)
|
||||
oai.send('cp ./dlsim ./dlsim.rel8.'+host)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv =0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = '02'
|
||||
name = 'Compile oai.rel8.phy.ulsim.make'
|
||||
conf = 'make ulsim'
|
||||
trace = logdir + '/log_' + case + test + '.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
diag = 'check the compilation errors for ulsim in $OPENAIR1_DIR/SIMULATION/LTE_PHY'
|
||||
oai.send('make cleanall;')
|
||||
oai.send('rm -f ./ulsim.rel8.'+host)
|
||||
oai.send_expect_false('make ulsim -j4' + tee, makerr1, 1500)
|
||||
oai.send('cp ./ulsim ./ulsim.rel8.'+host)
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
rv = 0
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
return rv
|
||||
@@ -1,143 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file case02.py
|
||||
# \brief test case 02 for OAI: executions
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import time
|
||||
import random
|
||||
import log
|
||||
import openair
|
||||
import core
|
||||
import os
|
||||
|
||||
|
||||
import shutil # copy file
|
||||
|
||||
NUM_UE=1
|
||||
NUM_eNB=1
|
||||
NUM_TRIALS=3
|
||||
|
||||
PRB=[25,50,100]
|
||||
MCS=[0,4,9,10,13,16,17,22,27]
|
||||
#PRB=[100]
|
||||
#MCS=[27]
|
||||
#SNR=[0,0,0,0,0,0,0,0,0]
|
||||
ANT_TX=2 # 2
|
||||
ANT_RX=2 # 2
|
||||
PDCCH=2 #, 2, 3, 4
|
||||
CHANNEL=["N"]
|
||||
#CHANNEL=["C","E","F","G","H","I","L","M"]
|
||||
TX_MODE=2 # 2,
|
||||
MIN_SNR=0
|
||||
MAX_SNR=40
|
||||
PERF=75
|
||||
OPT="-L"
|
||||
FRAME=2000
|
||||
|
||||
#OPT="-L -d" # 8bit decoder , activate dci decoding at UE
|
||||
|
||||
|
||||
def execute(oai, user, pw, host, logfile,logdir,debug,cpu):
|
||||
|
||||
case = '10'
|
||||
oai.send('cd $OPENAIR1_DIR;')
|
||||
oai.send('cd SIMULATION/LTE_PHY;')
|
||||
try:
|
||||
log.start()
|
||||
test = '200'
|
||||
name = 'Run oai.dlsim.sanity'
|
||||
conf = '-a -n 100'
|
||||
diag = 'dlsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_2.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_3.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./dlsim.rel8.'+ host + ' ' + conf + tee, 'FATAL', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = 210
|
||||
|
||||
name = 'Run oai.dlsim.perf.'+str(PERF)+'%'
|
||||
diag = 'no diagnostic is available, check the log file'
|
||||
for i in range(len(PRB)):
|
||||
for o in range(len(CHANNEL)):
|
||||
MIN_SNR = 0
|
||||
for j in range(len(MCS)):
|
||||
for k in range(1,ANT_TX):
|
||||
for m in range (1,ANT_RX):
|
||||
for n in range(1,PDCCH):
|
||||
for p in range(1,TX_MODE):
|
||||
for q in range(MIN_SNR,MAX_SNR):
|
||||
#if if PRB[i] :
|
||||
|
||||
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(k) + ' -z'+str(m) +' -c'+str(n) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -f.1 -P -n'+str(FRAME)+' -O'+str(PERF) +' '+ OPT
|
||||
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_anttx' + str(k)+ '_antrx' + str(m) + '_pdcch' + str(n) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
if cpu > -1 :
|
||||
cmd = 'taskset -c '+ str(cpu) + ' ./dlsim.rel8.'+ host + ' ' + conf + tee
|
||||
else :
|
||||
cmd = './dlsim.rel8.'+ host + ' ' + conf + tee
|
||||
|
||||
if debug :
|
||||
print cmd
|
||||
|
||||
match = oai.send_expect_re(cmd, 'passed', 0, 1000)
|
||||
|
||||
if match :
|
||||
#SNR[j]=q
|
||||
log.ok(case, str(test), name, conf, '', logfile)
|
||||
MIN_SNR = q -1 # just to speed up the test
|
||||
test+=1
|
||||
break # found the smallest snr
|
||||
else :
|
||||
if q == MAX_SNR -1 :
|
||||
log.skip(case,str(test), name, conf,'','',logfile)
|
||||
test+=1
|
||||
break # do not remove the last log file
|
||||
try:
|
||||
if os.path.isfile(trace) :
|
||||
os.remove(trace)
|
||||
|
||||
except OSError, e: ## if failed, report it back to the user ##
|
||||
print ("Error: %s - %s." % (e.filename,e.strerror))
|
||||
|
||||
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, str(test), name, conf, e.value, diag, logfile,trace)
|
||||
#else:
|
||||
# log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file case02.py
|
||||
# \brief test case 02 for OAI: executions
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import time
|
||||
import random
|
||||
import log
|
||||
import openair
|
||||
import core
|
||||
import os
|
||||
|
||||
|
||||
import shutil # copy file
|
||||
|
||||
NUM_UE=1
|
||||
NUM_eNB=1
|
||||
NUM_TRIALS=3
|
||||
|
||||
PRB=[25,50,100]
|
||||
MCS=[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]
|
||||
#MCS=[0,4,9,10,13,16,17,22,27]
|
||||
#PRB=[100]
|
||||
#MCS=[16]
|
||||
ANT_TX=2 # 2
|
||||
ANT_RX=2 # 2
|
||||
CHANNEL=["N"]
|
||||
#CHANNEL=["C","E","F","G","H","I","L","M"] # A,B,C,D,E,F,
|
||||
TX_MODE=2 # 2,
|
||||
MIN_SNR=10
|
||||
MAX_SNR=40
|
||||
PERF=75
|
||||
OPT="-L"
|
||||
FRAME=2000
|
||||
#OPT="-L -d" # 8bit decoder , activate dci decoding at UE
|
||||
|
||||
|
||||
|
||||
def execute(oai, user, pw, host,logfile,logdir,debug,cpu):
|
||||
|
||||
case = '10'
|
||||
oai.send('cd $OPENAIR_TARGETS;')
|
||||
oai.send('cd bin;')
|
||||
oai.send('cp ./ulsim.Rel10 ./ulsim.Rel10.'+host)
|
||||
try:
|
||||
log.start()
|
||||
test = '300'
|
||||
name = 'Run oai.ulsim.sanity'
|
||||
conf = '-a -n 100'
|
||||
diag = 'ulsim is not running normally (Segmentation fault / Exiting / FATAL), debugging might be needed'
|
||||
trace = logdir + '/log_' + host + case + test + '_1.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.Rel10.'+ host + ' ' + conf + tee, 'Segmentation fault', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_2.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.Rel10.'+ host + ' ' + conf + tee, 'Exiting', 30)
|
||||
trace = logdir + '/log_' + host + case + test + '_3.txt;'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
oai.send_expect_false('./ulsim.Rel10.'+ host + ' ' + conf + tee, 'FATAL', 30)
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, test, name, conf, e.value, diag, logfile,trace)
|
||||
else:
|
||||
log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
try:
|
||||
log.start()
|
||||
test = 310
|
||||
name = 'Run oai.ulsim.perf.'+str(PERF)+'%'
|
||||
diag = 'no diagnostic is available, check the log file'
|
||||
for i in range(len(PRB)):
|
||||
for o in range(len(CHANNEL)):
|
||||
MIN_SNR=10
|
||||
for j in range(len(MCS)):
|
||||
for m in range (1,ANT_RX):
|
||||
for p in range(1,TX_MODE):
|
||||
for r in range(5,PRB[i]):
|
||||
for q in range(MIN_SNR,MAX_SNR):
|
||||
|
||||
|
||||
if r ==7 or r ==11 or r ==14 or r == 17 or r==19 or r == 21 or r == 23 or r == 26 or r == 28 :
|
||||
continue
|
||||
|
||||
conf = '-B' + str(PRB[i]) + ' -r'+str(r) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF)+' '+ OPT
|
||||
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+ '_rb'+str(r)+'_mcs'+ str(MCS[j])+ '_antrx' + str(m) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
|
||||
tee = ' 2>&1 | tee ' + trace
|
||||
if cpu > -1 :
|
||||
cmd = 'taskset -c ' + str(cpu) + ' ./ulsim.Rel10.'+ host + ' ' + conf + tee
|
||||
else :
|
||||
cmd = './ulsim.Rel10.'+ host + ' ' + conf + tee
|
||||
|
||||
if debug :
|
||||
print cmd
|
||||
|
||||
match = oai.send_expect_re(cmd, 'passed', 0, 1000)
|
||||
#match =1
|
||||
if match :
|
||||
|
||||
log.ok(case, str(test), name, conf, '', logfile)
|
||||
MIN_SNR = q - 1 # just to speed up the test
|
||||
test+=1
|
||||
break # found the smallest snr
|
||||
else :
|
||||
if q == MAX_SNR -1 :
|
||||
log.skip(case,str(test), name, conf,'','',logfile)
|
||||
test+=1
|
||||
break
|
||||
try:
|
||||
if os.path.isfile(trace) :
|
||||
os.remove(trace)
|
||||
except OSError, e: ## if failed, report it back to the user ##
|
||||
print ("Error: %s - %s." % (e.filename,e.strerror))
|
||||
|
||||
|
||||
|
||||
except log.err, e:
|
||||
log.fail(case, str(test), name, conf, e.value, diag, logfile,trace)
|
||||
#else:
|
||||
# log.ok(case, test, name, conf, '', logfile)
|
||||
|
||||
@@ -1,334 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file core.py
|
||||
# \brief OAI core testing class that provides various primitives to send/recv cmd to openair class searching for patterns and process the responses and tag the test case as passed/failed/skipped
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
|
||||
import pexpect
|
||||
import time
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
import os
|
||||
|
||||
import openair
|
||||
import log
|
||||
|
||||
class core:
|
||||
def __init__(self):
|
||||
self.send_cr = 1
|
||||
self.expect_echo = 0
|
||||
self.expect_response = 1
|
||||
self.flag_errors = 1
|
||||
self.log = None
|
||||
|
||||
def clean(self, obj):
|
||||
if type(obj) is str:
|
||||
return obj
|
||||
else:
|
||||
return repr(obj)
|
||||
|
||||
def mark(self, marker):
|
||||
if self.log:
|
||||
print >> self.log, "\n\n{" + marker + "}\n\n"
|
||||
|
||||
def expected(self, expected, got):
|
||||
return "================================= Failure ===================================\n"+\
|
||||
"_________________________________ Expected __________________________________\n"+\
|
||||
"--->" + expected + "<-\n" +\
|
||||
"_________________________________ Received __________________________________\n"+\
|
||||
"--->" + got + "<-\n" +\
|
||||
"=============================================================================\n"
|
||||
|
||||
def unexpected(self, notexpected, got):
|
||||
return "================================= Failure ===================================\n"+\
|
||||
"__________________________ not expect to find _______________________________\n"+\
|
||||
"---> " + self.clean(notexpected) + "\n" +\
|
||||
"_________________________________ Received___________________________________\n"+\
|
||||
"---> " + self.clean(got) + "\n" +\
|
||||
"=============================================================================\n"
|
||||
|
||||
def failed(self, command, expect,debug):
|
||||
time.sleep(2)
|
||||
ret = "================================= Failure =================================\n"
|
||||
ret +="_________________________________ Sent ____________________________________\n"
|
||||
ret +="---> " + command + "\n"
|
||||
ret +="______________________________Searching for _______________________________\n"
|
||||
ret +="---> " + self.clean(expect) + "\n"
|
||||
if debug >= 1 :
|
||||
ret +="________________________________ Received _________________________________\n"
|
||||
ret +="---> " + self.clean(self.oai.before) + "\n"
|
||||
ret +="_______________________________ Remaining _________________________________\n"
|
||||
ret +="---> " + self.clean(self.oai.after) + "\n"
|
||||
ret +="===========================================================================\n"
|
||||
return ret
|
||||
|
||||
def err(self, command):
|
||||
return "============================ Error received ================================\n"+\
|
||||
"__________________________________ Sent ____________________________________\n"+\
|
||||
'---> ' + command + "\n"+\
|
||||
"_________________________________ Error was ________________________________\n"+\
|
||||
"---> " + self.oai.before + "\n" +\
|
||||
"============================================================================\n"
|
||||
|
||||
|
||||
def wait_quiet(self, timeout=0.5):
|
||||
while 1:
|
||||
try:
|
||||
self.oai.expect(['..*'], timeout=0.5)
|
||||
except pexpect.TIMEOUT, e:
|
||||
return
|
||||
# print '[Flushing ' + self.oai.after + ']'
|
||||
|
||||
# **************************Send*****************************
|
||||
# 1) send a command and return, do not wait
|
||||
# ************************************************************
|
||||
def send_nowait(self, command):
|
||||
rsp1 = self.prompt1
|
||||
rsp2 = self.prompt2
|
||||
self.wait_quiet()
|
||||
if self.send_cr:
|
||||
log.stats['cmd'] += 1
|
||||
self.oai.sendline(command)
|
||||
else:
|
||||
self.oai.send(command)
|
||||
|
||||
|
||||
# **************************Send*****************************
|
||||
# 1) send a command
|
||||
# 2) wait for a return prompt. Don't capture the response.
|
||||
# 3) Check for error or timeout.
|
||||
# ************************************************************
|
||||
def send(self, command, timeout = 50, rsp1=None, rsp2=None,debug=0):
|
||||
if not rsp1:
|
||||
rsp1 = self.prompt1
|
||||
if not rsp2:
|
||||
rsp2 = self.prompt2
|
||||
self.wait_quiet()
|
||||
if self.send_cr:
|
||||
log.stats['cmd'] += 1
|
||||
self.oai.sendline(command)
|
||||
else:
|
||||
self.oai.send(command)
|
||||
|
||||
if self.expect_echo:
|
||||
#cmd = self.oai.expect([re.escape(command), pexpect.TIMEOUT], timeout=timeout);
|
||||
cmd = self.oai.expect_exact([command, pexpect.TIMEOUT], timeout=timeout);
|
||||
if cmd != 0:
|
||||
raise log.err(self.failed(command, command,debug))
|
||||
|
||||
if self.expect_response:
|
||||
#index = self.oai.expect([re.escape(rsp1), re.escape(rsp2),'%', pexpect.TIMEOUT], timeout=timeout)
|
||||
index = self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout)
|
||||
|
||||
if index == 0 or index == 1:
|
||||
return 'OK'
|
||||
elif index == 2:
|
||||
#self.oai.expect([re.escape(rsp1), re.escape(rsp2), pexpect.TIMEOUT], timeout=timeout)
|
||||
self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout)
|
||||
if self.flag_errors:
|
||||
raise log.err(self.err(command))
|
||||
else:
|
||||
return 'OK'
|
||||
else:
|
||||
raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug))
|
||||
|
||||
# **************************send_recv*************************
|
||||
# 1) send a command
|
||||
# 2) wait for either rsp1 or rsp2 is found (normally prompts)
|
||||
# 3) return everything seen before that
|
||||
# ************************************************************
|
||||
def send_recv(self, command, timeout=50, rsp1=None, rsp2=None,debug=0):
|
||||
if not rsp1:
|
||||
rsp1 = self.prompt1
|
||||
if not rsp2:
|
||||
rsp2 = self.prompt2
|
||||
self.wait_quiet()
|
||||
if self.send_cr:
|
||||
log.stats['cmd'] += 1
|
||||
self.oai.sendline(command)
|
||||
else:
|
||||
self.oai.send(command)
|
||||
#index = self.oai.expect([re.escape(rsp1), re.escape(rsp2), pexpect.TIMEOUT], timeout=timeout);
|
||||
index = self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout);
|
||||
if index == 0 or index == 1 :
|
||||
return self.oai.before
|
||||
else:
|
||||
raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug))
|
||||
|
||||
|
||||
# **************************send_expect*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern in the response
|
||||
# 3) raise an error if not found
|
||||
# **************************************************************
|
||||
def send_expect(self, command, expect, delay = 50, rsp1=None, rsp2=None,debug=0):
|
||||
if debug :
|
||||
print command
|
||||
print expect
|
||||
print delay
|
||||
rsp = self.send_recv(command, delay, rsp1, rsp2)
|
||||
#print rsp
|
||||
if (rsp.find(expect) != -1):
|
||||
return 'Ok'
|
||||
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
|
||||
# **************************send_expect_re*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern defined by a regular expression in the response
|
||||
# 3) return a error if raise_err flag is set and re not found, otherwise return 'Ok'
|
||||
# *****************************************************************
|
||||
def send_expect_re(self, command, expect, raise_err=1, delay = 50, rsp1=None, rsp2=None,debug=0):
|
||||
rsp = self.send_recv(command, delay, rsp1, rsp2)
|
||||
# print rsp
|
||||
match = re.compile(expect).search(rsp)
|
||||
if match:
|
||||
return match
|
||||
if raise_err:
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
else :
|
||||
return None
|
||||
|
||||
# **************************send_expect*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern defined by a re in the response
|
||||
# 3) return ok if not found
|
||||
# **************************************************************
|
||||
def send_expect_false(self, command, expect, delay = 5, rsp1=None, rsp2=None,debug=0):
|
||||
rsp = self.send_recv(command, delay, rsp1, rsp2)
|
||||
# print rsp
|
||||
if (rsp.find(expect) == -1):
|
||||
return 'OK'
|
||||
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
|
||||
# **************************send_wait*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern in the response
|
||||
# 3) retry for a numretries if not found
|
||||
# 4) return an error if not found after the numtries
|
||||
# 3) return the response if found
|
||||
# **************************************************************
|
||||
def send_wait(self, command, expect, numretries=3, rsp1=None, rsp2=None,debug=0):
|
||||
timer = 0
|
||||
for i in range(numretries):
|
||||
rsp = self.send_recv(command, 10, rsp1, rsp2)
|
||||
if (rsp.find(expect) != -1):
|
||||
return rsp;
|
||||
time.sleep(2)
|
||||
timer = timer+2
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
# **************************send_wait_re*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expected pattern defined by a re in the response
|
||||
# 3) retry for a numretries if not found
|
||||
# 4) return an error if not found after the numtries
|
||||
# 3) return the response if found
|
||||
# **************************************************************
|
||||
def send_wait_re(self, command, expect, numretries=3, rsp1=None, rsp2=None,debug=0):
|
||||
timer = 0
|
||||
for i in range(numretries):
|
||||
rsp = self.send_recv(command)
|
||||
if re.compile(expect).search(rsp):
|
||||
# print "Found in",i,"attempts"
|
||||
return rsp;
|
||||
time.sleep(2)
|
||||
timer = timer+2
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
# **************************send_wait_false*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expect pattern in the response
|
||||
# 3) return the response if not found
|
||||
# 4) return an error if the pattern found after the numtries
|
||||
# **************************************************************
|
||||
def send_wait_false(self, command, expect, numretries=3, rsp1=None, rsp2=None,debug=0):
|
||||
timer = 1
|
||||
for i in range(numretries):
|
||||
rsp = self.send_recv(command)
|
||||
if (rsp.find(expect) == -1):
|
||||
return rsp;
|
||||
time.sleep(2)
|
||||
timer = timer+2
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
# **************************send_wait_false*************************
|
||||
# 1) send a command, and optionally specify a the time to wait
|
||||
# 2) search for an expect pattern defined by a re in the response
|
||||
# 3) return the response if not found
|
||||
# 4) return an error if the pattern found after the numtries
|
||||
# **************************************************************
|
||||
def send_wait_false_re(self, command, expect, numretries=3, rsp1=None, rsp2=None,debug=0):
|
||||
timer = 0
|
||||
for i in range(numretries):
|
||||
rsp = self.send_recv(command)
|
||||
if not re.compile(expect).search(rsp):
|
||||
return rsp;
|
||||
time.sleep(2)
|
||||
timer = timer+2
|
||||
raise log.err(self.failed(command, expect,debug))
|
||||
|
||||
# **************************find*************************
|
||||
# 1) find an exact pattern in a given string
|
||||
# 2) raise an error if not found
|
||||
# **************************************************************
|
||||
def find(self, string, pattern):
|
||||
word = string.replace(pattern,'*','\*')
|
||||
words = string.replace(word,' ','\s*')
|
||||
if re.search(words,string):
|
||||
pass
|
||||
else:
|
||||
raise log.err(string)
|
||||
|
||||
|
||||
# **************************find_false**************************
|
||||
# 1) find an exact pattern in a given string
|
||||
# 2) raise an error if found
|
||||
# **************************************************************
|
||||
def find_false(self, string, pattern):
|
||||
if string.find(pattern) != -1:
|
||||
raise log.err(string)
|
||||
|
||||
# **************************find_re*************************
|
||||
# 1) find an exact re pattern in a given string
|
||||
# 2) raise an error if not found
|
||||
# **************************************************************
|
||||
def find_re(self, string, pattern):
|
||||
if not re.compile(pattern).search(string):
|
||||
raise log.err(string)
|
||||
|
||||
# **************************find_false_re*************************
|
||||
# 1) find an exact re pattern in a given string
|
||||
# 2) raise an error if found
|
||||
# **************************************************************
|
||||
def find_false_re(self, string, pattern):
|
||||
if re.compile(pattern).search(string):
|
||||
raise log.err(string)
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file log.py
|
||||
# \brief provides primitives and defines how the logs and statistics are generated
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import sys
|
||||
import re
|
||||
import time
|
||||
import datetime
|
||||
import array
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
||||
debug = False
|
||||
docfile = ''
|
||||
start_time = time.time()
|
||||
testcase_starttime = start_time
|
||||
debug = 0
|
||||
stats = {'passed':0, 'failed':0, 'skipped':0, 'internal_errors':0, 'cmd':0}
|
||||
|
||||
# xml result (jUnit like)
|
||||
xUnitTestsuites = ET.Element( 'testsuites' )
|
||||
xUnitTestsuite = ET.SubElement( xUnitTestsuites, 'testsuite' )
|
||||
xUnitTestsuite.set( 'name', 'OAI' )
|
||||
xUnitTestsuite.set( 'timestamp', datetime.datetime.fromtimestamp(start_time).strftime('%Y-%m-%dT%H:%M:%S') )
|
||||
xUnitTestsuite.set( 'hostname', 'localhost' )
|
||||
#xUnitSystemOut = ET.SubElement( xUnitTestsuite, 'system-out' )
|
||||
|
||||
class bcolors:
|
||||
header = '\033[95m'
|
||||
okblue = '\033[94m'
|
||||
okgreen = '\033[92m'
|
||||
warning = '\033[93m'
|
||||
fail = '\033[91m'
|
||||
normal = '\033[0m'
|
||||
|
||||
def __init__(self):
|
||||
if not sys.stdout.isatty():
|
||||
self.disable()
|
||||
|
||||
def disable(self):
|
||||
self.header = ''
|
||||
self.okblue = ''
|
||||
self.okgreen = ''
|
||||
self.warning = ''
|
||||
self.fail = ''
|
||||
self.normal = ''
|
||||
|
||||
class err(Exception):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
def __str__(self):
|
||||
return repr(self.value)
|
||||
|
||||
def writefile(logfile, message):
|
||||
F_testlog = open(logfile, 'a')
|
||||
F_testlog.write(message + '\n')
|
||||
F_testlog.close()
|
||||
|
||||
|
||||
def sleep(seconds):
|
||||
time.sleep(seconds)
|
||||
|
||||
def start():
|
||||
"""Start the timer for the following testcase."""
|
||||
global testcase_starttime
|
||||
testcase_starttime = time.time()
|
||||
|
||||
def set_debug_level(level):
|
||||
debug = level
|
||||
|
||||
def statistics(logfile):
|
||||
global start_time
|
||||
|
||||
#if stats['passed'] == 0:
|
||||
# print "no test executed...exiting"
|
||||
# sys.exit()
|
||||
|
||||
total_tests = stats['passed'] + stats['failed'] + stats['skipped']
|
||||
total_ex_tests = stats['passed'] + stats['failed']
|
||||
elapsed_time = time.gmtime(time.time() - start_time)
|
||||
print '\n'
|
||||
log_record('info', '===============================================')
|
||||
log_record('info', 'Total tests performed ' + repr(total_tests))
|
||||
log_record('info', 'Tests passed ' + repr(stats['passed']))
|
||||
log_record('info', 'Tests failed ' + repr(stats['failed']))
|
||||
log_record('info', 'Tests skipped ' + repr(stats['skipped']))
|
||||
log_record('info', '')
|
||||
log_record('info', 'Total commands sent ' + repr(stats['cmd']))
|
||||
log_record('info', 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time))
|
||||
log_record('info', '===============================================')
|
||||
log_record('info', 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%')
|
||||
log_record('info', '===============================================')
|
||||
|
||||
writefile(logfile, '\n=====================Results===================')
|
||||
writefile(logfile, 'Total tests performed ' + repr(total_tests))
|
||||
writefile(logfile, 'Tests passed ' + repr(stats['passed']))
|
||||
writefile(logfile, 'Tests failed ' + repr(stats['failed']))
|
||||
writefile(logfile, 'Tests skipped ' + repr(stats['skipped']))
|
||||
writefile(logfile, '')
|
||||
writefile(logfile, 'Total commands sent ' + repr(stats['cmd']))
|
||||
writefile(logfile, 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time))
|
||||
writefile(logfile, '===============================================')
|
||||
writefile(logfile, 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%')
|
||||
writefile(logfile, '===============================================\n')
|
||||
|
||||
xUnitTestsuite.set( 'tests', repr(total_tests) )
|
||||
xUnitTestsuite.set( 'failures', repr(stats['failed']) )
|
||||
xUnitTestsuite.set( 'skipped', repr(stats['skipped']) )
|
||||
xUnitTestsuite.set( 'errors', '0' )
|
||||
time_delta = datetime.datetime.now() - datetime.datetime.fromtimestamp(start_time)
|
||||
xUnitTestsuite.set( 'time', repr(time_delta.total_seconds()) )
|
||||
writefile( logfile + '.xml', ET.tostring( xUnitTestsuites, encoding="utf-8", method="xml" ) )
|
||||
|
||||
def log_record(level, message):
|
||||
ts = time.strftime('%d %b %Y %H:%M')
|
||||
message = ts + ' [' + level + '] ' + message
|
||||
if level == 'passed' :
|
||||
print bcolors.okgreen + message + bcolors.normal
|
||||
elif level == 'failed' :
|
||||
print bcolors.fail + message + bcolors.normal
|
||||
elif level == 'skipped' :
|
||||
print bcolors.warning + message + bcolors.normal
|
||||
else :
|
||||
print message
|
||||
|
||||
def fail(case, testnum, testname, conf, message, diag, output,trace):
|
||||
# report(case, testnum, testname, conf, 'failed', output, diag, message)
|
||||
report(case, testnum, testname, conf, 'failed', output, diag)
|
||||
log_record('failed', case + testnum + ' : ' + testname + ' ('+ conf+')')
|
||||
if message :
|
||||
log_record('failed', "Output follows:\n" + message )
|
||||
if trace :
|
||||
log_record('failed', "trace file can be found in " + trace + "\n" )
|
||||
stats['failed'] += 1
|
||||
|
||||
def failquiet(case, testnum, testname, conf):
|
||||
log_record('failed', case + testnum + ' :' + testname + ' ('+ conf+')')
|
||||
stats['failed'] += 1
|
||||
|
||||
def ok(case, testnum, testname, conf, message, output):
|
||||
report(case, testnum, testname, conf, 'passed', output)
|
||||
log_record('passed', case + testnum + ' : ' + testname + ' ('+ conf+')')
|
||||
if message :
|
||||
print bcolors.okgreen + message + bcolors.normal
|
||||
stats['passed'] += 1
|
||||
|
||||
|
||||
def skip(case, testnum, testname, conf, message=None, diag=None, output=None):
|
||||
log_record('skipped', case + testnum + ' :' + testname + ' ('+ conf+')')
|
||||
report(case, testnum, testname, conf, 'skipped', output, diag)
|
||||
if message :
|
||||
log_record('skipped', "Output follows:\n" + message )
|
||||
if diag :
|
||||
log_record('skipped', "Diagnostic: \n" + diag )
|
||||
stats['skipped'] += 1
|
||||
|
||||
|
||||
def report(case, test, name, conf, status, output, diag=None, desc=None):
|
||||
writefile (output, '[' +status+ '] ' + case + test + ' : ' + name + ' ('+ conf+')')
|
||||
if diag :
|
||||
writefile (output, '-------> ' + diag)
|
||||
if desc:
|
||||
writefile(output, desc)
|
||||
#log_record('report', + case + test + ' documented')
|
||||
e = ET.SubElement( xUnitTestsuite, 'testcase' )
|
||||
e.set( 'name', case + '_' + test + '_' + name )
|
||||
e.set( 'classname', 'shellscript' )
|
||||
e.set( 'time', repr( time.time() - testcase_starttime ) )
|
||||
if status == 'failed':
|
||||
e = ET.SubElement( e, 'failure' )
|
||||
e.set( 'message', 'failed' )
|
||||
e.text = diag
|
||||
if status == 'skipped':
|
||||
e = ET.SubElement( e, 'skipped' )
|
||||
@@ -1,223 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file openair.py
|
||||
# \brief class that define the oaisim class and its attributes
|
||||
# \author Navid Nikaein
|
||||
# \date 2013
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
import pexpect
|
||||
import pxssh
|
||||
import time
|
||||
import os
|
||||
import array
|
||||
import shutil
|
||||
import subprocess
|
||||
# import call
|
||||
|
||||
from core import *
|
||||
|
||||
SHELL = '/bin/bash'
|
||||
|
||||
class openair(core):
|
||||
def __init__(self, hostname, address):
|
||||
self.error = '% '
|
||||
self.hostname = hostname
|
||||
self.address = address
|
||||
self.localhost = None
|
||||
core.__init__(self)
|
||||
|
||||
@property
|
||||
def localhost(self):
|
||||
if self.localhost :
|
||||
return self.localhost
|
||||
elif self.hostname in ['localhost', '127.0.0.7', '::1'] :
|
||||
self.localhost = self.hostname
|
||||
return self.localhost
|
||||
|
||||
@localhost.setter
|
||||
def localhost(self,localhost):
|
||||
self.localhost = localhost
|
||||
|
||||
def shcmd(self,cmd,sudo=False):
|
||||
|
||||
if sudo:
|
||||
cmd = "sudo %s" % command
|
||||
|
||||
proc = subprocess.Popen(command, shell=True,
|
||||
stdout = subprocess.PIPE,
|
||||
stderr = subprocess.PIPE)
|
||||
|
||||
stdout, stderr = proc.communicate()
|
||||
return (stdout, stderr)
|
||||
|
||||
def connect(self, username, password, prompt='PEXPECT_OAI'):
|
||||
self.prompt1 = prompt
|
||||
self.prompt2 = prompt
|
||||
|
||||
try:
|
||||
if not username:
|
||||
username = root
|
||||
if not password:
|
||||
password = username
|
||||
self.oai = pxssh.pxssh()
|
||||
self.oai.login(self.address,username,password)
|
||||
self.oai.sendline('PS1='+self.prompt1)
|
||||
self.oai.PROMPT='PEXPECT_OAI'
|
||||
# need to look for twice the string of the prompt
|
||||
self.oai.prompt()
|
||||
self.oai.prompt()
|
||||
self.oai.sendline('uptime')
|
||||
self.oai.prompt()
|
||||
print self.oai.before
|
||||
|
||||
except Error, val :
|
||||
print "Error: can't connect to"+username+"@"+self.address
|
||||
|
||||
def connect2(self, username, password, prompt='$'):
|
||||
self.prompt1 = prompt
|
||||
self.prompt2 = prompt
|
||||
|
||||
while 1:
|
||||
try:
|
||||
if not username:
|
||||
username = root
|
||||
if not password:
|
||||
password = username
|
||||
|
||||
self.oai = pexpect.spawn('ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -o "ConnectionAttempts=1" ' \
|
||||
+ username + '@' + self.address)
|
||||
|
||||
index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=40)
|
||||
if index == 0 :
|
||||
return 'Ok'
|
||||
else :
|
||||
index = self.oai.expect(['password:', pexpect.TIMEOUT], timeout=40)
|
||||
if index == 0 :
|
||||
self.oai.sendline(password)
|
||||
index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=10)
|
||||
if index != 0:
|
||||
print 'ERROR! could not login with SSH.'
|
||||
print 'Expected ' + self.prompt1 + ', received >>>>' + self.oai.before + '<<<<'
|
||||
sys.exit(1)
|
||||
return 'Ok'
|
||||
|
||||
except Exception, val:
|
||||
time.sleep(5)
|
||||
print "Error:", val
|
||||
|
||||
def connect_localshell(self, prompt='$'):
|
||||
self.prompt1 = prompt
|
||||
self.prompt2 = prompt
|
||||
|
||||
while 1:
|
||||
try:
|
||||
# start a shell and use the current environment
|
||||
self.oai = pexpect.spawn('bash --norc --noprofile')
|
||||
|
||||
index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=40)
|
||||
if index == 0 :
|
||||
return 'Ok'
|
||||
else :
|
||||
sys.exit(1)
|
||||
|
||||
except Exception, val:
|
||||
time.sleep(5)
|
||||
print "Error:", val
|
||||
|
||||
def disconnect(self):
|
||||
print 'disconnecting the ssh connection to ' + self.address + '\n'
|
||||
self.oai.send('exit')
|
||||
# self.cancel()
|
||||
|
||||
def kill(self, user, pw):
|
||||
try:
|
||||
if user == 'root' :
|
||||
os.system('pkill oaisim')
|
||||
os.system('pkill cc1')
|
||||
time.sleep(1)
|
||||
os.system('pkill oaisim')
|
||||
else :
|
||||
os.system('echo '+pw+' | sudo -S pkill oaisim')
|
||||
os.system('echo '+pw+' | sudo -S pkill cc1')
|
||||
time.sleep(1)
|
||||
os.system('echo '+pw+' | sudo -S pkill oaisim')
|
||||
except Error, val:
|
||||
print "Error:", val
|
||||
|
||||
def rm_driver(self,oai,user, pw):
|
||||
try:
|
||||
if user == 'root' :
|
||||
#oai.send_nowait('rmmod nasmesh;')
|
||||
os.system('rmmod nasmesh;')
|
||||
else :
|
||||
oai.send_nowait('echo '+pw+ ' | sudo -S rmmod nasmesh;')
|
||||
#os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;')
|
||||
except Error, val:
|
||||
print "Error removing oai network driver module:", val
|
||||
|
||||
def driver(self,oai,user,pw):
|
||||
#pwd = oai.send_recv('pwd')
|
||||
oai.send('cd $OPENAIR_TARGETS;')
|
||||
oai.send('cd SIMU/USER;')
|
||||
try:
|
||||
if user == 'root' :
|
||||
oai.send_nowait('insmod ./nasmesh.ko;')
|
||||
else :
|
||||
oai.send('echo '+pw+ ' | sudo -S insmod ./nasmesh.ko;')
|
||||
|
||||
except Error, val:
|
||||
print "Error inserting oai network driver module:", val
|
||||
|
||||
def cleandir (self, logdir,debug) :
|
||||
|
||||
for filename in os.listdir(logdir):
|
||||
filepath = os.path.join(logdir, filename)
|
||||
if debug == 2 :
|
||||
print 'logdir is ' + logdir
|
||||
print 'filepath is ' + filepath
|
||||
try:
|
||||
shutil.rmtree(filepath)
|
||||
except OSError:
|
||||
os.remove(filepath)
|
||||
#print 'Could not remove the filepath'+ filepath + ' with error ' + OSError
|
||||
|
||||
def create_dir(self,dirname,debug) :
|
||||
if not os.path.exists(dirname) :
|
||||
try:
|
||||
os.makedirs(dirname,0755)
|
||||
except OSError:
|
||||
# There was an error on creation, so make sure we know about it
|
||||
raise
|
||||
def cpu_freq(self):
|
||||
freq=0
|
||||
proc = subprocess.Popen(["cat","/proc/cpuinfo"],
|
||||
stdout=subprocess.PIPE)
|
||||
out, err = proc.communicate()
|
||||
|
||||
for line in out.split("\n"):
|
||||
if "cpu MHz" in line:
|
||||
freq = float(line.split(":")[1])
|
||||
break
|
||||
|
||||
return freq
|
||||
@@ -1,182 +0,0 @@
|
||||
#! /usr/bin/python
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file test01.py
|
||||
# \brief test 01 for OAI
|
||||
# \author Navid Nikaein
|
||||
# \date 2013 - 2015
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
|
||||
import sys
|
||||
import wave
|
||||
import os
|
||||
import time
|
||||
import datetime
|
||||
import getpass
|
||||
import math #from time import clock
|
||||
|
||||
import log
|
||||
import case01
|
||||
import case02
|
||||
import case03
|
||||
import case04
|
||||
import case05
|
||||
|
||||
from openair import *
|
||||
|
||||
debug = 0
|
||||
pw =''
|
||||
i = 0
|
||||
dlsim=0
|
||||
localshell=0
|
||||
is_compiled = 0
|
||||
timeout=2000
|
||||
|
||||
for arg in sys.argv:
|
||||
if arg == '-d':
|
||||
debug = 1
|
||||
elif arg == '-dd':
|
||||
debug = 2
|
||||
elif arg == '-p' :
|
||||
prompt2 = sys.argv[i+1]
|
||||
elif arg == '-w' :
|
||||
pw = sys.argv[i+1]
|
||||
elif arg == '-P' :
|
||||
dlsim = 1
|
||||
elif arg == '-l' :
|
||||
localshell = 1
|
||||
elif arg == '-c' :
|
||||
is_compiled = 1
|
||||
elif arg == '-t' :
|
||||
timeout = sys.argv[i+1]
|
||||
elif arg == '-h' :
|
||||
print "-d: low debug level"
|
||||
print "-dd: high debug level"
|
||||
print "-p: set the prompt"
|
||||
print "-w: set the password for ssh to localhost"
|
||||
print "-l: use local shell instead of ssh connection"
|
||||
print "-t: set the time out in second for commands"
|
||||
sys.exit()
|
||||
i= i + 1
|
||||
|
||||
try:
|
||||
os.environ["OPENAIR1_DIR"]
|
||||
except KeyError:
|
||||
print "Please set the environment variable OPENAIR1_DIR in the .bashrc"
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
os.environ["OPENAIR2_DIR"]
|
||||
except KeyError:
|
||||
print "Please set the environment variable OPENAIR2_DIR in the .bashrc"
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
os.environ["OPENAIR_TARGETS"]
|
||||
except KeyError:
|
||||
print "Please set the environment variable OPENAIR_TARGETS in the .bashrc"
|
||||
sys.exit(1)
|
||||
|
||||
# get the oai object
|
||||
host = os.uname()[1]
|
||||
oai = openair('localdomain','localhost')
|
||||
#start_time = time.time() # datetime.datetime.now()
|
||||
user = getpass.getuser()
|
||||
if localshell == 0:
|
||||
try:
|
||||
print '\n******* Note that the user <'+user+'> should be a sudoer *******\n'
|
||||
print '******* Connecting to the localhost to perform the test *******\n'
|
||||
|
||||
if not pw :
|
||||
print "username: " + user
|
||||
pw = getpass.getpass()
|
||||
else :
|
||||
print "username: " + user
|
||||
#print "password: " + pw
|
||||
|
||||
# issues in ubuntu 12.04
|
||||
# oai.connect(user,pw)
|
||||
oai.connect2(user,pw)
|
||||
#oai.get_shell()
|
||||
except :
|
||||
print 'Fail to connect to the local host'
|
||||
sys.exit(1)
|
||||
else:
|
||||
pw = ''
|
||||
oai.connect_localshell()
|
||||
|
||||
cpu_freq = int(oai.cpu_freq())
|
||||
if timeout == 2000 :
|
||||
if cpu_freq <= 2000 :
|
||||
timeout = 3000
|
||||
elif cpu_freq < 2700 :
|
||||
timeout = 2000
|
||||
elif cpu_freq < 3300 :
|
||||
timeout = 1500
|
||||
#print "cpu freq(MHz): " + str(cpu_freq) + "timeout(s): " + str(timeout)
|
||||
|
||||
|
||||
test = 'test01'
|
||||
ctime=datetime.datetime.utcnow().strftime("%Y-%m-%d.%Hh%M")
|
||||
logfile = user+'.'+test+'.'+ctime+'.txt'
|
||||
logdir = os.getcwd() + '/pre-ci-logs-'+host;
|
||||
oai.create_dir(logdir,debug)
|
||||
print 'log dir: ' + logdir
|
||||
#oai.send_nowait('mkdir -p -m 755' + logdir + ';')
|
||||
|
||||
#print '=================start the ' + test + ' at ' + ctime + '=================\n'
|
||||
#print 'Results will be reported in log file : ' + logfile
|
||||
log.writefile(logfile,'====================start'+test+' at ' + ctime + '=======================\n')
|
||||
log.set_debug_level(debug)
|
||||
|
||||
oai.kill(user, pw)
|
||||
oai.rm_driver(oai,user,pw)
|
||||
|
||||
# start te test cases
|
||||
if is_compiled == 0 :
|
||||
is_compiled=case01.execute(oai, user, pw, host,logfile,logdir,debug,timeout)
|
||||
|
||||
if is_compiled != 0 :
|
||||
case02.execute(oai, user, pw, host, logfile,logdir,debug)
|
||||
case03.execute(oai, user, pw, host, logfile,logdir,debug)
|
||||
case04.execute(oai, user, pw, host, logfile,logdir,debug)
|
||||
case05.execute(oai, user, pw, host, logfile,logdir,debug)
|
||||
else :
|
||||
print 'Compilation error: skip test case 02,03,04,05'
|
||||
|
||||
oai.kill(user, pw)
|
||||
oai.rm_driver(oai,user,pw)
|
||||
|
||||
# perform the stats
|
||||
log.statistics(logfile)
|
||||
|
||||
|
||||
oai.disconnect()
|
||||
|
||||
ctime=datetime.datetime.utcnow().strftime("%Y-%m-%d_%Hh%M")
|
||||
log.writefile(logfile,'====================end the '+ test + ' at ' + ctime +'====================')
|
||||
print 'Test results can be found in : ' + logfile
|
||||
#print '\nThis test took %f minutes\n' % math.ceil((time.time() - start_time)/60)
|
||||
|
||||
#print '\n=====================end the '+ test + ' at ' + ctime + '====================='
|
||||
@@ -1,173 +0,0 @@
|
||||
#/*
|
||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# * contributor license agreements. See the NOTICE file distributed with
|
||||
# * this work for additional information regarding copyright ownership.
|
||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# * except in compliance with the License.
|
||||
# * You may obtain a copy of the License at
|
||||
# *
|
||||
# * http://www.openairinterface.org/?page_id=698
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# *-------------------------------------------------------------------------------
|
||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# * contact@openairinterface.org
|
||||
# */
|
||||
|
||||
# \file test01.py
|
||||
# \brief test 02 for OAI: downlink and uplink performance and profiler
|
||||
# \author Navid Nikaein
|
||||
# \date 2014
|
||||
# \version 0.1
|
||||
# @ingroup _test
|
||||
|
||||
|
||||
import sys
|
||||
import wave
|
||||
import os
|
||||
import time
|
||||
import datetime
|
||||
import getpass
|
||||
import math #from time import clock
|
||||
|
||||
import log
|
||||
import case11
|
||||
import case12
|
||||
import case13
|
||||
|
||||
|
||||
from openair import *
|
||||
|
||||
debug = 0
|
||||
prompt = '$'
|
||||
pw =''
|
||||
i = 0
|
||||
clean = 0
|
||||
start_case = 0
|
||||
cpu = -1
|
||||
localshell=0
|
||||
|
||||
for arg in sys.argv:
|
||||
if arg == '-d':
|
||||
debug = 1
|
||||
elif arg == '-dd':
|
||||
debug = 2
|
||||
elif arg == '-p' :
|
||||
prompt = sys.argv[i+1]
|
||||
elif arg == '-w' :
|
||||
pw = sys.argv[i+1]
|
||||
elif arg == '-c' :
|
||||
clean = 1
|
||||
elif arg == '-t' :
|
||||
cpu = sys.argv[i+1]
|
||||
elif arg == '-s' :
|
||||
start_case = sys.argv[i+1]
|
||||
elif arg == '-l' :
|
||||
localshell = 1
|
||||
elif arg == '-h' :
|
||||
print "-d: low debug level"
|
||||
print "-dd: high debug level"
|
||||
print "-p: set the prompt"
|
||||
print "-w: set the password for ssh to localhost"
|
||||
print "-c: clean the log directory "
|
||||
print "-t: set the cpu "
|
||||
print "-l: use local shell instead of ssh connection"
|
||||
sys.exit()
|
||||
i= i + 1
|
||||
|
||||
try:
|
||||
os.environ["OPENAIR1_DIR"]
|
||||
except KeyError:
|
||||
print "Please set the environment variable OPENAIR1_DIR in the .bashrc"
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
os.environ["OPENAIR2_DIR"]
|
||||
except KeyError:
|
||||
print "Please set the environment variable OPENAIR2_DIR in the .bashrc"
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
os.environ["OPENAIR_TARGETS"]
|
||||
except KeyError:
|
||||
print "Please set the environment variable OPENAIR_TARGETS in the .bashrc"
|
||||
sys.exit(1)
|
||||
|
||||
host = os.uname()[1]
|
||||
# get the oai object
|
||||
oai = openair('localdomain','localhost')
|
||||
#start_time = time.time() # datetime.datetime.now()
|
||||
user = getpass.getuser()
|
||||
if localshell == 0:
|
||||
try:
|
||||
print '\n******* Note that the user <'+user+'> should be a sudoer *******\n'
|
||||
if cpu > -1 :
|
||||
print '******* Connecting to the localhost <'+host+'> to perform the test on CPU '+str(cpu)+' *******\n'
|
||||
else :
|
||||
print '******* Connecting to the localhost <'+host+'> to perform the test *******\n'
|
||||
|
||||
if not pw :
|
||||
print "username: " + user
|
||||
pw = getpass.getpass()
|
||||
else :
|
||||
print "username: " + user
|
||||
#print "password: " + pw
|
||||
print "prompt: " + prompt
|
||||
|
||||
oai.connect(user,pw,prompt)
|
||||
#oai.get_shell()
|
||||
except :
|
||||
print 'Fail to connect to the local host'
|
||||
sys.exit(1)
|
||||
else:
|
||||
pw = ''
|
||||
print "prompt: " + prompt
|
||||
oai.connect_localshell(prompt)
|
||||
|
||||
test = 'test02'
|
||||
ctime=datetime.datetime.utcnow().strftime("%Y-%m-%d.%Hh%M")
|
||||
logdir = os.getcwd() + '/PERF_'+host;
|
||||
logfile = logdir+'/'+user+'.'+test+'.'+ctime+'.txt'
|
||||
#oai.send_nowait('mkdir -p -m 755' + logdir + ';')
|
||||
oai.create_dir(logdir,debug)
|
||||
#print '=================start the ' + test + ' at ' + ctime + '=================\n'
|
||||
#print 'Results will be reported in log file : ' + logfile
|
||||
log.writefile(logfile,'====================start'+test+' at ' + ctime + '=======================\n')
|
||||
log.set_debug_level(debug)
|
||||
|
||||
oai.kill(user, pw)
|
||||
if clean == 1 :
|
||||
oai.cleandir(logdir,debug)
|
||||
|
||||
#oai.rm_driver(oai,user,pw)
|
||||
|
||||
# start te test cases
|
||||
#compile
|
||||
|
||||
rv=case11.execute(oai, user, pw, host,logfile,logdir,debug)
|
||||
if rv == 1 :
|
||||
case12.execute(oai, user, pw, host,logfile,logdir,debug,cpu)
|
||||
case13.execute(oai, user, pw, host,logfile,logdir,debug,cpu)
|
||||
else :
|
||||
print 'Compilation error: skip case 12 and 13'
|
||||
|
||||
oai.kill(user, pw)
|
||||
#oai.rm_driver(oai,user,pw)
|
||||
|
||||
# perform the stats
|
||||
log.statistics(logfile)
|
||||
|
||||
|
||||
oai.disconnect()
|
||||
|
||||
ctime=datetime.datetime.utcnow().strftime("%Y-%m-%d_%Hh%M")
|
||||
log.writefile(logfile,'====================end the '+ test + ' at ' + ctime +'====================')
|
||||
print 'Test results can be found in : ' + logfile
|
||||
#print '\nThis test took %f minutes\n' % math.ceil((time.time() - start_time)/60)
|
||||
|
||||
#print '\n=====================end the '+ test + ' at ' + ctime + '====================='
|
||||
Reference in New Issue
Block a user