In the past test/run-test.sh run only one test case per call. This patch let it automatically run all test cases.
Currently test/run-test.sh cannot get the value of ${srcdir} and ${top_builddir}. Thus we cannot run any test case. This patch uses $0 to get the absolute path of run-test.sh. Now test cases work.