Skip to content

Commit 74943c0

Browse files
Peter Markirtakacs
authored andcommitted
Enable usage of conditions in artifacts, do error handling in utils.copy and utils.move (#246)
JSRemoteTest-DCO-1.0-Signed-off-by: Peter Marki [email protected]
1 parent 400e379 commit 74943c0

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

jstest/builder/builder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def save_artifacts(modules):
4646
if 'dst' not in artifact:
4747
continue
4848

49+
if not eval(artifact.get('condition', 'False')):
50+
continue
51+
4952
src = artifact.get('src')
5053
dst = artifact.get('dst')
5154

jstest/builder/modules/tizenrt.build.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"dst": "%{build-dir}/linker.map"
3333
},
3434
{
35+
"condition": "'%{appname}' == 'iotjs'",
3536
"src": "%{tizenrt}/external/libmbedtls.a",
3637
"dst": "%{build-dir}/libs/libmbedtls.a"
3738
}

jstest/common/utils.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@ def copy(src, dst):
244244
'''
245245
Copy src to dst.
246246
'''
247-
if not exists(src):
248-
return
249-
250247
if os.path.isdir(src):
251248
# Remove dst folder because copytree function
252249
# fails when is already exists.
@@ -268,9 +265,6 @@ def move(src, dst):
268265
'''
269266
Move a file or directory to another location.
270267
'''
271-
if not exists(src):
272-
return
273-
274268
shutil.move(src, dst)
275269

276270

0 commit comments

Comments
 (0)