Skip to content

Commit

Permalink
Merge pull request idaholab#14737 from permcody/test_harness_fix
Browse files Browse the repository at this point in the history
Don't snapshot unrelated test outputs
  • Loading branch information
permcody committed Feb 18, 2020
2 parents db0c38e + 40b4823 commit 2a83b12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions python/TestHarness/FileChecker.py
Expand Up @@ -12,11 +12,11 @@
class FileChecker(object):
""" Class that checks files and stores last-modified times. """

def __init__(self):
def __init__(self, input_file_name):
""" Establish new dictionaries for files and their corresponding modified times. """
self.__original_times = dict()
self.__new_times = dict()

self.__input_file_name = input_file_name

def getOriginalTimes(self):
return self.__original_times
Expand All @@ -27,6 +27,12 @@ def getNewTimes(self):
def get_all_files(self, job, times):
""" Method to get the names and last_modified_times of all files within current test location """
for dirpath, dirnames, filenames in os.walk(job.getTestDir(), followlinks=True):

# When perfoming a snapshot, don't traverse into directories that have test
# specifications of their own
if os.path.exists(os.path.join(dirpath, self.__input_file_name)):
dirnames[:] = []

for file in filenames:
fullyQualifiedFile = os.path.join(dirpath, file)
try:
Expand Down
2 changes: 1 addition & 1 deletion python/TestHarness/schedulers/Job.py
Expand Up @@ -62,7 +62,7 @@ def __init__(self, tester, job_dag, options):
self.__meta_data = {}

# Create a fileChecker object to be able to call filecheck methods
self.fileChecker = FileChecker()
self.fileChecker = FileChecker(self.options.input_file_name)

# List of files modified by this job.
self.modifiedFiles = []
Expand Down

0 comments on commit 2a83b12

Please sign in to comment.