@@ -29,7 +29,8 @@ teardown() {
2929 ' @go.critical_section_end'
3030 assert_failure
3131 assert_log_equals RUN ' failing_function foo bar baz' \
32- FATAL ' failing_function foo bar baz (exit status 127)'
32+ FATAL ' failing_function foo bar baz (exit status 127)' \
33+ " $TEST_GO_SCRIPT :6 main"
3334}
3435
3536@test " $SUITE : log single failing command without executing during dry run" {
@@ -79,7 +80,8 @@ teardown() {
7980 assert_log_equals RUN ' echo Hello, World!' \
8081 ' Hello, World!' \
8182 RUN " failing_function foo bar baz" \
82- FATAL ' failing_function foo bar baz (exit status 127)'
83+ FATAL ' failing_function foo bar baz (exit status 127)' \
84+ " $TEST_GO_SCRIPT :7 main"
8385}
8486
8587@test " $SUITE : log multiple commands without executing during dry run" {
@@ -179,7 +181,8 @@ teardown() {
179181 RUN ' echo Hello, World!' \
180182 ' Hello, World!' \
181183 RUN ' failing_function foo bar baz' \
182- FATAL ' failing_function foo bar baz (exit status 127)'
184+ FATAL ' failing_function foo bar baz (exit status 127)' \
185+ " $TEST_GO_SCRIPT :12 main"
183186}
184187
185188@test " $SUITE : critical section counter does not go below zero" {
@@ -200,7 +203,8 @@ teardown() {
200203 RUN ' failing_function foo bar baz' \
201204 ERROR ' failing_function foo bar baz (exit status 127)' \
202205 RUN ' failing_function foo bar baz' \
203- FATAL ' failing_function foo bar baz (exit status 127)'
206+ FATAL ' failing_function foo bar baz (exit status 127)' \
207+ " $TEST_GO_SCRIPT :12 main"
204208}
205209
206210@test " $SUITE : log and run command script using @go" {
@@ -228,9 +232,14 @@ teardown() {
228232
229233 run test-go foo bar baz
230234 assert_failure
235+ set_go_core_stack_trace_components
231236 assert_log_equals RUN ' test-go project-command-script foo bar baz' \
232237 RUN ' failing_function foo bar baz' \
233- FATAL ' failing_function foo bar baz (exit status 127)'
238+ FATAL ' failing_function foo bar baz (exit status 127)' \
239+ " $TEST_GO_SCRIPTS_DIR /project-command-script:3 source" \
240+ " ${GO_CORE_STACK_TRACE_COMPONENTS[@]} " \
241+ " $( log_command_stack_trace_item) " \
242+ " $TEST_GO_SCRIPT :5 main"
234243}
235244
236245@test " $SUITE : critical section in command script applies to parent script" {
@@ -246,7 +255,12 @@ teardown() {
246255
247256 run test-go foo bar baz
248257 assert_failure
258+ set_go_core_stack_trace_components
249259 assert_log_equals RUN ' test-go project-command-script foo bar baz' \
250260 RUN ' failing_function foo bar baz' \
251- FATAL ' failing_function foo bar baz (exit status 127)'
261+ FATAL ' failing_function foo bar baz (exit status 127)' \
262+ " $TEST_GO_SCRIPTS_DIR /project-command-script:4 source" \
263+ " ${GO_CORE_STACK_TRACE_COMPONENTS[@]} " \
264+ " $( log_command_stack_trace_item) " \
265+ " $TEST_GO_SCRIPT :4 main"
252266}
0 commit comments