1414# limitations under the License.
1515
1616import os
17- import csv
1817import json
1918import argparse
2019import threading
@@ -43,22 +42,6 @@ def combine_json_reports():
4342 with open (combined_json_file , "w" ) as outfile :
4443 json .dump (combined_data , outfile , indent = 4 )
4544
46-
47- def combine_csv_reports ():
48- all_csv_files = [f for f in os .listdir (base_dir ) if f .endswith ("_log.csv" )]
49- combined_csv_file = f"{ base_dir } /final_compiled_report.csv"
50- with open (combined_csv_file , mode = "w" , newline = "" ) as outfile :
51- csv_writer = csv .writer (outfile )
52- for i , csv_file in enumerate (all_csv_files ):
53- with open (os .path .join (base_dir , csv_file ), mode = "r" ) as infile :
54- csv_reader = csv .reader (infile )
55- if i == 0 :
56- # write headers only once
57- csv_writer .writerow (next (csv_reader ))
58- for row in csv_reader :
59- csv_writer .writerow (row )
60-
61-
6245def generate_final_report (shell = False , env_vars = {}):
6346 env = os .environ
6447 env = {** env , ** env_vars }
@@ -76,8 +59,6 @@ def generate_final_report(shell=False, env_vars={}):
7659
7760 # Generate json reports.
7861 combine_json_reports ()
79- # Generate csv reports.
80- combine_csv_reports ()
8162
8263
8364def run_shell_command (cmd , shell = False , env_vars = {}):
@@ -147,9 +128,6 @@ def run_test(testmodule, gpu_tokens, continue_on_fail):
147128 "pytest" ,
148129 "--json-report" ,
149130 f"--json-report-file={ base_dir } /{ testfile } _log.json" ,
150- f"--csv={ base_dir } /{ testfile } _log.csv" ,
151- "--csv-columns" ,
152- "id,module,name,file,status,duration" ,
153131 f"--html={ base_dir } /{ testfile } _log.html" ,
154132 "--reruns" ,
155133 "3" ,
@@ -163,9 +141,6 @@ def run_test(testmodule, gpu_tokens, continue_on_fail):
163141 "pytest" ,
164142 "--json-report" ,
165143 f"--json-report-file={ base_dir } /{ testfile } _log.json" ,
166- f"--csv={ base_dir } /{ testfile } _log.csv" ,
167- "--csv-columns" ,
168- "id,module,name,file,status,duration" ,
169144 f"--html={ base_dir } /{ testfile } _log.html" ,
170145 "--reruns" ,
171146 "3" ,
0 commit comments