Skip to content

Commit

Permalink
Update LTE tests for new MATLAB tests
Browse files Browse the repository at this point in the history
Signed-off-by: Travis F. Collins <[email protected]>
  • Loading branch information
tfcollins committed Feb 25, 2021
1 parent d624b11 commit b694e84
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 35 deletions.
38 changes: 38 additions & 0 deletions +telemetry/+ingest/log_lte_test.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
function log_lte_evm_test(results, date, server, test)

if nargin < 2
% '2020-09-16T19:22:31.999032'
date = datestr(now,'yyyy-mm-ddTHH:MM:SS.FFF');
end
if nargin < 3
server = "alpine";
end
if nargin < 4
test = false;
end


for i = 1:numel(results)
class_name = results(i).Details.ClassName;
tx_attn = results(i).Details.TxAttn;
rx_gain_control_mode = results(i).Details.RxGainControlMode;
lo_freq = results(i).Details.LOFreq;
tmn = results(i).Details.TMN;
bw = results(i).Details.BW;
evm_pbch = results(i).Details.evmPBCH;
evm_pcfich = results(i).Details.evmPCFICH;
evm_phich = results(i).Details.evmPHICH;
evm_pdcch = results(i).Details.evmPDCCH;
evm_rs = results(i).Details.evmRS;
evm_sss = results(i).Details.evmSSS;
evm_pss = results(i).Details.evmPSS;
evm_pdsch = results(i).Details.evmPDSCH;

end


tel = py.telemetry.ingest(pyargs("server",server));
tel.use_test_index = test;
tel.log_lte_evm_test(class_name, tx_attn, rx_gain_control_mode, lo_freq, ...
tmn, bw, evm_pbch, evm_pcfich, evm_phich, evm_pdcch, evm_rs, ...
evm_sss, evm_pss, evm_pdsch, date);
46 changes: 28 additions & 18 deletions telemetry/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,30 +152,40 @@ def log_ad9361_tx_quad_cal_test(

def log_lte_evm_test(
self,
test_name,
standard,
tx_device,
rx_device,
tx_sample_rate,
rx_sample_rate,
carrier_frequency,
evm_db,
iteration,
class_name,
tx_attn,
rx_gain_control_mode,
lo_freq,
tmn,
bw,
evm_pbch,
evm_pcfich,
evm_phich,
evm_pdcch,
evm_rs,
evm_sss,
evm_pss,
evm_pdsch,
date=datetime.datetime.now(),
):
""" Upload LTE EVM tests to elasticsearch """
# Create query
entry = {
"test_name": test_name,
"class_name": class_name,
"date": date,
"standard": standard,
"tx_device": tx_device,
"rx_device": rx_device,
"tx_sample_rate": tx_sample_rate,
"rx_sample_rate": rx_sample_rate,
"carrier_frequency": carrier_frequency,
"evm_db": evm_db,
"iteration": iteration,
"tx_attn": tx_attn,
"rx_gain_control_mode": rx_gain_control_mode,
"lo_freq": lo_freq,
"tmn": tmn,
"bw": bw,
"evm_pbch": evm_pbch,
"evm_pcfich": evm_pcfich,
"evm_phich": evm_phich,
"evm_pdcch": evm_pdcch,
"evm_rs": evm_rs,
"evm_sss": evm_sss,
"evm_pss": evm_pss,
"evm_pdsch": evm_pdsch,
}
# Setup index if necessary
self.db.index_name = "lte_evm" if not self.use_test_index else "dummy"
Expand Down
45 changes: 30 additions & 15 deletions telemetry/resources/evm_tests_el.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,50 @@
},
"mappings": {
"properties": {
"test_name": {
"type": "text"
},
"date": {
"type": "date"
},
"standard": {
"class_name": {
"type": "text"
},
"tx_device": {
"type": "text"
"tx_attn": {
"type": "double"
},
"rx_device": {
"rx_gain_control_mode": {
"type": "text"
},
"tx_sample_rate": {
"lo_freq": {
"type": "integer"
},
"rx_sample_rate": {
"type": "integer"
"tmn": {
"type": "text"
},
"carrier_frequency": {
"type": "integer"
"bw": {
"type": "text"
},
"evm_db": {
"evm_pbch": {
"type": "double"
},
"iteration": {
"type": "integer"
"evm_pcfich": {
"type": "double"
},
"evm_phich": {
"type": "double"
},
"evm_pdcch": {
"type": "double"
},
"evm_rs": {
"type": "double"
},
"evm_sss": {
"type": "double"
},
"evm_pss": {
"type": "double"
},
"evm_pdsch": {
"type": "double"
}
}
}
Expand Down
17 changes: 15 additions & 2 deletions tests/test_elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,20 @@ def test_ingest_lte():
tel = telemetry.ingest(server=server)
tel.use_test_index = True
tel.log_lte_evm_test(
"test2", "lte20_tm3.1", "pluto", "pluto", 30720000, 30720000, 1000000000, 0.1, 1
"AD9361",
-10,
"slow_attack",
1e9,
"TM 3.1",
"5 MHz",
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8,
)
time.sleep(2)
results = tel.db.search_all()
Expand Down Expand Up @@ -186,7 +199,7 @@ def test_ingest_boot_tests_stats():
results = tel.db.search_all()
tel.db.delete_index()
assert results["hits"]["total"]["value"] == 1


def test_ingest_hdl_resources():
loc = os.path.dirname(__file__)
Expand Down

0 comments on commit b694e84

Please sign in to comment.