From: Jakub Izydorczyk Date: Thu, 2 Apr 2015 10:12:55 +0000 (+0200) Subject: [Unit tests] Add script run-unit-tests.sh X-Git-Tag: accepted/tizen/common/20150430.095307~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2491c3d950de80b3fe95a333595fcbe0a91636b;p=platform%2Fcore%2Fappfw%2Fapp-installers.git [Unit tests] Add script run-unit-tests.sh Script runs all unit tests for app-installer. After all the results are available in xml files in /usr/bin/app-installers-ut/ directory. Change-Id: Ibe8ecd349b272cd00ad1761d906f548ca7ce4321 --- diff --git a/src/unit_tests/CMakeLists.txt b/src/unit_tests/CMakeLists.txt index 399ae76..db1e512 100644 --- a/src/unit_tests/CMakeLists.txt +++ b/src/unit_tests/CMakeLists.txt @@ -15,6 +15,8 @@ ADD_EXECUTABLE(xml_parser_unittest xml_parser_unittest.cc ../xml_parser/xml_parser.cc) INSTALL(DIRECTORY test_samples/ DESTINATION ${SHAREDIR}/${DESTINATION_DIR}/test_samples) +INSTALL(FILES run-unit-tests.sh DESTINATION ${BINDIR}/app-installers-ut/ + PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ) FOREACH(test ${TESTS}) APPLY_PKG_CONFIG(${test} PUBLIC diff --git a/src/unit_tests/run-unit-tests.sh b/src/unit_tests/run-unit-tests.sh new file mode 100755 index 0000000..26db6c3 --- /dev/null +++ b/src/unit_tests/run-unit-tests.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +test_dir="`dirname $0`/*" +for file in $test_dir +do + if test -f "$file"; then + if [[ -x "$file" && ${file: -3} != ".sh" ]]; then + $file --gtest_output=xml:$file.xml + fi + fi +done