Merge "LAT: Modified the build directory to support different build types"
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -43,6 +43,8 @@ def main():
|
||||
parser.add_argument("-q", "--quiet",
|
||||
help = "Hide all output except error messages",
|
||||
action="store_const", const=logging.ERROR, dest="loglevel")
|
||||
parser.add_argument("-t", "--kernel", type=str, choices=['std', 'rt'], default='std',
|
||||
help = "Image type for standard kernel or rt kernel")
|
||||
parser.add_argument('action', metavar='action', type=str, nargs=1,
|
||||
help = 'Action to take. e.g. getyaml/build/status/stop/clean/logs')
|
||||
parser.add_argument('--file', required=False,
|
||||
@@ -53,12 +55,12 @@ def main():
|
||||
|
||||
client_action = args.action[0]
|
||||
|
||||
msg = {}
|
||||
msg = {'workdir': os.path.join(channel.workspace_dir, args.kernel)}
|
||||
if client_action == 'getyaml':
|
||||
msg['action'] = 'getyaml'
|
||||
elif client_action == 'build':
|
||||
if not args.file:
|
||||
logger.error('latc build --file /path/to/some.yaml')
|
||||
logger.error('latc build --file /path/to/some.yaml -t std|rt')
|
||||
sys.exit(1)
|
||||
msg['action'] = 'build'
|
||||
if not os.path.exists(args.file):
|
||||
|
||||
@@ -60,9 +60,13 @@ class LATD(object):
|
||||
# record the message into history
|
||||
msg_hist = CHANNEL_DIR + "/client_message_history"
|
||||
record_message(msg_hist, message)
|
||||
self.workspace_dir = message['workdir']
|
||||
logger.info("Set work directory to %s" % self.workspace_dir)
|
||||
if message['action'] == 'build':
|
||||
msg_latd = {}
|
||||
msg_latd['action'] = 'build'
|
||||
cmd = 'rm -f log/log.appsdk'
|
||||
subprocess.check_call(cmd, shell=True, cwd=self.workspace_dir)
|
||||
|
||||
if 'yaml_file' in message:
|
||||
yaml_file = message['yaml_file']
|
||||
|
||||
@@ -25,10 +25,10 @@ import yaml
|
||||
|
||||
logger = logging.getLogger('latd.volume')
|
||||
|
||||
workspace_dir = "/localdisk" if 'WORKSPACE_DIR' not in os.environ \
|
||||
workspace_dir = "/localdisk/lat" if 'WORKSPACE_DIR' not in os.environ \
|
||||
else os.environ['WORKSPACE_DIR']
|
||||
|
||||
channel_dir = workspace_dir + "/channel"
|
||||
channel_dir = "/localdisk/channel"
|
||||
|
||||
client_message_watch_file = channel_dir + "/c-2-s.done"
|
||||
client_message_content_file = channel_dir + "/c-2-s.msg"
|
||||
|
||||
Reference in New Issue
Block a user