Cppcheck has already been used for checking unit test sources
statically but vera++ style-checking of unit tests was left out,
most probably only by mistake. This patch adds unit tests to the
set of style-checked sources and also fixes the stlye issues that
were present in the test code.
(Extra: since the project is pure C now, not trying to collect
*.cpp files anymore.)
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
Fully fledged checks, builds, and tests on Linux, non-voting native
builds and unit tests on OS X.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Always write results on stdout and save markdown file optionally.
Use "Peak allocated" if binaries were built with MEM_STATS.
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
* 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
Rely on platform-provided versions. Thus, no need to download and
build them, neither to wrap them with shell scripts. CMake and
precommit updated to call the new tools. Development documentation
also updated/simplified.
PS: On my Ubuntu 14.04.3, cppcheck has version 1.61, while prereq
version was 1.69. The older version reports and fails on a strange
style issue in ecma/builtin-objects/ecma-builtin-helpers.cpp, for
which the only solution found was to suppress the cppcheck errors
with `variableScope` id for that file.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
The tool became bitrotten. Bringing it up-to-date to handle the
output of jerry and rss-measure.sh properly.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
- perf: bypass the regex interpreting error of 'sed'.
- rss-measure: use alternative way to measure approx. RSS.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
The old script behaved incorrectly as it replaced all '*' occurrences
with the list of files in the given directory.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
- 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
Using the find program with an argument "*" could lead to problems.
If there are ".js" files in the executing directory then the
shell replaces the asterisk with that filenames.
The fix is simple: quote the argument which has the asterisk.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com