[submodule "deps/jerry"]
path = deps/jerry
- url = https://github.com/jerryscript-project/jerryscript.git
+ url = https://github.com/pando-project/jerryscript.git
[submodule "deps/http-parser"]
path = deps/http-parser
- url = https://github.com/Samsung/http-parser.git
+ url = https://github.com/pando-project/http-parser.git
[submodule "deps/libtuv"]
path = deps/libtuv
- url = https://github.com/Samsung/libtuv.git
+ url = https://github.com/pando-project/libtuv.git
[submodule "deps/mbedtls"]
path = deps/mbedtls
url = https://github.com/ARMmbed/mbedtls.git
os: linux
dist: trusty
-sudo: false
services:
- docker
-before_install:
- - if [[ "$RUN_DOCKER" == "yes" ]]; then docker pull iotjs/ubuntu:0.9; fi
-
-script:
- tools/travis_script.py
+script: tools/travis_script.py
matrix:
include:
- - env:
- - JOBNAME="Linux/x86-64 Build & Correctness Tests"
+ - name: "Linux/x86-64 Build & Correctness Tests"
+ env:
- OPTS="host-linux"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="Mock Linux Build & Correctness Tests"
+
+ - name: "Mock Linux Build & Correctness Tests"
+ env:
- OPTS="mock-linux"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="Raspberry Pi 2 Build Test"
+
+ - name: "Raspberry Pi 2 Build Test"
+ env:
- OPTS="rpi2"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="STM32f4 Discovery with Nuttx Build Test"
+
+ - name: "STM32f4 Discovery with Nuttx Build Test"
+ env:
- OPTS="stm32f4dis"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="Artik053 with TizenRT Build Test"
+
+ - name: "Artik053 with TizenRT Build Test"
+ env:
- OPTS="artik053"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="Tizen Build Test"
+
+ - name: "Tizen Build Test"
+ env:
- OPTS="tizen"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="ECMAScript 2015 features Build & Correctness Tests"
+
+ - name: "ECMAScript 2015 features Build & Correctness Tests"
+ env:
- OPTS="es2015"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="External modules Build & Correctness Tests"
+
+ - name: "External modules Build & Correctness Tests"
+ env:
- OPTS="external-modules"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="Linux/x86-64 without snapshot Build & Correctness Tests"
+
+ - name: "Linux/x86-64 without snapshot Build & Correctness Tests"
+ env:
- OPTS="no-snapshot"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="Misc checks (e.g. style checker)"
+
+ - name: "Misc checks (e.g. style checker)"
+ env:
- OPTS="misc"
addons:
apt:
packages: [valgrind, clang-format-3.9]
- - env:
- - JOBNAME="OSX/x86-64 Build & Correctness Tests"
+
+ - name: "OSX/x86-64 Build & Correctness Tests"
+ env:
- OPTS="host-darwin"
os: osx
- install: tools/brew-install-deps.sh
- - env:
- - JOBNAME="ASAN Tests"
+ addons:
+ homebrew:
+ packages: [cmake]
+
+ - name: "ASAN Tests"
+ env:
- OPTS="asan"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="UBSAN Tests"
+
+ - name: "UBSAN Tests"
+ env:
- OPTS="ubsan"
- - RUN_DOCKER=yes
- - env:
- - JOBNAME="Coverity Scan"
+
+ - name: "Coverity Scan"
+ env:
- OPTS="coverity"
# Declaration of the encrypted COVERITY_SCAN_TOKEN, created via the
# "travis encrypt" command using the project repo's public key.
- secure: "lUGzoKK/Yn4/OmpqLQALrIgfY9mQWE51deUawPrCO87UQ2GknfQ4BvwY3UT5QY0XnztPBP1+vRQ2qxbiAU7VWicp280sXDnh0FeuZD14FcE9l0FczraL12reoLu+gY5HWFfbkZncmcBsZkxDEYxhkM14FJU8fxyqGQW2ypJNz+gUGP+8r40Re5J3WjcddCQNe5IG8U+M9B4YeDHhN2QspLdN5pkgn56XtdGa3+qbecO2NpjJG5ltM9j1tTuo/Dg22DxrIFVfeFSFKUj4nfMrgPo5LevRsC/lfaBSCsj751eqrxRcQRh2hkpiIJ7mEBs2LL1EH9O6Mbj+eRh8BvIYqTB85VPNFc43sLWk14apcSVBrxJE5j3kP9sAsOD9Y5JynnkeuxYyISrkywwoX2uxsmCzIfGbwsv5VLToQzrqWlGYrHOAmVXNi8561dLfsWwxxFUjdqkZr1Kgc8UfnBEcBUtSiKCHS86/YUUbBJGkEkjDUS0GiqhFY4bXLQCR7EX4qDX3m6p7Mnh4NVUolpnSmyeYE/MjmqQ+7PJsPLL3EcIYmJ7dtW3mZ3yE2NyaFD0Pym9+TiuCCXRtrNVK1M3Kya64KNv+HbhjT/fTCgXLSeyDmJOKVAqugRlDo3b1KGR1LI0AfegzSA6mEC4e9JLjYiSnHPMUahzgLt8oU0hNFRY="
- before_install:
- - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
addons:
coverity_scan:
project:
notification_email: duddlf.choi@samsung.com
build_command: "tools/travis_script.py"
branch_pattern: master
- - env:
- - JOBNAME="SonarQube"
+
+ - name: "SonarQube"
addons:
sonarcloud:
- organization: "samsung-iotjs"
- token:
- secure: "u9HWNQNhAqQQdgl3yldKcQVH8plMQRwIdpzjsM4j3GBC4Wrh9u8guLJB3o003i0UsyaGg2knYFdLgOmEsgcvXAo2aIUyzf9CfK9RLRw5RtIuPMpmR7UjHdlf+QfCF+nY+BB2j0nAiWnxHve95du7sZflNxi+eNJJzquyBh1Wm8eqwoiRpCgiDzjRDEAUoz0FWMNny/x5545E970jpQ2bjHGx98tCMUO8ikINeL8sC99sumffaFONG8GVpwLjc8McfQfYpWbk0e0OPxZtGDyqKcyMxcbAGctklsigtsBZKlpj69uba3w4OSA3zJPCdQ4dKwCyBOcAAP8qeF5Jf0eLI8WLEgnKir2Pfc/rKkY0owuz7S+tUmizm3+T06wDFgwpLu0/PcA5oOcp4WpGXbAX7WujaAHB7YKAEsk324XC7Bdf+39OuZ0dbKWMiwU7rYV4NOYNPjN2BCb1XqyE0Ung41Ls6P4t/zwzYRZtiovhr6ibNBcwLVclfQZ/tbyBDuh++8dh7Ixe+x5RFiiCB0w/fiKqqXYM8/we4JU3f71y4DK6fP+nSN/vIYttvkN28HCCvBVSdyuuvPRM6Ro1yLNw9U9PHCJ1CIgcx8+I8Mep3PzBhDILXWjzlVu4sa/+aIoEq7MvWBDMhrFEP6RX+M6CiPmgj5+Lu/GZNivbu51RASI="
+ organization: "pando-project"
script: ./tools/check_sonarqube.sh
cache:
directories:
- '$HOME/.sonar/cache'
+
fast_finish: true
# IoT.js: Platform for Internet of Things with JavaScript
[![License](https://img.shields.io/badge/licence-Apache%202.0-brightgreen.svg?style=flat)](LICENSE)
-[![Build Status](https://travis-ci.org/Samsung/iotjs.svg?branch=master)](https://travis-ci.org/Samsung/iotjs)
+[![Build Status](https://travis-ci.org/pando-project/iotjs.svg?branch=master)](https://travis-ci.org/pando-project/iotjs)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/12140/badge.svg)](https://scan.coverity.com/projects/samsung-iotjs)
-[![SonarCloud Status](https://sonarcloud.io/api/project_badges/measure?project=samsung.iot.js&metric=alert_status)](https://sonarcloud.io/dashboard?id=samsung.iot.js)
+[![SonarCloud Status](https://sonarcloud.io/api/project_badges/measure?project=pando-project_iotjs&metric=alert_status)](https://sonarcloud.io/dashboard?id=pando-project_iotjs)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FSamsung%2Fiotjs.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FSamsung%2Fiotjs?ref=badge_shield)
[![IRC Channel](https://img.shields.io/badge/chat-on%20freenode-brightgreen.svg)](https://kiwiirc.com/client/irc.freenode.net/#iotjs)
-You can find project details on our [project page](http://samsung.github.io/iotjs/) and [wiki](https://github.com/Samsung/iotjs/wiki).
+You can find project details on our [project page](http://pando-project.github.io/iotjs/) and [wiki](https://github.com/pando-project/iotjs/wiki).
-Memory usage and Binary footprint are measured at [here](https://samsung.github.io/iotjs-test-results) with real target daily.
+Memory usage and Binary footprint are measured at [here](https://pando-project.github.io/iotjs-test-results) with real target daily.
The following table shows the latest results on the devices:
-| Artik053 | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fiotjs%2Fartik053.svg?alt=media&token=1)](https://samsung.github.io/iotjs-test-results/?view=artik053) |
+| Artik053 | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fiotjs%2Fartik053.svg?alt=media&token=1)](https://pando-project.github.io/iotjs-test-results/?view=artik053) |
| :---: | :---: |
-| **Artik530** | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fiotjs%2Fartik530.svg?alt=media&token=1)](https://samsung.github.io/iotjs-test-results/?view=artik530) |
-| **Raspberry Pi 2** | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fiotjs%2Frpi2.svg?alt=media&token=1)](https://samsung.github.io/iotjs-test-results/?view=rpi2) |
-| **STM32F4-Discovery** | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fiotjs%2Fstm32f4dis.svg?alt=media&token=1)](https://samsung.github.io/iotjs-test-results/?view=stm32f4dis) |
+| **Artik530** | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fiotjs%2Fartik530.svg?alt=media&token=1)](https://pando-project.github.io/iotjs-test-results/?view=artik530) |
+| **Raspberry Pi 2** | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fiotjs%2Frpi2.svg?alt=media&token=1)](https://pando-project.github.io/iotjs-test-results/?view=rpi2) |
+| **STM32F4-Discovery** | [![Remote Testrunner](https://firebasestorage.googleapis.com/v0/b/jsremote-testrunner.appspot.com/o/status%2Fiotjs%2Fstm32f4dis.svg?alt=media&token=1)](https://pando-project.github.io/iotjs-test-results/?view=stm32f4dis) |
IRC channel: #iotjs on [freenode](https://freenode.net)
### Getting the sources
```bash
-git clone https://github.com/Samsung/iotjs.git
+git clone https://github.com/pando-project/iotjs.git
cd iotjs
```
os: linux
dist: trusty
-sudo: required
-before_install:
- - tools/check-signed-off.sh --travis
- - tools/apt-get-install-deps.sh
- - if [[ "$INSTALL_ARM_DEPS" == "yes" ]]; then tools/apt-get-install-arm.sh; fi
+before_install: tools/apt-get-install-deps.sh
+script: make run_test $OPT
-install:
+matrix:
+ include:
+ - name: "Check"
+ before_install: skip
+ script: tools/check-signed-off.sh --travis
-script: "make run_test $OPT"
+ - name: "x86-64 Debug"
+ env:
+ - OPT="TUV_BUILD_TYPE=debug"
-env:
- - OPT="TUV_BUILD_TYPE=debug"
- - OPT="TUV_BUILD_TYPE=release"
- - OPT="TUV_PLATFORM=arm-linux TUV_BOARD=rpi2" INSTALL_ARM_DEPS=yes
+ - name: "x86-64 Release"
+ env:
+ - OPT="TUV_BUILD_TYPE=release"
+
+ - name: "ARM RPi2"
+ env:
+ - OPT="TUV_PLATFORM=arm-linux TUV_BOARD=rpi2"
+ install: tools/apt-get-install-arm.sh
clean:
rm -rf $(OUTPUT_ROOT)
+
+install:
+ make -C $(CMAKE_FOLDER) $@
cmake_minimum_required(VERSION 2.8.12)
+# Config
+SET(prefix "/usr")
+SET(exec_prefix "${prefix}/bin")
+SET(includedir "${prefix}/include/${PROJECT_NAME}")
+SET(libdir "${prefix}/lib")
+SET(libname "${PROJECT_NAME}")
+
#
# { TUV_CHANGES@20161129: It corresponds to uv.gyp's `sources` }
#
${SOURCE_ROOT}
)
+# pkg-config
+CONFIGURE_FILE(config/${libname}.pc.in ${libname}.pc @ONLY)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libname}.pc"
+ DESTINATION "${libdir}/pkgconfig/")
+
# build tuv library
set(TARGETLIBNAME tuv)
add_library(${TARGETLIBNAME} ${LIB_TUV_SRCFILES})
ARCHIVE_OUTPUT_DIRECTORY "${LIB_OUT}"
LIBRARY_OUTPUT_DIRECTORY "${LIB_OUT}"
RUNTIME_OUTPUT_DIRECTORY "${BIN_OUT}")
+install(TARGETS ${TARGETLIBNAME} ARCHIVE
+ DESTINATION "${libdir}")
# build tuv shared library
if (DEFINED CREATE_SHARED_LIB AND CREATE_SHARED_LIB STREQUAL "yes")
LIBRARY_OUTPUT_DIRECTORY "${LIB_OUT}"
COMPILE_FLAGS -fPIC
OUTPUT_NAME tuv)
+install(TARGETS ${TARGETSHAREDLIBNAME} LIBRARY
+ DESTINATION "${libdir}")
endif()
if(DEFINED COPY_TARGET_LIB)
"${COPY_TARGET_LIB}"
COMMENT "Copying lib${TARGETLIBNAME} to ${COPY_TARGET_LIB}")
endif()
+
+# Install headers
+file(GLOB LIBTUV_HEADERS include/*.h)
+install(FILES ${LIBTUV_HEADERS} DESTINATION ${includedir})
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libtuv
+Description: Asynchronous I/O for embedded system
+Version: 1.0.0
+Libs: -L${libdir} -ltuv
+Libs.private: -lpthread
+Cflags: -I${includedir}/libtuv
--- /dev/null
+[general]
+upstream_branch = ${upstreamversion}
+upstream_tag = ${upstreamversion}
+packaging_dir = config/tizen/packaging
--- /dev/null
+[general]
+#profile = profile.tizen_4.0_unified
+#profile = profile.tizen_4.0_iotpreview2
+#profile = profile.tizen_unified
+profile = profile.tizen_unified_m1
+upstream_branch = ${upstreamversion}
+upstream_tag = ${upstreamversion}
+packaging_dir = config/tizen/packaging
+
+
+[profile.tizen_unified_m1]
+obs = obs.spin
+repos = repo.tizen_base_m1, repo.tizen_unified_m1
+
+[repo.tizen_base_m1]
+url = http://download.tizen.org/releases/milestone/tizen/base/tizen-base_20180518.1/repos/standard/packages/
+user =
+passwdx =
+
+[repo.tizen_unified_m1]
+url = http://download.tizen.org/releases/milestone/tizen/unified/tizen-unified_20180528.1/repos/standard/packages/
+user =
+passwdx =
+
+
+[profile.tizen_4.0_iotpreview2]
+obs = obs.spin
+repos = repo.tizen_local, repo.tizen_4.0_base_arm_20171222.1, repo.tizen_4.0_unified_20180118.1
+
+[repo.tizen_4.0_base_arm_20171222.1]
+url = http://download.tizen.org/releases/previews/iot/preview2/tizen-4.0-base_20171222.1/repos/arm/packages/
+user =
+passwdx =
+
+[repo.tizen_4.0_unified_20180118.1]
+url = http://download.tizen.org/releases/previews/iot/preview2/tizen-4.0-unified_20180118.1/repos/standard/packages/
+user =
+passwdx =
+
+
+[profile.tizen_4.0_unified]
+obs = obs.spin
+repos = repo.public_4.0_base_arm, repo.tizen_4.0_unified
+
+[repo.public_4.0_base_arm]
+url = http://download.tizen.org/snapshots/tizen/4.0-base/latest/repos/arm/packages/
+user =
+passwdx =
+
+[repo.tizen_4.0_unified]
+url = http://download.tizen.org/snapshots/tizen/4.0-unified/latest/repos/standard/packages/
+user =
+passwdx =
+
+
+[profile.tizen_unified]
+obs = obs.spin
+repos = repo.tizen_base, repo.tizen_unified
+
+[repo.tizen_base]
+url = http://download.tizen.org/snapshots/tizen/base/latest/repos/standard/packages/
+user =
+passwdx =
+
+[repo.tizen_unified]
+url = http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/
+user =
+passwdx =
+
+
+
+[obs.spin]
+url = http://168.219.209.58:81
+
+[obs.tizen]
+url = https://api.tizen.org
+user = obs_viewer
+passwdx = QlpoOTFBWSZTWRP5nYMAAB6fgCAAeUA9mr+QBvzF4CAAVGAZDTRoDI0YBlCKeptQBoA0aGZIAottAkltEPOK7BAFXE9mTUzocPMzQRkPoPpNwEZx3rRQhxkXmGHS6wCjHskyVCP4u5IpwoSAn8zsGA==
+
+
+[repo.tizen_local_unified_m1]
+url = ~/GBS-ROOT/local/repos/tizen_unified_m1/
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
--- /dev/null
+# Copyright 2018-present Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Name: libtuv
+Version: 1.0.0
+Release: 0
+Summary: Asynchronous I/O for embedded system
+Group: Development/System
+License: Apache-2.0 and MIT
+Source: %{name}-%{version}.tar.gz
+Source1001: %{name}.manifest
+ExclusiveArch: %arm %ix86 x86_64
+
+BuildRequires: cmake
+
+%description
+Asynchronous I/O for embedded system
+
+# Initialize the variables
+%{!?build_mode: %define build_mode release}
+%{!?board: %define board None}
+%{!?platform: %define platform noarch-tizen}
+
+%package devel
+Summary: Header files for %{name}
+Group: Development/System
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Development libraries for %{name}
+
+%prep
+%setup -q -c
+cp %{SOURCE1001} .
+
+%build
+TUV_PLATFORM=%{platform} TUV_BOARD=%{board} TUV_BUILD_TYPE=%{build_mode} \
+TUV_BUILDTESTER=no TUV_CREATE_SHARED_LIB=yes make
+
+%install
+TUV_PLATFORM=%{platform} TUV_BOARD=%{board} TUV_BUILD_TYPE=%{build_mode} \
+TUV_BUILDTESTER=no TUV_CREATE_SHARED_LIB=yes \
+DESTDIR=%{buildroot} \
+make install V=1
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%manifest config/tizen/packaging/%{name}.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libtuv.so
+%license LICENSE
+
+%files devel
+%manifest config/tizen/packaging/%{name}.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libtuv.a
+%{_libdir}/pkgconfig/%{name}.pc
+%{_includedir}/*
#include <errno.h>
#include <netdb.h>
-#include <uio.h>
+#include <sys/uio.h>
#ifndef TUV_POLL_EVENTS_SIZE
#define TUV_POLL_EVENTS_SIZE 32
### Build script
-There is a [script](build/Build-Script.md) to help you build IoT.js called "[build.py](https://github.com/Samsung/iotjs/blob/master/tools/build.py)" in source repository. Run `tools/build.py --help` command to check all of the build options.
+There is a [script](build/Build-Script.md) to help you build IoT.js called "[build.py](https://github.com/pando-project/iotjs/blob/master/tools/build.py)" in source repository. Run `tools/build.py --help` command to check all of the build options.
#### How to Build
`--run-test [{full,quiet}]` Execute tests after build, optional argument specifies the level of output for the test runner.
-`--jerry-debugger` Enable JerryScript debugger, so JavaScript could can be investigated with an available debugger client (eg.: [Python Debugger Console](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-debugger/jerry-client-ws.py) or [IoT.js Code](https://github.com/Samsung/iotjscode/)). See also ["Use JerryScript Debugger"](devs/Use-JerryScript-Debugger.md).
+`--jerry-debugger` Enable JerryScript debugger, so JavaScript could can be investigated with an available debugger client (eg.: [Python Debugger Console](https://github.com/pando-project/jerryscript/blob/master/jerry-debugger/jerry-client-ws.py) or [IoT.js Code](https://github.com/pando-project/iotjscode/)). See also ["Use JerryScript Debugger"](devs/Use-JerryScript-Debugger.md).
`--js-backtrace {ON,OFF}` Enable/disable backtrace information of JavaScript code (default: ON in debug and OFF in release build).
[nuttx-site]: http://nuttx.org/
[tizen-site]: https://www.tizen.org/
-[tizenrt-site]: https://wiki.tizen.org/Tizen_RT
\ No newline at end of file
+[tizenrt-site]: https://wiki.tizen.org/Tizen_RT
Welcome to the IoT.js!
> IoT.js is a framework for "Internet of Things" built on
-> lightweight JavaScript interpreter ['JerryScript'](https://github.com/jerryscript-project/jerryscript)
+> lightweight JavaScript interpreter ['JerryScript'](https://github.com/pando-project/jerryscript)
> and libtuv for event driven(non-blocking I/O model) similar to node.js.
### IoT.js Wiki
It locates in "./tools" directory of source tree.
-It automatically creates a directory where build object and outputs will be generated,
+It automatically creates a directory where build object and outputs will be generated,
checks configurations, tidiness of source code, licenses, and more.
Also it downloads, updates and builds submodules.
And finally generate IoT.js binary.
#### `--jerry-profile`
* `es5.1` | `es2015-subset | absolute path to a custom profile file`
-Specify the profile for JerryScript (default: es5.1). In JerryScript all of the features are enabled by default, so an empty profile file turns on all of the available ECMA features. See also the related [README.md](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
+Specify the profile for JerryScript (default: es5.1). In JerryScript all of the features are enabled by default, so an empty profile file turns on all of the available ECMA features. See also the related [README.md](https://github.com/pando-project/jerryscript/blob/master/jerry-core/profiles/README.md).
E.g.:
**/home/iotjs/my-jerry-profile.profile**
```bash
mkdir iotjs-tizenrt
cd iotjs-tizenrt
-git clone https://github.com/Samsung/iotjs.git
+git clone https://github.com/pando-project/iotjs.git
git clone https://github.com/Samsung/TizenRT.git
```
```bash
$ mkdir iotjs-nuttx
$ cd iotjs-nuttx
-$ git clone https://github.com/Samsung/iotjs.git
+$ git clone https://github.com/pando-project/iotjs.git
$ git clone https://bitbucket.org/nuttx/nuttx.git --branch nuttx-7.25
$ git clone https://bitbucket.org/nuttx/apps.git --branch nuttx-7.25
$ git clone https://github.com/texane/stlink.git
* For `spi` module
* Enable `System Type -> STM32 Peripheral Support -> SPI1`
* Enable `Device Drivers -> SPI exchange`
-
+
#### Build NuttX Context
```bash
***
#### Build Host
-Ubuntu 14.04 is recommended. Other Unix like platforms can be used. If it doesn't seem to work properly on other platforms, please look into the [Issues](https://github.com/Samsung/iotjs/issues) page. Someone may have already tried. If you can't find any related one, please leave an issue for help.
+Ubuntu 14.04 is recommended. Other Unix like platforms can be used. If it doesn't seem to work properly on other platforms, please look into the [Issues](https://github.com/pando-project/iotjs/issues) page. Someone may have already tried. If you can't find any related one, please leave an issue for help.
#### Directory structure
To get the source for this repository,
```
cd harmony
-git clone https://github.com/Samsung/iotjs.git
+git clone https://github.com/pando-project/iotjs.git
cd iotjs
```
The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an Open Source patch. The sign-off is required for a patch to be accepted.
-#### 3. Open [a Github pull request](https://github.com/Samsung/iotjs/pulls)
+#### 3. Open [a Github pull request](https://github.com/pando-project/iotjs/pulls)
#### 4. What if my patch is rejected?
Connect your local repository to the original upstream repository by adding it as a remote.
Pull in upstream changes often to stay up-to-date so that when you submit your pull request, merge conflicts will be less likely.
* For more details, see [GitHub fork synching guidelines](https://help.github.com/articles/syncing-a-fork/).
-[Create a branch](https://guides.github.com/introduction/flow/) for your edits.
\ No newline at end of file
+[Create a branch](https://guides.github.com/introduction/flow/) for your edits.
### Proposals, Get Answers and Report a Bug via Github Issues
-If you have a question about IoT.js code, have trouble any documentation, would like to suggest new feature, or find a bug, [review the current IoT.js issues](https://github.com/Samsung/iotjs/issues) in GitHub, and if necessary, [create a new issue](https://github.com/Samsung/iotjs/issues/new).
+If you have a question about IoT.js code, have trouble any documentation, would like to suggest new feature, or find a bug, [review the current IoT.js issues](https://github.com/pando-project/iotjs/issues) in GitHub, and if necessary, [create a new issue](https://github.com/pando-project/iotjs/issues/new).
**There are several labels on the Issue. Please choose proper labels on the purpose.**
* **bug**
### Tips on GitHub Issues
-* Check existing [IoT.js issues](https://github.com/Samsung/iotjs/issues) for the answer to your issue.
+* Check existing [IoT.js issues](https://github.com/pando-project/iotjs/issues) for the answer to your issue.
Duplicating an issue slows you and others. Search through open and closed issues to see if the problem you are running into has already been addressed.
-* If necessary, [open a new issue](https://github.com/Samsung/iotjs/issues/new).
- - Clearly describe the issue.
+* If necessary, [open a new issue](https://github.com/pando-project/iotjs/issues/new).
+ - Clearly describe the issue.
+ What did you expect to happen?
+ What actually happened instead?
+ How can someone else recreate the problem?
- Include system details(such as the hardware, library, and operating system you are using and their versions).
- - Paste error output and logs in the issue or in a Gist(https://gist.github.com/).
+ - Paste error output and logs in the issue or in a Gist(https://gist.github.com/).
-For more information about GitHub issues, refer to the [GitHub issues guidelines](https://guides.github.com/features/issues/).
\ No newline at end of file
+For more information about GitHub issues, refer to the [GitHub issues guidelines](https://guides.github.com/features/issues/).
## How to make IoT.js experimental build
-You need to make IoT.js using our build script, ["build.py"](https://github.com/Samsung/iotjs/blob/master/tools/build.py), with `--experimental` or `-e` option.
+You need to make IoT.js using our build script, ["build.py"](https://github.com/pando-project/iotjs/blob/master/tools/build.py), with `--experimental` or `-e` option.
```bash
tools/build.py --experimental
tools/build.py -e --config=build.experimental.config
```
- For selecting modules to be included, you need to notify the script where your modules exist. You can use `--iotjs-include-module` or `--config` option for that. For further information, please refer to [Writing Builtin JavaScript Module](https://github.com/Samsung/iotjs/blob/master/docs/devs/Writing-New-Builtin-Module.md#writing-builtin-javascript-module).
+ For selecting modules to be included, you need to notify the script where your modules exist. You can use `--iotjs-include-module` or `--config` option for that. For further information, please refer to [Writing Builtin JavaScript Module](https://github.com/pando-project/iotjs/blob/master/docs/devs/Writing-New-Builtin-Module.md#writing-builtin-javascript-module).
## Writing Code
2) If it has a WiFi the download directly from the registry
* But to make this work, we need to develop a small shell program with iotjs.
* This can be done with built-in module downloader, we need to develop this.
- * Issue [#75](https://github.com/Samsung/iotjs/issues/75) to track
+ * Issue [#75](https://github.com/pando-project/iotjs/issues/75) to track
3) If your IoT is very small and even has no writable file system
* Package modules should be built-in to IoT.js at compile time.
correctly specify the module name as the test executor relies on that information.
1. Write a test case and place it into the proper directory.
-2. List up the test case in [test/testsets.json](https://github.com/Samsung/iotjs/blob/master/test/testsets.json), and set attributes (timeout, skip, ...) on the test case if it needs.
+2. List up the test case in [test/testsets.json](https://github.com/pando-project/iotjs/blob/master/test/testsets.json), and set attributes (timeout, skip, ...) on the test case if it needs.
#### Test set descriptor
-* [`test/testsets.json`](https://github.com/Samsung/iotjs/blob/master/test/testsets.json)
+* [`test/testsets.json`](https://github.com/pando-project/iotjs/blob/master/test/testsets.json)
```
{
## Jerry-debugger
Detailed description about the debugger is available
-[here](https://github.com/jerryscript-project/jerryscript/blob/master/docs/07.DEBUGGER.md).
+[here](https://github.com/pando-project/jerryscript/blob/master/docs/07.DEBUGGER.md).
### Enable debugger support in IoT.js
#### Available Clients
-* [JerryScript console debugger client](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-debugger/jerry-client-ws.py)
-* [Iot.js Code](https://github.com/Samsung/iotjscode)
-* [Jerryscript debugger Chrome webtool](https://github.com/jerryscript-project/jerryscript-debugger-ts)
+* [JerryScript console debugger client](https://github.com/pando-project/jerryscript/blob/master/jerry-debugger/jerry-client-ws.py)
+* [Iot.js Code](https://github.com/pando-project/iotjscode)
+* [Jerryscript debugger Chrome webtool](https://github.com/pando-project/jerryscript-debugger-ts)
**Note**: When snapshot support is enabled, you won't be able to examine js-modules
that are loaded from snapshots.
## Writing Native Module
-You can implement some part of the builtin module in C, to enhance performance and to fully exploit the H/W functionality, etc. It has similar concept with [Node.js native addon](https://nodejs.org/api/addons.html), but we have different set of APIs. Node.js uses its own binding layer with v8 API, but we use [our own binding layer](../../src/iotjs_binding.h) which wraps [JerryScript API](https://github.com/jerryscript-project/JerryScript/blob/master/jerry-core/jerryscript.h). You can see `src/iotjs_binding.*` files to find more APIs to communicate with JS-side values from native-side of you can call JerryScript API functions directly.
+You can implement some part of the builtin module in C, to enhance performance and to fully exploit the H/W functionality, etc. It has similar concept with [Node.js native addon](https://nodejs.org/api/addons.html), but we have different set of APIs. Node.js uses its own binding layer with v8 API, but we use [our own binding layer](../../src/iotjs_binding.h) which wraps [JerryScript API](https://github.com/pando-project/jerryscript/blob/master/jerry-core/jerryscript.h). You can see `src/iotjs_binding.*` files to find more APIs to communicate with JS-side values from native-side of you can call JerryScript API functions directly.
* For native modules you must define an `init` function that provides the JS object that represents your module.
* You can define multiple native files.
-sonar.projectKey=samsung.iot.js
+sonar.projectKey=pando-project_iotjs
sonar.projectName=IoT.js
-sonar.projectVersion=1.0
sonar.sources=src
sonar.cfamily.build-wrapper-output=bw-output
#define TARGET_OS "unknown"
#endif /* __linux__ */
-#define IOTJS_VERSION "1.0.0" "190103_9c1af99"
+#define IOTJS_VERSION "1.0.0" "190122_8f77e14"
#if !defined(STRINGIFY)
#define STRINGIFY(x) #x
iotjs_jval_get_object_native_handle(jclient_tcp,
&this_module_native_info);
- int err = uv_accept(handle, (uv_stream_t*)client_handle);
- if (err) {
+
+ if (client_handle == NULL ||
+ uv_accept(handle, (uv_stream_t*)client_handle)) {
jerry_release_value(args[0]);
return;
}
buff_ptr += 2;
payload_len -= 2;
- uint8_t ret_code_str_size = 4;
+ size_t ret_code_str_size = 4;
char ret_code_str[ret_code_str_size + 1];
- sprintf(ret_code_str, "%d", ret_code);
- ret_code_str[ret_code_str_size] = '\0';
+ snprintf(ret_code_str, ret_code_str_size + 1, "%d", ret_code);
jerry_value_t ret_buff =
iotjs_bufferwrap_create_buffer(payload_len + ret_code_str_size);
payload_len = (uint16_t)(current_buffer[0] << 8 | current_buffer[1]);
current_buffer += sizeof(uint16_t);
} else if (!(payload_byte ^ WS_THREE_BYTES_LENGTH)) {
+ uint64_t payload_64bit_len;
if (current_buffer + sizeof(uint64_t) > current_buffer_end) {
break;
}
- if ((*(uint64_t *)current_buffer & UINT32_MAX) > UINT32_MAX) {
- return WS_ERR_FRAME_SIZE_LIMIT;
- }
for (uint8_t i = 0; i < sizeof(uint64_t); i++) {
- memcpy((uint8_t *)&payload_len + i,
+ memcpy((uint8_t *)&payload_64bit_len + i,
current_buffer + sizeof(uint64_t) - 1 - i, sizeof(uint8_t));
}
+
+ if (payload_64bit_len > UINT32_MAX) {
+ return WS_ERR_FRAME_SIZE_LIMIT;
+ }
+ payload_len = (uint32_t)payload_64bit_len;
+
current_buffer += sizeof(uint64_t);
} else {
payload_len = payload_byte;
# See the License for the specific language governing permissions and
# limitations under the License.
-if [[ "${TRAVIS_REPO_SLUG}" == "Samsung/iotjs"
+if [[ "${TRAVIS_REPO_SLUG}" == "pando-project/iotjs"
&& ${TRAVIS_BRANCH} == "master"
&& ${TRAVIS_EVENT_TYPE} == "push" ]]
then
git fetch --unshallow
build-wrapper-linux-x86-64 --out-dir bw-output ./tools/build.py
- sonar-scanner
+ sonar-scanner -Dsonar.projectVersion="${TRAVIS_COMMIT}"
else
echo "Skip: The pull request from ${TRAVIS_PULL_REQUEST_SLUG} is an \
external one. It's not supported yet in Travis-CI"
'--target-arch=i686'
]
+def start_container():
+ run_docker()
+ start_mosquitto_server()
+ start_node_server()
+
def run_docker():
+ ex.check_run_cmd('docker', ['pull', 'iotjs/ubuntu:0.9'])
ex.check_run_cmd('docker', ['run', '-dit', '--privileged',
'--name', DOCKER_NAME, '-v',
'%s:%s' % (TRAVIS_BUILD_PATH, DOCKER_IOTJS_PATH),
'--clean',
'--buildtype=' + buildtype] + args, env)
+JOBS = dict()
+
+class job(object):
+ def __init__(self, name):
+ self.name = name
+ def __call__(self, fn):
+ JOBS[self.name] = fn
+
+@job('host-linux')
+def job_host_linux():
+ start_container()
+
+ for buildtype in BUILDTYPES:
+ build_iotjs(buildtype, [
+ '--cmake-param=-DENABLE_MODULE_ASSERT=ON',
+ '--run-test=full',
+ '--profile=profiles/minimal.profile'])
+
+ for buildtype in BUILDTYPES:
+ build_iotjs(buildtype, [
+ '--run-test=full',
+ '--profile=test/profiles/host-linux.profile'])
+
+@job('mock-linux')
+def job_mock_linux():
+ start_container()
+ for buildtype in BUILDTYPES:
+ build_iotjs(buildtype, [
+ '--run-test=full',
+ '--target-os=mock',
+ '--profile=test/profiles/mock-linux.profile'])
+
+@job('rpi2')
+def job_rpi2():
+ start_container()
+ for buildtype in BUILDTYPES:
+ build_iotjs(buildtype, [
+ '--target-arch=arm',
+ '--target-board=rpi2',
+ '--profile=test/profiles/rpi2-linux.profile'])
+
+@job('artik053')
+def job_artik053():
+ start_container()
+
+ exec_docker(DOCKER_TIZENRT_PATH, ['git', 'fetch', '--tags'])
+ # Checkout specified tag
+ exec_docker(DOCKER_TIZENRT_PATH, ['git', 'checkout', TIZENRT_TAG])
+ # Pick libtuv's sys/uio.h and add transition header
+ exec_docker(DOCKER_TIZENRT_PATH, ['git', 'cherry-pick',
+ 'e020ef62431484b64747c760880d2b6723eb28e4'])
+ exec_docker(DOCKER_TIZENRT_OS_PATH,
+ ['ln', '-fs', 'sys/uio.h', 'include'])
+ # Set configure
+ exec_docker(DOCKER_TIZENRT_OS_TOOLS_PATH, [
+ './configure.sh', 'artik053/iotjs'])
+
+ for buildtype in BUILDTYPES:
+ set_config_tizenrt(buildtype)
+ exec_docker(DOCKER_TIZENRT_OS_PATH, [
+ 'make', 'IOTJS_ROOT_DIR=%s' % DOCKER_IOTJS_PATH,
+ 'IOTJS_BUILD_OPTION="--buildtype=%s '
+ '--profile=test/profiles/tizenrt.profile"' % buildtype
+ ])
+
+@job('stm32f4dis')
+def job_stm32f4dis():
+ start_container()
+
+ # Copy the application files to apps/system/iotjs.
+ exec_docker(DOCKER_ROOT_PATH, [
+ 'cp', '-r',
+ fs.join(DOCKER_IOTJS_PATH,'config/nuttx/stm32f4dis/app/'),
+ fs.join(DOCKER_NUTTX_APPS_PATH, 'system/iotjs/')])
+
+ exec_docker(DOCKER_ROOT_PATH, [
+ 'cp', '-r',
+ fs.join(DOCKER_IOTJS_PATH,
+ 'config/nuttx/stm32f4dis/config.travis'),
+ fs.join(DOCKER_NUTTX_PATH,
+ 'configs/stm32f4discovery/usbnsh/defconfig')])
+
+ for buildtype in BUILDTYPES:
+ exec_docker(DOCKER_NUTTX_PATH, ['make', 'distclean'])
+ exec_docker(DOCKER_NUTTX_TOOLS_PATH,
+ ['./configure.sh', 'stm32f4discovery/usbnsh'])
+ exec_docker(DOCKER_NUTTX_PATH, ['make', 'clean'])
+ exec_docker(DOCKER_NUTTX_PATH, ['make', 'context'])
+ # Build IoT.js
+ build_iotjs(buildtype, [
+ '--target-arch=arm',
+ '--target-os=nuttx',
+ '--nuttx-home=' + DOCKER_NUTTX_PATH,
+ '--target-board=stm32f4dis',
+ '--jerry-heaplimit=78',
+ '--profile=test/profiles/nuttx.profile'])
+ # Build Nuttx
+ if buildtype == "release":
+ rflag = 'R=1'
+ else:
+ rflag = 'R=0'
+ exec_docker(DOCKER_NUTTX_PATH, [
+ 'make', 'all',
+ 'IOTJS_ROOT_DIR=' + DOCKER_IOTJS_PATH, rflag])
+
+@job('tizen')
+def job_tizen():
+ start_container()
+ for buildtype in BUILDTYPES:
+ if buildtype == "debug":
+ exec_docker(DOCKER_IOTJS_PATH, [
+ 'config/tizen/gbsbuild.sh',
+ '--debug', '--clean'])
+ else:
+ exec_docker(DOCKER_IOTJS_PATH, ['config/tizen/gbsbuild.sh',
+ '--clean'])
+
+@job('misc')
+def job_misc():
+ ex.check_run_cmd('tools/check_signed_off.sh', ['--travis'])
+ ex.check_run_cmd('tools/check_tidy.py')
+
+@job('external-modules')
+def job_external_modules():
+ start_container()
+ for buildtype in BUILDTYPES:
+ build_iotjs(buildtype, [
+ '--run-test=full',
+ '--profile=test/profiles/host-linux.profile',
+ '--external-modules=test/external_modules/'
+ 'mymodule1,test/external_modules/mymodule2',
+ '--cmake-param=-DENABLE_MODULE_MYMODULE1=ON',
+ '--cmake-param=-DENABLE_MODULE_MYMODULE2=ON'])
+
+@job('es2015')
+def job_es2015():
+ start_container()
+ for buildtype in BUILDTYPES:
+ build_iotjs(buildtype, [
+ '--run-test=full',
+ '--jerry-profile=es2015-subset'])
+
+@job('no-snapshot')
+def job_no_snapshot():
+ start_container()
+ for buildtype in BUILDTYPES:
+ build_iotjs(buildtype, ['--run-test=full', '--no-snapshot',
+ '--jerry-lto'])
+
+@job('host-darwin')
+def job_host_darwin():
+ for buildtype in BUILDTYPES:
+ ex.check_run_cmd('./tools/build.py', [
+ '--run-test=full',
+ '--buildtype=' + buildtype,
+ '--clean',
+ '--profile=test/profiles/host-darwin.profile'])
+
+@job('asan')
+def job_asan():
+ start_container()
+ build_iotjs('debug', [
+ '--compile-flag=-fsanitize=address',
+ '--compile-flag=-O2'
+ ] + BUILDOPTIONS_SANITIZER,
+ ['ASAN_OPTIONS=detect_stack_use_after_return=1:'
+ 'check_initialization_order=true:strict_init_order=true',
+ 'TIMEOUT=600'])
+
+@job('ubsan')
+def job_ubsan():
+ start_container()
+ build_iotjs('debug', [
+ '--compile-flag=-fsanitize=undefined'
+ ] + BUILDOPTIONS_SANITIZER,
+ ['UBSAN_OPTIONS=print_stacktrace=1', 'TIMEOUT=600'])
+
+@job('coverity')
+def job_coverity():
+ ex.check_run_cmd('./tools/build.py', ['--clean'])
+
if __name__ == '__main__':
- if os.getenv('RUN_DOCKER') == 'yes':
- run_docker()
- start_mosquitto_server()
- start_node_server()
-
- test = os.getenv('OPTS')
- if test == 'host-linux':
- for buildtype in BUILDTYPES:
- build_iotjs(buildtype, [
- '--cmake-param=-DENABLE_MODULE_ASSERT=ON',
- '--run-test=full',
- '--profile=profiles/minimal.profile'])
-
- for buildtype in BUILDTYPES:
- build_iotjs(buildtype, [
- '--run-test=full',
- '--profile=test/profiles/host-linux.profile'])
-
- elif test == 'mock-linux':
- for buildtype in BUILDTYPES:
- build_iotjs(buildtype, [
- '--run-test=full',
- '--target-os=mock',
- '--profile=test/profiles/mock-linux.profile'])
-
- elif test == 'rpi2':
- for buildtype in BUILDTYPES:
- build_iotjs(buildtype, [
- '--target-arch=arm',
- '--target-board=rpi2',
- '--profile=test/profiles/rpi2-linux.profile'])
-
- elif test == 'artik053':
- exec_docker(DOCKER_TIZENRT_PATH, ['git', 'fetch', '--tags'])
- # Checkout specified tag
- exec_docker(DOCKER_TIZENRT_PATH, ['git', 'checkout', TIZENRT_TAG])
- # Set configure
- exec_docker(DOCKER_TIZENRT_OS_TOOLS_PATH, [
- './configure.sh', 'artik053/iotjs'])
-
- for buildtype in BUILDTYPES:
- set_config_tizenrt(buildtype)
- exec_docker(DOCKER_TIZENRT_OS_PATH, [
- 'make', 'IOTJS_ROOT_DIR=%s' % DOCKER_IOTJS_PATH,
- 'IOTJS_BUILD_OPTION="--buildtype=%s '
- '--profile=test/profiles/tizenrt.profile"' % buildtype
- ])
-
- elif test == 'stm32f4dis':
- # Copy the application files to apps/system/iotjs.
- exec_docker(DOCKER_ROOT_PATH, [
- 'cp', '-r',
- fs.join(DOCKER_IOTJS_PATH,'config/nuttx/stm32f4dis/app/'),
- fs.join(DOCKER_NUTTX_APPS_PATH, 'system/iotjs/')])
-
- exec_docker(DOCKER_ROOT_PATH, [
- 'cp', '-r',
- fs.join(DOCKER_IOTJS_PATH,
- 'config/nuttx/stm32f4dis/config.travis'),
- fs.join(DOCKER_NUTTX_PATH,
- 'configs/stm32f4discovery/usbnsh/defconfig')])
-
- for buildtype in BUILDTYPES:
- exec_docker(DOCKER_NUTTX_PATH, ['make', 'distclean'])
- exec_docker(DOCKER_NUTTX_TOOLS_PATH,
- ['./configure.sh', 'stm32f4discovery/usbnsh'])
- exec_docker(DOCKER_NUTTX_PATH, ['make', 'clean'])
- exec_docker(DOCKER_NUTTX_PATH, ['make', 'context'])
- # Build IoT.js
- build_iotjs(buildtype, [
- '--target-arch=arm',
- '--target-os=nuttx',
- '--nuttx-home=' + DOCKER_NUTTX_PATH,
- '--target-board=stm32f4dis',
- '--jerry-heaplimit=78',
- '--profile=test/profiles/nuttx.profile'])
- # Build Nuttx
- if buildtype == "release":
- rflag = 'R=1'
- else:
- rflag = 'R=0'
- exec_docker(DOCKER_NUTTX_PATH, [
- 'make', 'all',
- 'IOTJS_ROOT_DIR=' + DOCKER_IOTJS_PATH, rflag])
-
- elif test == 'tizen':
- for buildtype in BUILDTYPES:
- if buildtype == "debug":
- exec_docker(DOCKER_IOTJS_PATH, [
- 'config/tizen/gbsbuild.sh',
- '--debug', '--clean'])
- else:
- exec_docker(DOCKER_IOTJS_PATH, ['config/tizen/gbsbuild.sh',
- '--clean'])
-
- elif test == "misc":
- ex.check_run_cmd('tools/check_signed_off.sh', ['--travis'])
- ex.check_run_cmd('tools/check_tidy.py')
-
- elif test == "external-modules":
- for buildtype in BUILDTYPES:
- build_iotjs(buildtype, [
- '--run-test=full',
- '--profile=test/profiles/host-linux.profile',
- '--external-modules=test/external_modules/'
- 'mymodule1,test/external_modules/mymodule2',
- '--cmake-param=-DENABLE_MODULE_MYMODULE1=ON',
- '--cmake-param=-DENABLE_MODULE_MYMODULE2=ON'])
-
- elif test == 'es2015':
- for buildtype in BUILDTYPES:
- build_iotjs(buildtype, [
- '--run-test=full',
- '--jerry-profile=es2015-subset'])
-
- elif test == "no-snapshot":
- for buildtype in BUILDTYPES:
- build_iotjs(buildtype, ['--run-test=full', '--no-snapshot',
- '--jerry-lto'])
-
- elif test == "host-darwin":
- for buildtype in BUILDTYPES:
- ex.check_run_cmd('./tools/build.py', [
- '--run-test=full',
- '--buildtype=' + buildtype,
- '--clean',
- '--profile=test/profiles/host-darwin.profile'])
-
- elif test == "asan":
- build_iotjs('debug', [
- '--compile-flag=-fsanitize=address',
- '--compile-flag=-O2'
- ] + BUILDOPTIONS_SANITIZER,
- ['ASAN_OPTIONS=detect_stack_use_after_return=1:'
- 'check_initialization_order=true:strict_init_order=true',
- 'TIMEOUT=600'])
-
- elif test == "ubsan":
- build_iotjs('debug', [
- '--compile-flag=-fsanitize=undefined'
- ] + BUILDOPTIONS_SANITIZER,
- ['UBSAN_OPTIONS=print_stacktrace=1', 'TIMEOUT=600'])
-
- elif test == "coverity":
- ex.check_run_cmd('./tools/build.py', ['--clean'])
+ JOBS[os.getenv('OPTS')]()