X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2Fdlog_test_header.in;h=d07099434ea86e1ab51b347414c8f2bee2522517;hb=8c10a6edb0c9545df451fe7649066616d0870cfa;hp=730ce3a08be14205c14e5928f29b828d0ebe36b8;hpb=94630d47d0680dae9c3e6f62282c88df0f257aa1;p=platform%2Fcore%2Fsystem%2Fdlog.git diff --git a/tests/dlog_test_header.in b/tests/dlog_test_header.in index 730ce3a..d070994 100644 --- a/tests/dlog_test_header.in +++ b/tests/dlog_test_header.in @@ -54,6 +54,17 @@ TESTDIR=/var/lib/dlog-tests ######## Utility functions +cleanup() { + [ "$UTIL_PID" -ne -1 ] && kill "$UTIL_PID" > /dev/null 2>&1 + [ "$MT_TEST" -ne -1 ] && kill "$MT_TEST" > /dev/null 2>&1 + [ "$LOGGER" -ne -1 ] && kill "$LOGGER" > /dev/null 2>&1 + # Shellcheck doesn't like this because the rm call is bad if $TESTDIR is empty. + # However, such cases would be caught by the conditional. + # shellcheck disable=SC2115 + [ -d "$TESTDIR" ] && rm -rf "$TESTDIR"/* + [ -d "$RUNTIME_FILTERS_DIR" ] && rm -rf "$RUNTIME_FILTERS_DIR" +} + extract_timestamp() { ts=0 case "$1" in @@ -87,3 +98,21 @@ extract_timestamp() { echo "$ts" } +###### +if [ "$1" = "pipe" ]; then + type="pipe" +elif [ "$1" = "logger" ]; then + type="logger" +elif [ "$1" = "zero-copy" ]; then + type="zero-copy" +elif [ "$1" = "pipe_quick" ]; then + type="pipe" + quick=1 +elif [ "$1" = "logger_quick" ]; then + type="logger" + quick=1 +else + echo "$USAGE_MESSAGE" + exit 1 +fi +