Merge branch 'master' of git-server:jerry
This commit is contained in:
@@ -79,11 +79,14 @@ all: precommit
|
||||
|
||||
PRECOMMIT_CHECK_TARGETS_LIST= debug.linux-sanitize.check \
|
||||
debug.linux-valgrind.check \
|
||||
debug.linux-musl-valgrind.check \
|
||||
debug_release.linux-sanitize.check \
|
||||
debug_release.linux-valgrind.check \
|
||||
debug_release.linux-musl.check \
|
||||
release.linux-sanitize.check \
|
||||
release.linux-musl-valgrind.check \
|
||||
release.linux-libc_raw-valgrind.check
|
||||
release.linux-valgrind.check \
|
||||
release.linux.check
|
||||
|
||||
push: ./tools/push.sh
|
||||
@ ./tools/push.sh
|
||||
@@ -95,13 +98,43 @@ precommit: clean
|
||||
@ echo -e "All targets were built successfully. Starting unit tests' build and run.\n"
|
||||
@ $(MAKE) unittests TESTS_OPTS="--silent"
|
||||
@ echo -e "Unit tests completed successfully. Starting parse-only testing.\n"
|
||||
@ $(MAKE) $(PRECOMMIT_CHECK_TARGETS_LIST) TESTS_DIR=./tests/jerry TESTS_OPTS="--parse-only" OUTPUT_TO_LOG=enable
|
||||
@ echo -e "\e[0;31mFIXME:\e[0m './benchmarks/jerry parse-only' testing skipped.\n"; # $(MAKE) -s $(PRECOMMIT_CHECK_TARGETS_LIST) TESTS_DIR=./benchmarks/jerry TESTS_OPTS="--parse-only" OUTPUT_TO_LOG=enable
|
||||
@ # Parse-only testing
|
||||
@ for path in "./tests/jerry" "./benchmarks/jerry"; \
|
||||
do \
|
||||
run_ids=""; \
|
||||
for check_target in $(PRECOMMIT_CHECK_TARGETS_LIST); \
|
||||
do \
|
||||
$(MAKE) -s -f Makefile.mk TARGET=$$check_target $$check_target TESTS_DIR="$$path" TESTS_OPTS="--parse-only" OUTPUT_TO_LOG=enable & \
|
||||
run_ids="$$run_ids $$!"; \
|
||||
done; \
|
||||
result_ok=1; \
|
||||
for run_id in $$run_ids; \
|
||||
do \
|
||||
wait $$run_id || result_ok=0; \
|
||||
done; \
|
||||
[ $$result_ok -eq 1 ] || exit 1; \
|
||||
done
|
||||
@ echo -e "Parse-only testing completed successfully. Starting full tests run.\n"
|
||||
@ echo -e "\e[0;31mFIXME:\e[0m Full testing skipped.\n"; # $(MAKE) -s $(PRECOMMIT_CHECK_TARGETS_LIST) TESTS_DIR=./tests/jerry OUTPUT_TO_LOG=enable
|
||||
@ echo -e "\e[0;31mFIXME:\e[0m Full testing skipped.\n";
|
||||
@ # Full testing
|
||||
@ # for path in "./tests/jerry" "./benchmarks/jerry"; \
|
||||
# do \
|
||||
# run_ids=""; \
|
||||
# for check_target in $(PRECOMMIT_CHECK_TARGETS_LIST); \
|
||||
# do \
|
||||
# $(MAKE) -s -f Makefile.mk TARGET=$$check_target $$check_target TESTS_DIR="$$path" TESTS_OPTS="" OUTPUT_TO_LOG=enable & \
|
||||
# run_ids="$$run_ids $$!"; \
|
||||
# done; \
|
||||
# result_ok=1; \
|
||||
# for run_id in $$run_ids; \
|
||||
# do \
|
||||
# wait $$run_id || result_ok=0; \
|
||||
# done; \
|
||||
# [ $$result_ok -eq 1 ] || exit 1; \
|
||||
# done
|
||||
@ echo -e "Full testing completed successfully\n\n================\n\n"
|
||||
|
||||
$(JERRY_TARGETS) $(TESTS_TARGET) $(FLASH_TARGETS) $(CHECK_TARGETS):
|
||||
$(JERRY_TARGETS) $(TESTS_TARGET) $(FLASH_TARGETS):
|
||||
@$(MAKE) -s -f Makefile.mk TARGET=$@ $@
|
||||
|
||||
clean:
|
||||
|
||||
+6
-5
@@ -68,7 +68,7 @@ parser_run (const char *script_source, size_t script_source_size, bool is_show_o
|
||||
return opcodes;
|
||||
}
|
||||
|
||||
static void
|
||||
static int
|
||||
jerry_run (const char *script_source, size_t script_source_size, bool is_parse_only,
|
||||
bool is_show_opcodes)
|
||||
{
|
||||
@@ -82,12 +82,12 @@ jerry_run (const char *script_source, size_t script_source_size, bool is_parse_o
|
||||
|
||||
if (is_parse_only)
|
||||
{
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
init_int (opcodes);
|
||||
|
||||
run_int ();
|
||||
return run_int () ? 0 : 1;
|
||||
} /* jerry_run */
|
||||
|
||||
#ifdef __TARGET_HOST_x64
|
||||
@@ -199,13 +199,14 @@ main (int argc __unused,
|
||||
size_t source_size;
|
||||
const char *source_p = read_sources (file_names, files_counter, &source_size);
|
||||
|
||||
jerry_run (source_p, source_size, parse_only, show_opcodes);
|
||||
int ret = jerry_run (source_p, source_size, parse_only, show_opcodes);
|
||||
|
||||
if (print_mem_stats)
|
||||
{
|
||||
mem_heap_print( false, false, true);
|
||||
}
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user