One of my projects' Makefile runs a bunch of tests on a headless browser for the functional test step. Most of the test is for the front-end code, but i also check for any error/warning on the backend.
Currently, we are cleaning the web server log, running all the (very slow) tests, and then grepping the server log for any error or warning.
i was wondering if there was any way to have a listener parsing the log (e.g. tail -f | grep
) starting on the background, and kill the make target if it detects any error/warning during the test run.
what i got so far was
- start long lived grep in the background and store PID.
- run tests.
- check output of long lived grep
- kill PID.
- in case of any error, fail.
This only bought me the advantage that now i do not lose the server logs on my dev box every time, as i do not have to clean it every time. But i still have to wait a long time (minutes) for a failure that may have occurred in the very first one.
is there any solution for it?
Aucun commentaire:
Enregistrer un commentaire