From 7d9aa0615aa2e34f972d3ac2e7a9f80dbeaa849c Mon Sep 17 00:00:00 2001 From: Hyokeun Jeon Date: Mon, 30 Sep 2019 15:59:50 +0900 Subject: [PATCH] [TCT] Query based on profile name Change-Id: Iea2f8a2b33b72f79ae2b8a9e8b48aee227a803f4 --- job_trbs_test_result_receiver.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/job_trbs_test_result_receiver.py b/job_trbs_test_result_receiver.py index 4a7f0fd..90513c4 100755 --- a/job_trbs_test_result_receiver.py +++ b/job_trbs_test_result_receiver.py @@ -165,7 +165,8 @@ if __name__ == "__main__": DINFO = { 'sr' : CONFIG['RAW']['BASE']['sr'], - 'snapshot_num' : CONFIG['RAW']['BASE']['snapshot_num'] + 'snapshot_num' : CONFIG['RAW']['BASE']['snapshot_num'], + 'tct_profile' : CONFIG['RAW']['TCT']['environment']['tct_profile'] } print "[INFO] CONFIG : sr =", DINFO['sr'], ", snapshot_num =", DINFO['snapshot_num'] @@ -364,7 +365,7 @@ if __name__ == "__main__": SQL['TCT']['select'] = ( "SELECT * " "FROM trbs_tct " - "WHERE sr_name = %(sr)s AND snapshot_num = %(snapshot_num)s ORDER BY id DESC" + "WHERE sr_name = %(sr)s AND snapshot_num = %(snapshot_num)s AND tct_profile = %(tct_profile)s ORDER BY id DESC" ) MYSQL['cursor'].execute( SQL['TCT']['select'], DINFO ) @@ -505,10 +506,9 @@ if __name__ == "__main__": SQL['SMOKES']['select'] = ( "SELECT * " "FROM trbs_smoke " - "WHERE sr_name = %(sr)s AND snapshot_num = %(snapshot_num)s ORDER BY id DESC" + "WHERE sr_name = %(sr)s AND snapshot_num = %(snapshot_num)s AND profile = %(tct_profile)s ORDER BY id DESC" ) - VALUES = { 'sr_status_id' : DINFO['sr_status_id'], 'sr_name' : DINFO['sr'], @@ -683,7 +683,7 @@ if __name__ == "__main__": SQL['PERFS']['select'] = ( "SELECT * " "FROM trbs_perf " - "WHERE sr_name = %(sr)s AND snapshot_num = %(snapshot_num)s ORDER BY id DESC" + "WHERE sr_name = %(sr)s AND snapshot_num = %(snapshot_num)s AND profile = %(tct_profile)s ORDER BY id DESC" ) MYSQL['cursor'].execute( SQL['PERFS']['select'], DINFO ) @@ -864,3 +864,4 @@ if __name__ == "__main__": isExistRef , isExistPerf, CONFIG['RAW'].get('INFO')) exit(0) + -- 2.7.4