The handling of option defaults is already done in CMakeLists, it
is no good practice to duplicate the logic in the Makefile.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
They have been kept when the build system was refactored but it
turns out that they are not used at all (they are not passed on to
cmake).
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
* First of all, remove the counter-intuitive "OUT_DIR" second
argument of run-test-suite.sh. This, way, the invocation of the
script becomes easier to remember:
`tools/runners/run-test-suite.sh <engine> <testsuite>`
However, this also means that all output files (lists of
executed, passed, and failed tests) are generated in the current
working directory.
* Align the behaviour of run-unittests.sh with the above, i.e.,
don't try to guess where to put output files but write them in
the CWD.
* Adapt Makefile to the change in the use of the test runner
scripts: create and change to "check" directories before invoking
test runner scripts.
Extras:
* tools/runners/run-test-suite.sh collected fail tests from
directories twice. This does no harm but is inefficient, thus
removing.
* tools/runners/run-test-suite.sh was too permissive on the
contents of test suite list files. Better to accept those lines
only which really contain paths to JS test files.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
The legacy approach executed cppcheck for every build target, which
resulted in a huge number of re-checks of the sources if more than
one targets were built. The main reason behind that was to get the
right macro-guarded code paths analyzed. However, cppcheck can
analyze every configuration of the sources in one go.
(The patch also contains some aesthetic changes around the way
vera++ is called and how errors are reported.)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
* Removed unused or unnecessary parts from various make files
* Eliminated lots of duplications from Makefile with the help of
macros.
* Split tools/precommit.sh to its independent components:
* the part that checks the existence of the "signed off" text in
commit messages
(this on got factored out to tools/check-signed-off.sh),
* the part that uses vera++ for style checking (this one got
factored out to tools/check-vera.sh),
* the part that invokes targets in the cmake-generated build
directory, and
* the part that performs various tests (these latter two got
moved into the Makefile).
* Moved the functionality of precommit-full-testing.sh into the
Makefile, too.
* Added ninja build system support (e.g., `make NINJA=1`).
* Updated leading documentation comments (they were somewhat
stale).
* Tried to keep the target names exactly the same as they were --
almost succeeded... (some changes are intentional, and are
subject to personal preferences).
* Simplified console output of `make precommit`
* Unified test runner scripts and their output format
* Eliminated nothing-to-stdout everything-to-log-file policy:
info is printed to stdout and it is the caller's
responsibility to redirect it to a file if needed.
* Also applied some renaming and coding style unification to
the scripts.
* Merged the functionality of tools/runners/run-test-suite-jerry*.sh
into the Makefile
* Merged everything related to a test suite execution in a single
script.
* The new script also allows to specify pass and xfail tests in
a single list file, which was not possible hitherto.
* Also, the paths of the test cases given in a file are
interpreted relative to their container files.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
On Linux the original tr call did nothing and thus the Makefile
tried to load the toolchain_Linux_x86_64.cmake file, which doesn't exists.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
* Add build target 'darwin'
* Modify compiler options to work with clang
* Support 'jerry-libc' on Mac OS X
For MPU target build, install `gcc-arm-none-eabi` tool chain using `Homebrew` as following.
````
brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi
````
https://pixhawk.org/dev/toolchain_installation_mac
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
Precommit still depends on prerequisites, as it depends on vera++, etc.
Related issue: #516
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
The current `Makefile` works "as is" since `$(BUILD_ALL)` is
`build_all`. However, the target `build` depends on `$(BUILD_ALL)`,
so should that variable ever be changed, it will break.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
It is generally a good practice to have the `.PHONY` declarations
close to the affected targets themselves (instead of declaring them
phony in one group at the end of the `Makefile`) so as not to miss
any. (As it already happened to the `log`, `precommit`,
`build_all`, etc., targets.) Thus, removed the one big declaration
from the end of the file and prepended all phony targets with a
declaration separately.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Mostly, there is no need for joining commands with `&&` in recipes
since make already applies the exit-on-error functionality to each
executed line, unless there is a shell interdependency between them
(like setting environment variables in one command and using it in
another, or changing the working directory, which would not work
because of the new-subshell-per-line behaviour of make). Thus, some
independent commands can be split in the `Makefile` to improve
readability.
(Some space/tab inconsistensies are also fixed.)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
If `VERBOSE` is defined, cmake, sub-make, and tool logs are also
echoed on stdout. Default behaviour is still quiet mode, however.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Replace most of echo-suppressing `@`s with `$(Q)`. `$(Q)` defaults
to `@` to preserve current behaviour, however, should anyone need
or prefer echoed lines, defining `VERBOSE` on the command line for
make makes it possible.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
- introducing TEST_RANDOMIZE macro for randomization of source data used in unit tests;
- replacing assert with JERRY_ASSERT;
- renaming test_* to test-*.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
The modifier disables lookup cache and adds GC invocation after each opcode execution.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
The components are build independently and then are linked with main module corresponding to target platform.
Core is supposed to be platform-independent, while libc and plugins are dependent on specific architecture / platform.
The commit disables unit tests building and running during precommit.
That is supposed to be fixed in a subsequent commit.
Also, the commit disables building and running valgrind targets during precommit.
Build is supposed to be turned on by an option that should be introduced later.
Valgrind-checked runs are supposed to be performed in asynchronous mode.