The --test262-object option should be passed independently,
otherwise os.path.dirname(args.engine) in tools\runners\run-test-suite-test262.py
makes no sense
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
This makes have option to running test262-es2015 and test262-esnext with debug version
of jerryscript.
On OSX, the $RUNNER -q --jerry-tests are in dead loop, disable it first.
Increase TEST262_CASE_TIMEOUT to 180, so that --build-debug can pass the tests
without timeout
An side effect of this are
```
<test id="built-ins/decodeURIComponent/S15.1.3.2_A2.5_T1.js"><reason></reason></test>
<test id="built-ins/decodeURI/S15.1.3.1_A2.5_T1.js"><reason></reason></test>
```
passed
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
get_platform_cmd_prefix implement multiple times in multiple function.
Also add function get_python_cmd_prefix, call to python script always
add python command so that on windows, the python script doesn't have
executable permission also can be called.
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
- `finite` is not C99 but a BSD fp classification function, so it
is removed.
- The standard specifies that `isnan` is a macro (just like
`isfinite` and `isinf`), so the `isnan` function implementation
is removed.
- `isfinite` incorrectly classified NAN as finite, which is fixed.
- `isinf` returned 1 for negative infinity. This is not a bug
according to the standard, but is not aligned with recent glibc,
which returns -1. This is changed to simplify testing.
- Added test cases for `isfinite` and `isinf` to the unit test of
jerry-math.
- Added a new pass to unittests to ensure that jerry-math is
tested.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Remove redundancy between all-in-one and all-in-one-source builds
by keeping only the second, and adopt the more established term
"amalgamated" build for it. This change includes the following:
- Replace `ENABLE_ALL_IN_ONE` and `ENABLE_ALL_IN_ONE_SOURCE` cmake
options with `ENABLE_AMALGAM` top-level option.
- Replace `--all-in-one` option of `build.py` helper with
`--amalgam`.
- Merge the `srcmerger.py` and `srcgenerator.py` tool scripts into
`amalgam.py` (with improvements).
- Update documentation.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Normally, it is more usual and safe to use a toolchain's native
math library. Especially, if multiple components of a project use
math functions, in which case all components should be linked
against the same libm.
The libjerry-math can be used, of course, but as it needs extra
care and consideration, it should be opt-in.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
That "libm" in the name of the library resulted in awkward naming
on *nix systems (`libjerry-libm.*`, "lib" occurring twice). And the
name of the corresponding header is `math.h` anyway.
Note that this is a breaking change in some sense. The commit
contains no API change, but the build system does change for users
of the math library.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Few test-cases in test262 uses a $262 object to run a few method (for example detachedArrayBuffer)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
built-ins/RegExp/CharacterClassEscapes tests need more memory than 512Kb.
Additionally increase the timeout to make all tests pass on GitHub CI.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
With a disabled JERRY_BUILTIN_PROXY option the build fails becouse
of missing guards.
The run-test buildoption_test is also extended with this.
JerryScript-DCO-1.0-Signed-off-by: Adam Kallai kadam@inf.u-szeged.hu
Changes:
- Add new option to run-tests.py: --test262-test-list to run selected tests only
- Fix exclude list updater accordingly
- Run ESNext tests on GitHub CI in two batches to decrease runtime
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
Changes:
- Imported and unified test262 test harness for ES2015 and ESNext
- Simplified runner scripts accordingly
- Run tests on CI to be able detect regressions and progressions too
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
With a disabled ES2015 module system the build fails as an enum value
is incorrectly guarded and used.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
Changes:
- Add options to the test runner to be able to update exclude list
- Update the exclude list
- Make Travis CI signal if the exclude list isn't up-to-date
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
A list of changes:
- 'es2015-subset' profile is deprecated, and an 'es.next' profile is added.
- The default profile is changed to 'es.next'
- Renamed the JERRY_ES2015 guard to JERRY_ESNEXT
- Renamed JERRY_ES2015_BUILTIN_* guards to JERRY_BUILTIN_*
- Moved es2015 specific tests to a new 'es.next' subdirectory
- Updated docs, targets, and test runners to reflect these changes
Resolves#3737.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
Ubuntu 14.04 reached its end of life on April 30m 2019.
Let's bump the reference to the latest LTS, which is 18.04.
Ubuntu 18.04 has newer Pylint and Cppcheck, the necessary
fixes and suppresses are also included in this PR.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
since compatibility issues between es5.1 and es6 exist,
es5.1 specific directory is newly added which includes es5.1 specific test.
JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park hyukwoo.park@samsung.com
Changes:
- Typo fixed in cmake build system and appveyor config
- Added a new buildoption test
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
A large rework because surrogate pairs must be combined.
Currently only the 0x10C80..0x10CF2 is accepted as valid identifier character from the non-basic plane.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Changes:
* Bash based runners/run-test-suite.sh runner replaced with a python runner
* Common util functions moved to util.py
* Fixed EOL issues in tests directory
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
- Enable recursive GC marking with a limited recursion count (this option is configurable)
- No need to decrease the reference count of the gray objects anymore
- Bound function object marking is seperated into a helper function
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
MSVC doesn't support library constructor/destructor, let's disable
the related unittest and clarify the documentation and error messages.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
Changes:
* Bash based unittest runner replaced with a python runner
* Typo fixed in doctest cmake build system (python executable)
* run-tests.py prints error message if build fails
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
Also this patch introduces several helper function to find/put/delete properties by indexed property names to reduce code duplications.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This PR reduces the time it takes for Travis to complete the checks.
The following changes are made:
- Disabled LTO for test builds
- Merged Debugger tests into x86-64 Conformance tests
- Moved the INIT_FINI unittests into the regular unittests
- Merged SonarQube and Coverity Scan tasks
- Re-arranged some of the tasks
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This patch unifies the recursion limit checking for RegExp, function call and JSON as well.
Until now the limit was only a counter which was increased/decreased at certain points.
This counter has been substituted with a numeric limit which allows to restrict the stack usage.
This patch fixes#2963 and resolves the closed#2258 issue.
Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
VM_RECURSION_LIMIT only prevented the recursion of interpreted codeblocks but
native/builtin function calls can also create stack overflow due to the too deep recursion.
This patch fixes#2905.
Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
The CI ran test262 test suite in release mode only to save time.
This patch enables the debug testing on the test suite, which means
the runtime of the "Conformance Tests" job will increase by a few
minutes.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
Introduce a new way of building: before any file is compiled
all source files are combined into a single C file and all
header files into a single H file (per subdir).
This new approach makes it possible to quickly integrate JerryScript
into other projects:
```
$ gcc -o demo demo.c jerryscript.c jerryscript-port-default.c -lm
```
To use the source generator run:
```
$ cmake -Bbuild_dir -H. -DENABLE_ALL_IN_ONE_SOURCE=ON
$ make -C build_dir generate-single-source
```
This will create the following files in the `build_dir`:
* jerryscript.c
* jerryscript.h
* jerryscript-config.h
* jerryscript-port-default.c
* jerryscript-port-default.h
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This patch adds posibility to supervise the VM call stack to avoid aborts/crashes due to the recursion calls.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
The regexp engine does not have any recursion depth check, thus it can cause problems with various regexps. Added a new build option `--regexp-recursion-limit N` whose
default value is 0, which is for unlimited recursion depth. Also added a build-option-test.
Fixes#2448Fixes#2190
JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
Because these feature guards don't have their counterpart options in cmake, they
seem to be less tested. This commit makes them build-tested at least.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
The `-m32/64` compiler flags are x86/64-specific (mostly; at least in the
context of JerryScript-supported architectures) and macOS has deprecated 32-bit
support, so it's better to keep the build-testing of `-m32` to x86[-64]/Linux
only.
JerryScript-DCO-1.0-Signed-off-by: Renata Hodovan reni@inf.u-szeged.hu
The America/Los_Angeles time zone is already enforced for test262
Travis CI jobs but that doesn't guarantee the correctness of
locally executed tests. So, this patch moves the setting of the
`TZ` environment variable from `.travis.yml` to `run-tests.py`.
The date-related tests in the jerry test suite also rely on a time
zone (UTC). Thus, `TZ` is forced for those tests, too.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Rationale:
- There is no port under targets/ that would use it. All of them
turn it off when building.
- That's no surprise, as jerry-libc supports no barebone MCUs but
posix targets with syscalls only. Actually, that's Linux only,
because macOS builds have turned off the use of jerry-libc a
while ago.
- And there is no point in maintaining a highly restricted set of
libc functions: as soon as someone wants to use JerryScript in a
scenario that needs more functions than jerry-main, they have to
choose a different libc (most problably the compiler's default
one).
I think that we should not keep supporting an otherwise unused
library for the purposes of jerry-main on arm/x86/x64-linux only.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu