lfe-deprecated / lfetool

DEPRECATED - See:
https://github.com/lfe-rebar3/
Other
61 stars 19 forks source link

Update lfetool to use the new ltest runner #160

Open oubiwann opened 9 years ago

oubiwann commented 9 years ago

Output example:

Code has landed in ltest master:

ltest has a make target that runs this test runner:

check-runner-ltest: compile-no-deps compile-tests
        @clear
        @PATH=$(SCRIPT_PATH) ERL_LIBS=$(ERL_LIBS) \
        erl -cwd "`pwd`" -listener ltest-listener -eval \
        "case 'ltest-runner':all() of ok -> halt(0); _ -> halt(127) end" \
        -noshell

Hrm, I guess I should file a ticket in ltool, too -- since a CLI module should support this (wrapping the different halt conditions).

Once that's done, lfetool can use the new ltool-cli module. It should be as simple as, for example, updating the lfetool tests all from this:

run_all_tests () {
    status=0
    build_tests
    only_run_unit_tests || status=$?
    only_run_integration_tests || status=$?
    only_run_system_tests || status=$?
    return $status
}

to this:

run_all_tests () {
    build_tests
    erl -cwd "`pwd`" -eval "'ltool-cli':'run-all-tests'()" -noshell
}