Skip to content

Commit c92b781

Browse files
authored
Support es5.1 and es2015-subset profile builds for IoT.js and JerryScript. (#235)
JSRemoteTest-DCO-1.0-Signed-off-by: Roland Takacs [email protected]
1 parent 3a3dc53 commit c92b781

File tree

6 files changed

+81
-17
lines changed

6 files changed

+81
-17
lines changed

jstest/builder/modules/iotjs.build.config

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,17 @@
4444
"condition": "%{minimal-profile-build}",
4545
"args": ["--profile=profiles/minimal.profile"]
4646
},
47+
{
48+
"condition": "%{es5.1-profile-build}",
49+
"args": ["--jerry-profile=es5.1"]
50+
},
51+
{
52+
"condition": "%{es2015subset-profile-build} or %{test-build}",
53+
"args": ["--jerry-profile=es2015-subset"]
54+
},
4755
{
4856
"condition": "%{test-build}",
4957
"args": [
50-
"--jerry-profile=es2015-subset",
5158
"--external-modules=test/external_modules/mymodule1,test/external_modules/mymodule2",
5259
"--cmake-param=-DENABLE_MODULE_MYMODULE1=ON",
5360
"--cmake-param=-DENABLE_MODULE_MYMODULE2=ON"
@@ -113,7 +120,6 @@
113120
"condition": "%{test-build}",
114121
"env": {
115122
"IOTJS_BUILD_OPTION": [
116-
"--jerry-profile=es2015-subset",
117123
"--external-modules=test/external_modules/mymodule1,test/external_modules/mymodule2",
118124
"--cmake-param=-DENABLE_MODULE_MYMODULE1=ON",
119125
"--cmake-param=-DENABLE_MODULE_MYMODULE2=ON"
@@ -135,6 +141,18 @@
135141
{
136142
"condition": "%{minimal-profile-build}",
137143
"env": { "IOTJS_BUILD_OPTION": ["--profile=profiles/minimal.profile"] }
144+
},
145+
{
146+
"condition": "%{es5.1-profile-build}",
147+
"env": {
148+
"IOTJS_BUILD_OPTION": ["--jerry-profile=es5.1"]
149+
}
150+
},
151+
{
152+
"condition": "%{es2015subset-profile-build} or %{test-build}",
153+
"env": {
154+
"IOTJS_BUILD_OPTION": ["--jerry-profile=es2015-subset"]
155+
}
138156
}
139157
]
140158
},
@@ -193,11 +211,22 @@
193211
"condition": "%{minimal-profile-build}",
194212
"env": { "IOTJS_BUILD_OPTION": ["--profile=profiles/minimal.profile"] }
195213
},
214+
{
215+
"condition": "%{es5.1-profile-build}",
216+
"env": {
217+
"IOTJS_BUILD_OPTION": ["--jerry-profile=es5.1"]
218+
}
219+
},
220+
{
221+
"condition": "%{es2015subset-profile-build} or %{test-build}",
222+
"env": {
223+
"IOTJS_BUILD_OPTION": ["--jerry-profile=es2015-subset"]
224+
}
225+
},
196226
{
197227
"condition": "%{test-build}",
198228
"env": {
199229
"IOTJS_BUILD_OPTION": [
200-
"--jerry-profile=es2015-subset",
201230
"--external-modules=test/external_modules/mymodule1,test/external_modules/mymodule2",
202231
"--cmake-param=-DENABLE_MODULE_MYMODULE1=ON",
203232
"--cmake-param=-DENABLE_MODULE_MYMODULE2=ON"
@@ -272,10 +301,17 @@
272301
"condition": "%{minimal-profile-build}",
273302
"args": ["--profile=profiles/minimal.profile"]
274303
},
304+
{
305+
"condition": "%{es5.1-profile-build}",
306+
"args": ["--jerry-profile=es5.1"]
307+
},
308+
{
309+
"condition": "%{es2015subset-profile-build} or %{test-build}",
310+
"args": ["--jerry-profile=es2015-subset"]
311+
},
275312
{
276313
"condition": "%{test-build}",
277314
"args": [
278-
"--jerry-profile=es2015-subset",
279315
"--external-modules=test/external_modules/mymodule1,test/external_modules/mymodule2",
280316
"--cmake-param=-DENABLE_MODULE_MYMODULE1=ON",
281317
"--cmake-param=-DENABLE_MODULE_MYMODULE2=ON"

jstest/builder/modules/jerryscript.build.config

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"--jerry-libm=ON",
2323
"--all-in-one=OFF",
2424
"--mem-heap=70",
25-
"--profile=%{jerryscript}/jerry-core/profiles/es2015-subset.profile",
25+
"--profile=%{jerryscript}/jerry-core/profiles/minimal.profile",
2626
"--toolchain=%{jerryscript}/cmake/toolchain_mcu_stm32f4.cmake",
2727
"--compile-flag=-I%{jerryscript}/targets/nuttx-stm32f4",
2828
"--compile-flag='-isystem %{nuttx}/include'"
@@ -33,8 +33,12 @@
3333
"args": ["--mem-stats=ON"]
3434
},
3535
{
36-
"condition": "%{minimal-profile-build}",
37-
"args": ["--profile=%{jerryscript}/jerry-core/profiles/minimal.profile"]
36+
"condition": "%{es5.1-profile-build}",
37+
"args": ["--profile=%{jerryscript}/jerry-core/profiles/es5.1.profile"]
38+
},
39+
{
40+
"condition": "%{es2015subset-profile-build}",
41+
"args": ["--profile=%{jerryscript}/jerry-core/profiles/es2015-subset.profile"]
3842
}
3943
]
4044
},
@@ -68,7 +72,7 @@
6872
"--jerry-libm=ON",
6973
"--all-in-one=OFF",
7074
"--mem-heap=70",
71-
"--profile=%{jerryscript}/jerry-core/profiles/es2015-subset.profile",
75+
"--profile=%{jerryscript}/jerry-core/profiles/minimal.profile",
7276
"--toolchain=%{jerryscript}/cmake/toolchain_mcu_artik053.cmake",
7377
"--compile-flag='-isystem %{tizenrt}/os/include'"
7478
],
@@ -82,8 +86,12 @@
8286
"args": ["--mem-stats=ON"]
8387
},
8488
{
85-
"condition": "%{minimal-profile-build}",
86-
"args": ["--profile=%{jerryscript}/jerry-core/profiles/minimal.profile"]
89+
"condition": "%{es5.1-profile-build}",
90+
"args": ["--profile=%{jerryscript}/jerry-core/profiles/es5.1.profile"]
91+
},
92+
{
93+
"condition": "%{es2015subset-profile-build}",
94+
"args": ["--profile=%{jerryscript}/jerry-core/profiles/es2015-subset.profile"]
8795
}
8896
]
8997
},
@@ -118,7 +126,7 @@
118126
"--all-in-one=OFF",
119127
"--linker-flag=-Wl,-Map=jerry.map",
120128
"--toolchain=%{jerryscript}/cmake/toolchain_linux_armv7l.cmake",
121-
"--profile=%{jerryscript}/jerry-core/profiles/es2015-subset.profile"
129+
"--profile=%{jerryscript}/jerry-core/profiles/minimal.profile"
122130
],
123131
"conditional-options": [
124132
{
@@ -130,8 +138,12 @@
130138
"args": ["--debug"]
131139
},
132140
{
133-
"condition": "%{minimal-profile-build}",
134-
"args": ["--profile=%{jerryscript}/jerry-core/profiles/minimal.profile"]
141+
"condition": "%{es5.1-profile-build}",
142+
"args": ["--profile=%{jerryscript}/jerry-core/profiles/es5.1.profile"]
143+
},
144+
{
145+
"condition": "%{es2015subset-profile-build}",
146+
"args": ["--profile=%{jerryscript}/jerry-core/profiles/es2015-subset.profile"]
135147
}
136148
]
137149
},

