2626DOCKER_ROOT_PATH = fs .join ('/root' )
2727
2828# IoT.js path in travis
29- TRAVIS_BUILD_PATH = fs . join (os .environ [ 'TRAVIS_BUILD_DIR' ] )
29+ TRAVIS_BUILD_PATH = os . path . abspath ( os . path . join (os .path . dirname ( __file__ ), '..' ) )
3030
3131# IoT.js path in docker
3232DOCKER_IOTJS_PATH = fs .join (DOCKER_ROOT_PATH , 'work_space/iotjs' )
@@ -68,20 +68,25 @@ def start_container():
6868
6969def run_docker ():
7070 ex .check_run_cmd ('docker' , ['pull' , DOCKER_TAG ])
71- ex .check_run_cmd ('docker' , ['run' , '-dit' , '--privileged' ,
71+ try :
72+ ex .check_run_cmd ('docker' , ['rm' , '-f' , DOCKER_NAME ])
73+ except :
74+ pass
75+ ex .check_run_cmd ('docker' , ['run' , '-di' , '--privileged' ,
7276 '--name' , DOCKER_NAME , '-v' ,
7377 '%s:%s' % (TRAVIS_BUILD_PATH , DOCKER_IOTJS_PATH ),
7478 '--add-host' , 'test.mosquitto.org:127.0.0.1' ,
7579 '--add-host' , 'echo.websocket.org:127.0.0.1' ,
7680 '--add-host' , 'httpbin.org:127.0.0.1' ,
7781 DOCKER_TAG ])
82+ exec_docker (DOCKER_IOTJS_PATH , ['npm' , 'install' ])
7883
7984def exec_docker (cwd , cmd , env = [], is_background = False ):
8085 exec_cmd = 'cd %s && ' % cwd + ' ' .join (cmd )
8186 if is_background :
82- docker_args = ['exec' , '-dit ' ]
87+ docker_args = ['exec' , '-d ' ]
8388 else :
84- docker_args = ['exec' , '-it ' ]
89+ docker_args = ['exec' , '-t ' ]
8590
8691 for e in env :
8792 docker_args .append ('-e' )
@@ -91,7 +96,7 @@ def exec_docker(cwd, cmd, env=[], is_background=False):
9196 ex .check_run_cmd ('docker' , docker_args )
9297
9398def start_mosquitto_server ():
94- exec_docker (DOCKER_ROOT_PATH , ['mosquitto' , '-d' ])
99+ exec_docker (DOCKER_ROOT_PATH , ['mosquitto' , '-d' ], [], True )
95100
96101def start_node_server ():
97102 exec_docker (DOCKER_NODE_SERVER_PATH , ['node' , 'server.js' ], [], True )
@@ -133,16 +138,19 @@ def job_host_linux():
133138 '--run-test=full' ,
134139 '--profile=test/profiles/host-linux.profile' ])
135140
141+ # N-API should work with both ES5.1 and ES2015-subset JerryScript profiles
136142@job ('n-api' )
137143def job_n_api ():
138144 start_container ()
139145
140- # N-API should work with both ES5.1 and ES2015-subset JerryScript profiles
141146 for buildtype in BUILDTYPES :
142147 build_iotjs (buildtype , [
143148 '--run-test=full' ,
144149 '--n-api' ])
145150
151+ @job ('n-api-es2015-subset' )
152+ def job_n_api ():
153+ start_container ()
146154 for buildtype in BUILDTYPES :
147155 build_iotjs (buildtype , [
148156 '--run-test=full' ,
@@ -220,7 +228,7 @@ def job_tizen():
220228
221229@job ('misc' )
222230def job_misc ():
223- ex .check_run_cmd ('tools/check_signed_off.sh' , ['--travis' ])
231+ # ex.check_run_cmd('tools/check_signed_off.sh', ['--travis'])
224232 ex .check_run_cmd ('tools/check_tidy.py' )
225233
226234@job ('external-modules' )
0 commit comments