Skip to content

Commit 0cbcbeb

Browse files
bd713DENEL Bertrand
andauthored
fix: Fix initialization for non-test actions (#168)
* Fixes initialization to run non-test actions --------- Co-authored-by: DENEL Bertrand <[email protected]>
1 parent b8fb53f commit 0cbcbeb

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

geos-ats/src/geos/ats/main.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import sys
1+
import sys
22
import os
33
import shutil
44
import signal
@@ -116,7 +116,7 @@ def getLogDirBaseName():
116116

117117
def create_log_directory( options ):
118118
"""
119-
When the action will run tests (e.g. "run", "rerun", "check", "continue", then the
119+
When the action will run tests (e.g. "run", "rerun", "check", "continue"), then the
120120
LogDir is numbered, and saved. When the action does not run
121121
tests, the LogDir is temporary, and only sticks around if geos_ats
122122
exited abnormally.
@@ -150,10 +150,8 @@ def create_log_directory( options ):
150150
logger.error( "unable to name a symlink to to logdir" )
151151

152152
else:
153-
if options.action in test_actions:
154-
options.logs = "%s.%s" % ( getLogDirBaseName(), options.action )
155-
elif options.info:
156-
options.logs = "%s.info" % ( getLogDirBaseName() )
153+
# For non-test actions (list, report, etc.)
154+
options.logs = "%s.%s" % ( getLogDirBaseName(), options.action )
157155
else:
158156
if not os.path.join( options.logs ):
159157
os.mkdir( options.logs )

geos-ats/src/geos/ats/test_case.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ def initialize( self, name, desc, label=None, labels=None, steps=[], batch=Batch
9393
logger.debug( e )
9494
raise Exception()
9595

96+
# Setup labels
97+
if labels is None:
98+
labels = []
99+
if label is not None:
100+
labels = labels + [ label ]
101+
self.labels = labels
102+
96103
# Setup other parameters
97104
self.dictionary = {}
98105
self.dictionary.update( kw )

0 commit comments

Comments
 (0)