Skip to content

Commit

Permalink
Merge pull request Ericsson#172 from gyorb/unique_suppressfile_name
Browse files Browse the repository at this point in the history
unique test suppress file for each test run
  • Loading branch information
igalex committed Nov 26, 2015
2 parents 6367bf5 + ab717a2 commit 51e32fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def start_server():
self.log.info('Cleaning checker workspace')

# generate suppress file
suppress_file = '/tmp/test_suppress_file'
suppress_file_fd, suppress_file = tempfile.mkstemp()
self._generate_suppress_file(suppress_file)

# end ------------------
Expand All @@ -389,6 +389,7 @@ def start_server():

err, fail, skipp = start_server()
# delete suppress file
os.close(suppress_file_fd)
os.remove(suppress_file)
if test_module_error.is_set():
LOG.error('Test module error')
Expand Down
11 changes: 7 additions & 4 deletions tests/regression_test/test_suppress_file_cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def setUp(self):

# -----------------------------------------------------
def test_suppress_file_set_in_cmd(self):
# test server is started without a temporary
# suppress file
self.assertEquals(self._cc_client.getSuppressFile(),
'/tmp/test_suppress_file')
"""
server is started with a suppress file
check if the api returns a non empty string
tempfile is used for suppress file so name will change for each run
"""
self.assertNotEquals(self._cc_client.getSuppressFile(),
'')

0 comments on commit 51e32fd

Please sign in to comment.