1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-12-04 19:01:33 +00:00

Modify resource's directory structure

This commit is contained in:
R. Richard 2019-08-15 17:04:27 +02:00
parent 11b3ac8eef
commit 9fd3520910
3 changed files with 7 additions and 17 deletions

View File

@ -38,7 +38,7 @@ challenge::run() {
local mount_volumes
if [[ "${HOTRELOAD:-0}" == "1" ]]; then
if [[ -d "${BASEIMAGE_PATH}" ]]; then
mount_baseimage="-v ${BASEIMAGE_PATH}/tfw:/usr/local/lib/tfw"
mount_baseimage="-e HOTRELOAD=1 -v ${BASEIMAGE_PATH}/tfw:/usr/local/lib/tfw"
fi
mount_challenge="-v ${CHALLENGE_PATH}/solvable/src:/.tfw/builtin_event_handlers"
mount_volumes="${mount_baseimage:-} ${mount_challenge}"

View File

@ -1,5 +1,4 @@
import logging
from sys import stderr
from functools import partial
from tornado.ioloop import IOLoop
@ -11,8 +10,7 @@ from tfw.components.terminal import TerminalHandler
from tfw.components.frontend import FrontendProxyHandler, ConsoleLogsHandler
from tfw.components.process_management import ProcessHandler, ProcessLogHandler
from tfw.components.fsm import FSMHandler
from tfw.main import EventHandlerFactory, setup_signal_handlers
from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter
from tfw.main import EventHandlerFactory, setup_logger, setup_signal_handlers
from tfw.config import TFWENV, TAOENV
from custom_handlers import CenatorHandler, TestCommandsHandler, messageFSMStepsHandler
@ -22,10 +20,7 @@ LOG = logging.getLogger(__name__)
def main():
# pylint: disable=unused-variable
Logger([
Log(stderr, LogFormatter(20)),
Log(TFWENV.LOGFILE, VerboseLogFormatter())
]).start()
setup_logger(__file__)
eh_factory = EventHandlerFactory()
# TFW builtin EventHandlers (required for their respective functionalities)

View File

@ -1,22 +1,17 @@
import logging
from sys import stderr
from tornado.ioloop import IOLoop
from tfw.components.pipe_io import PipeIOHandler, ProxyPipeConnectorHandler
from tfw.config import TFWENV
from tfw.logging import Log, Logger, LogFormatter, VerboseLogFormatter
from tfw.main import EventHandlerFactory, setup_signal_handlers
from tfw.components.pipe_io import PipeIOHandler, ProxyPipeConnectorHandler
from tfw.main import EventHandlerFactory, setup_logger, setup_signal_handlers
LOG = logging.getLogger(__name__)
def main():
# pylint: disable=unused-variable
Logger([
Log(stderr, LogFormatter(20)),
Log(TFWENV.LOGFILE, VerboseLogFormatter())
]).start()
setup_logger(__file__)
eh_factory = EventHandlerFactory()
@ -24,7 +19,7 @@ def main():
'/tmp/tfw_send',
'/tmp/tfw_recv'
))
proxy_pipe_eh = eh_factory.build(ProxyPipeConnectorHandler('/tmp/pipes'))
proxy_pipe_eh = eh_factory.build(ProxyPipeConnectorHandler(TFWENV.PIPES_DIR))
setup_signal_handlers()
IOLoop.current().start()