Skip to content

Improve output for cases when package build fails #143

@maxim-lobanov

Description

@maxim-lobanov

According to #137 and #78, tparse just writes build errors to stderr. Output example:

# github.com/***/***/internal/promotion
internal/promotion/***_test.go:17:42: expected ';', found testVar

With the current approach, it is super easy to miss such output and it is really complicated to find it by scrolling.
Also, stderr is written at the top of output. If you use --follow flag, you will get: stderr, then the full list of tests (which can be very very long), then summary about failed tests, then summary table. So, user has to scroll to the top to find build failure.

I propose to treat build failure as any other "failed test" error and print them before summary table:

--- BUILD ERROR: github.com/***/***/internal/promotion (0.00s)

    internal/promotion/***_test.go:17:42: 
                Error:          expected ';', found testVar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions