Skip to content

Commit 7acd688

Browse files
Roland Takacsyichoi
authored andcommitted
Print the return value of the engine in case of TizenRT.
Since TizenRT doesn't have any commands to get the return value of a process, added a debug print line that shows the return value. JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.uszeged@partner.samsung.com
1 parent a4afde2 commit 7acd688

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

targets/tizenrt-artik053/apps/jerryscript/jerry_main.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,21 @@ jerry_cmd_main (int argc, char *argv[])
482482
return ret_code;
483483
} /* jerry_cmd_main */
484484

485+
/**
486+
* Run JerryScript and print its return value.
487+
*/
488+
static int
489+
jerry(int argc, char *argv[])
490+
{
491+
int ret_code = jerry_cmd_main(argc, argv);
492+
493+
#ifdef CONFIG_DEBUG_VERBOSE
494+
jerry_port_log(JERRY_LOG_LEVEL_DEBUG, "JerryScript result: %d\n", ret_code);
495+
#endif
496+
497+
return ret_code;
498+
} /* jerry */
499+
485500
/**
486501
* Aborts the program.
487502
*/
@@ -554,6 +569,6 @@ int main (int argc, FAR char *argv[])
554569
int jerry_main (int argc, char *argv[])
555570
#endif
556571
{
557-
tash_cmd_install("jerry", jerry_cmd_main, TASH_EXECMD_SYNC);
572+
tash_cmd_install("jerry", jerry, TASH_EXECMD_SYNC);
558573
return 0;
559574
} /* main */

0 commit comments

Comments
 (0)