def _register_traces(cls):
stdout = Trace("stdout", "Standard output stream")
stderr = Trace("stderr", "Standard error stream")
- buildlog = Trace("buildlog", "Output of the build process")
cls._register_trace(stdout)
cls._register_trace(stderr)
- cls._register_trace(buildlog)
def __init__(self, ec, guid):
super(LinuxApplication, self).__init__(ec, guid)
# replace application specific paths in the command
command = self.replace_paths(command)
+ env = env and self.replace_paths(env)
self.node.upload_command(command, self.app_home,
shfile = "app.sh",
# Download http sources remotely
if http_sources:
- command = " wget -c --directory-prefix=${SOURCES} "
- check = ""
+ command = [" wget -c --directory-prefix=${SOURCES} "]
+ check = []
for source in http_sources:
- command += " %s " % (source)
- check += " ls ${SOURCES}/%s ;" % os.path.basename(source)
+ command.append(" %s " % (source))
+ check.append(" ls ${SOURCES}/%s " % os.path.basename(source))
+ command = " ".join(command)
+ check = " ; ".join(check)
+
# Append the command to check that the sources were downloaded
command += " ; %s " % check
self.node.mkdir(self.build_dir)
# replace application specific paths in the command
- command = self.replace_paths(command)
+ command = self.replace_paths(build)
# Upload the command to a file, and execute asynchronously
self.node.run_and_wait(command, self.app_home,
self.info(" Installing sources ")
# replace application specific paths in the command
- command = self.replace_paths(command)
+ command = self.replace_paths(install)
# Upload the command to a file, and execute asynchronously
self.node.run_and_wait(command, self.app_home,
for var in env.split(" "):
environ += ' %s ' % var
- command = "(" + environ + " ; " + command + ")"
+ command = "{" + environ + " ; " + command + " ; }"
command = self.replace_paths(command)
# If the command requires X11 forwarding, we
def valid_connection(self, guid):
# TODO: Validate!
return True
- # XXX: What if it is connected to more than one node?
- resources = self.find_resources(exact_tags = [tags.NODE])
- self._node = resources[0] if len(resources) == 1 else None
- return self._node