Skip to content

Commit 836a14e

Browse files
sergioamrAkromx16
authored andcommitted
Added verbose to test in different enviroments
JerryScript-DCO-1.0-Signed-off-by: Sergio Martinez [email protected]
1 parent ce90548 commit 836a14e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

targets/arduino_101/src/main-zephyr.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,24 +122,24 @@ static int shell_cmd_handler (int argc, char *argv[])
122122

123123
* (d - 1) = '\0';
124124

125-
if (flags & VERBOSE)
126-
{
127-
printf ("[%s] %lu\n", source_buffer, strlen (source_buffer));
128-
}
129-
130125
jerry_completion_code_t ret_code;
131126

132127
ret_code = jerry_run_simple ((jerry_char_t *) source_buffer,
133128
strlen (source_buffer),
134129
JERRY_FLAG_EMPTY);
135130

136-
free (source_buffer);
137-
138131
if (ret_code != JERRY_COMPLETION_CODE_OK)
139132
{
140133
printf ("Failed to run JS\n");
141134
}
142135

136+
if (flags & VERBOSE || ret_code != JERRY_COMPLETION_CODE_OK)
137+
{
138+
printf ("[%s] %lu\n", source_buffer, strlen (source_buffer));
139+
}
140+
141+
free (source_buffer);
142+
143143
return 0;
144144
} /* shell_cmd_handler */
145145

0 commit comments

Comments
 (0)