jstest/common/symbol_resolver.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ def resolve_symbol(symbol, env):
116116
'flash': not env.options.no_flash,
117117
'memstat': not env.options.no_memstat,
118118
'coverage': bool(env.options.coverage),
119-
'minimal-profile-build': 'minimal-profile-build' in env.options.id,
120119
'test-build': 'test-build' in env.options.id,
120+
'minimal-profile-build': 'minimal-profile-build' in env.options.id,
121+
'es5.1-profile-build': 'target-es5.1-profile-build' in env.options.id,
122+
'es2015subset-profile-build': 'target-es2015subset-profile-build' in env.options.id,
121123
'build-dir': env.paths.builddir,
122124
'testsuite': env.modules.app.paths.tests
123125
}

jstest/resources/resources.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@
6262
"file": "%{patches}/tizenrt-mbedtls.diff"
6363
}
6464
],
65-
"profiles/target-profile-build": [
65+
"profiles/target-es5.1-profile-build": [
66+
{
67+
"condition": "'%{appname}' == 'iotjs'",
68+
"file": "%{patches}/tizenrt-mbedtls.diff"
69+
}
70+
],
71+
"profiles/target-es2015subset-profile-build": [
6672
{
6773
"condition": "'%{appname}' == 'iotjs'",
6874
"file": "%{patches}/tizenrt-mbedtls.diff"

jstest/runnable.jobs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77
"no_test": true
88
},
99
{
10-
"id": "profiles/target-profile-build",
10+
"id": "profiles/target-es5.1-profile-build",
11+
"coverage": false,
12+
"no_memstat": true,
13+
"no_flash": true,
14+
"no_test": true
15+
},
16+
{
17+
"id": "profiles/target-es2015subset-profile-build",
1118
"coverage": false,
1219
"no_memstat": true,
1320
"no_flash": true,

jstest/testresult.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def create_result(self):
4545

4646
labels = {
4747
'profiles/minimal-profile-build': 'minimal-profile',
48-
'profiles/target-profile-build': 'target-profile'
48+
'profiles/target-es5.1-profile-build': 'target-es5.1-profile',
49+
'profiles/target-es2015subset-profile-build': 'target-es2015subset-profile'
4950
}
5051

5152
for job_id, build_path in self.results.iteritems():

0 commit comments

Comments
 (0)