Skip to content

Commit

Permalink
Merge 0273d42 into d1ad03b
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Apr 25, 2019
2 parents d1ad03b + 0273d42 commit 3234a6d
Show file tree
Hide file tree
Showing 4 changed files with 3,882 additions and 5 deletions.
2 changes: 0 additions & 2 deletions epregressions/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,8 +1189,6 @@ def idf_selection_list(self, widget): # pragma: no cover - moved core into idf_
this_line = line.strip()
if this_line == "":
continue
if line[-4:] == ".imf" or line[-4:] == ".idf":
this_line = this_line[:-4]
files_to_select.append(this_line)
self.idf_selection_from_list_worker(files_to_select)

Expand Down
11 changes: 8 additions & 3 deletions epregressions/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import unicode_literals

import argparse
import codecs
from datetime import datetime
import io
import json
Expand Down Expand Up @@ -173,6 +174,12 @@ def prepare_dir_structure(self, b_a, b_b, d_test):
os.mkdir(os.path.join(b_b['build_dir'], d_test))
self.my_print('Created test directories at <build-dir>/%s' % d_test)

@staticmethod
def read_file_content(file_path):
with codecs.open(file_path, encoding='utf-8', errors='ignore') as f_idf:
idf_text = f_idf.read()
return idf_text

def run_build(self, build_tree):

this_test_dir = self.test_output_dir
Expand Down Expand Up @@ -208,9 +215,7 @@ def run_build(self, build_tree):

# read in the entire text of the idf to do some special operations;
# could put in one line, but the with block ensures the file handle is closed
with io.open(os.path.join(test_run_directory, self.ep_in_filename), encoding='utf-8') as f_idf:
idf_text = f_idf.read() # EDWIN: Make sure this reads the IDF properly
# idf_text = unicode(idf_text, errors='ignore')
idf_text = SuiteRunner.read_file_content(os.path.join(test_run_directory, self.ep_in_filename))

# if the file requires the window 5 data set file, bring it into the test run directory
if 'Window5DataFile.dat' in idf_text:
Expand Down
Loading

0 comments on commit 3234a6d

Please sign in to comment.