duzy/gst-switch

Automated tests should be run with "make test"

mithro opened this issue · 9 comments

Fully automated tests which require no interaction from the user run when you do a "make test".

duzy commented

I think we already have it. test-ui now goes into "make demo".

When I say full automated, it should run and output something like

make test

Running testABC.... OK
Running testDEF.... OK
Running testGHI.... FAILED

How long should "make test" take to run?

Maybe the output should be;

make test

These tests will take around 5 minutes to run.
Running testABC.... OK
Running testDEF.... OK
Running testGHI.... FAILED

duzy commented

Understood, controlling the run time of each test case is possible, we actually have it already.

duzy commented

I think we just need to trim the output messages. As we already have automated test cases https://github.com/duzy/gst-switch/blob/switch/tests/test_switch_server.c#L1940.

duzy commented

Working on enhancing and refactoring the test facility.

$ make demo
make -C tests test-ui
make[1]: Entering directory `/home/tansell/gst/gst-switch/tests'
/gst-switch/ui: 
**
ERROR:test_switch_server.c:363:launch: assertion failed (error == NULL): Failed to execute child process "./tools/gst-switch-srv" (No such file or directory) (g-exec-error-quark, 8)
/bin/sh: line 1: 19745 Aborted                 (core dumped) ./test-switch-server --enable-test-ui
make[1]: Leaving directory `/home/tansell/gst/gst-switch/tests'
make -C tests test-switching
make[1]: Entering directory `/home/tansell/gst/gst-switch/tests'
/gst-switch/switching: 
**
ERROR:test_switch_server.c:363:launch: assertion failed (error == NULL): Failed to execute child process "./tools/gst-switch-srv" (No such file or directory) (g-exec-error-quark, 8)
/bin/sh: line 1: 19750 Aborted                 (core dumped) ./test-switch-server --enable-test-switching
make[1]: Leaving directory `/home/tansell/gst/gst-switch/tests'
make -C tests test-random
make[1]: Entering directory `/home/tansell/gst/gst-switch/tests'
/gst-switch/random: 
**
ERROR:test_switch_server.c:363:launch: assertion failed (error == NULL): Failed to execute child process "./tools/gst-switch-srv" (No such file or directory) (g-exec-error-quark, 8)
/bin/sh: line 1: 19755 Aborted                 (core dumped) ./test-switch-server --enable-test-random
make[1]: Leaving directory `/home/tansell/gst/gst-switch/tests'
make -C tests test-checking-timestamps
make[1]: Entering directory `/home/tansell/gst/gst-switch/tests'
/gst-switch/checking-timestamps: 
**
ERROR:test_switch_server.c:363:launch: assertion failed (error == NULL): Failed to execute child process "./tools/gst-switch-srv" (No such file or directory) (g-exec-error-quark, 8)
/bin/sh: line 1: 19761 Aborted                 (core dumped) ./test-switch-server --enable-test-checking-timestamps
make[1]: Leaving directory `/home/tansell/gst/gst-switch/tests'
duzy commented

Waiting for #10 to be solved, should it be closed.