Build DPM for TM1. Modify agent
authorAndrey Zabolotnyi <a.zabolotnyi@samsung.com>
Tue, 19 Sep 2017 12:13:59 +0000 (15:13 +0300)
committerAndrey Zabolotnyi <a.zabolotnyi@samsung.com>
Tue, 19 Sep 2017 12:13:59 +0000 (15:13 +0300)
45 files changed:
agent/packaging/agent.spec
agent/scripts/.device-agent [new file with mode: 0644]
agent/scripts/.gitignore
agent/scripts/build.sh
agent/scripts/build_and_coverage_ubuntu.sh [new file with mode: 0755]
agent/scripts/common.sh [changed mode: 0755->0644]
agent/scripts/gcovr [new file with mode: 0755]
agent/scripts/ssh_deploy.sh
agent/src/main.cpp
device-policy-manager/CMakeFiles/Makefile.cmake
device-policy-manager/CMakeFiles/Makefile2
device-policy-manager/CMakeLists.txt
device-policy-manager/Makefile
device-policy-manager/libs/bluetooth.cpp
device-policy-manager/libs/dpm/restriction.cpp
device-policy-manager/packaging/device-policy-manager.spec
device-policy-manager/scripts/build.sh
device-policy-manager/scripts/gbs.conf
device-policy-manager/server/CMakeLists.txt
device-policy-manager/server/bluetooth.cpp
device-policy-manager/server/main.cpp
device-policy-manager/server/restriction.cpp
device-policy-manager/server/server.h
device-policy-manager/server/wifi.cpp
device-policy-manager/tests/Makefile
device-policy-manager/tests/cmake_install.cmake [new file with mode: 0644]
device-policy-manager/tools/CMakeFiles/progress.marks
device-policy-manager/tools/cli/CMakeFiles/dpm-admin-cli.dir/build.make [changed mode: 0755->0644]
device-policy-manager/tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o [changed mode: 0755->0644]
device-policy-manager/tools/cli/CMakeFiles/dpm-admin-cli.dir/flags.make [changed mode: 0755->0644]
device-policy-manager/tools/cli/CMakeFiles/dpm-admin-cli.dir/link.txt [changed mode: 0755->0644]
device-policy-manager/tools/cli/CMakeFiles/dpm-admin-cli.dir/progress.make
device-policy-manager/tools/cli/CMakeFiles/progress.marks
device-policy-manager/tools/cli/cmake_install.cmake [new file with mode: 0644]
device-policy-manager/tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/DependInfo.cmake [changed mode: 0755->0644]
device-policy-manager/tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/build.make [changed mode: 0755->0644]
device-policy-manager/tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/flags.make [changed mode: 0755->0644]
device-policy-manager/tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/link.txt [changed mode: 0755->0644]
device-policy-manager/tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/progress.make
device-policy-manager/tools/syspopup/CMakeFiles/progress.marks
device-policy-manager/tools/syspopup/po/CMakeFiles/po.dir/DependInfo.cmake [changed mode: 0755->0644]
device-policy-manager/tools/syspopup/po/CMakeFiles/po.dir/depend.internal [changed mode: 0755->0644]
device-policy-manager/tools/syspopup/po/CMakeFiles/po.dir/progress.make
device-policy-manager/tools/syspopup/po/CMakeFiles/progress.marks
device_core/nmdaemon/dpm/dpm_api_mapper.cpp

index 07d84ef..07be117 100644 (file)
@@ -13,7 +13,7 @@ BuildRequires:  pkgconfig(dpm)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(jsoncpp)
 %if ("%{GTEST_TYPE}" == "mock")
-BuildRequires: pkgconfig(gtest_gmock)
+BuildRequires: pkgconfig(gmock)
 %else
 BuildRequires: gtest
 BuildRequires: gtest-devel
@@ -23,7 +23,7 @@ BuildRequires: gtest-devel
 %define _tests_dir /usr/bin
 %define _manifestdir /usr/share/packages
 %if ("%{GTEST_TYPE}" == "mock")
-%define _gtest_lib gtest_gmock
+%define _gtest_lib gmock
 %else
 %define _gtest_lib gtest
 %endif
diff --git a/agent/scripts/.device-agent b/agent/scripts/.device-agent
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
index 5da2cd8..9c5e689 100644 (file)
@@ -1 +1 @@
-.device-agent
\ No newline at end of file
+.device
\ No newline at end of file
index 8624ef5..140df84 100755 (executable)
@@ -1,69 +1,99 @@
 #!/bin/bash
 
+##############################################
+# Definitions
+##############################################
+
 SCRIPT_PATH=$(readlink -m ${0})
 SCRIPT_DIR=${SCRIPT_PATH%/*}
 ROOT_DIR=${SCRIPT_DIR}/..
-DEVICE_TEMP=${SCRIPT_DIR}/.device-agent
+BUILD_TYPE="RELEASE"
+USE_CLEAN=
 
-if [ ! -e "$DEVICE_TEMP" ] ; then
-    DEVICE_PREV=1
-else
-    DEVICE_PREV=`cat $DEVICE_TEMP`
-fi
+source $SCRIPT_DIR/common.sh
 
-if [ -z "$1" ]; then
-    DEVICE=$DEVICE_PREV
-else
-    # Clean incremental build after changing $DEVICE
-    if [ $1 -ne $DEVICE_PREV ]; then
-        rm -r ${SCRIPT_DIR}/../build-gbs
-    fi
-    DEVICE=$1
-fi
 
-echo "$DEVICE" > $DEVICE_TEMP
-
-GREEN='\033[0;32m'
-NC='\033[0m'
-
-declare -a DEVICE_ARRAY=(
-"TM2 mobile"
-"TM1 mobile"
-"Kant TV"
-"Kant TV Tizen 4.0"
-)
-
-arraylength=${#DEVICE_ARRAY[@]}
-for (( i=0; i<${arraylength}; i++ ));
-do
-       if [ $i -eq $DEVICE ]; then
-               echo -e "${GREEN}$i) ${DEVICE_ARRAY[$i]}${NC}"
-       else
-               echo "$i) ${DEVICE_ARRAY[$i]}"
+
+##############################################
+# Option handler
+##############################################
+
+function Usage {
+       echo "Usage: $0 [options]"
+
+       echo -e "\t-[0-$LAST_PROFILE_NUM] - profile:"
+       for (( i=0; i<${PROFILES_COUNT}; i++ )); do
+               echo -e "\t\t\t-$i - ${PROFILES_ARRAY[$i]}"
+       done
+       echo -e "\t-c, --clean - run clean before build"
+       echo -e "\t-g, --gcov - run with coverage"
+       echo -e "\t-d, --debug - set buid configuration to DEBUG, default is RELEASE"
+       echo -e "\t-h, --help - print this help and exit"
+       exit 0
+}
+
+OPTIONS=`getopt -o 0123456789s:cdhg --long clean,debug,help,gcov -n 'Error: ' -- "$@"`
+[ $? -eq 0 ] || {
+       echo "Incorrect options provided"
+       Usage
+       exit 1
+}
+
+eval set -- "$OPTIONS"
+
+while true; do
+case $1 in
+-*[0-9]*)
+       DEVICE=${1:1}
+       if [ $DEVICE -gt $LAST_PROFILE_NUM ]; then
+               echo -e "${RED}Wrong profile number: ${DEVICE}${NC}"
+               exit -1
        fi
+       shift
+;;
+"-g" | "--gcov")
+       echo -e "${BLUE}Coverage enabled${NC}"
+       BUILD_TYPE="CCOV"
+       shift
+;;
+"-c" | "--clean")
+       echo -e "${BLUE}Clean enabled${NC}"
+       USE_CLEAN="--clean"
+       shift
+;;
+"-d" | "--debug")
+       echo -e "${YELLOW}DEBUG enabled${NC}"
+       BUILD_TYPE="DEBUG"
+       shift
+;;
+"-h" | "--help")
+       Usage
+       exit 0
+;;
+*)
+       break
+;;
+esac
 done
-echo -e "\n\n"
 
 
-case $DEVICE in
-       0) PROFILE=profile.tm2_tizen4 ; TARGET_ARCH=aarch64 ; GTEST_TYPE="main" ;;
-       1) PROFILE=profile.tm1_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ;;
-       2) PROFILE=profile.Main2017_KantM ; TARGET_ARCH=armv7l ; GTEST_TYPE="mock" ;;
-       3) PROFILE=profile.kantm_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ;;
-       ?) echo "error: unknown DEVICE number"; exit 1 ;;
-esac
 
+##############################################
+# Configuring
+##############################################
 
+readTempFile
 
+if [ ! -z "$DEVICE" ]; then
+       # Clean incremental build after changing $DEVICE
+       if [ $DEVICE -ne $DEVICE_PREV ]; then
+               rm -r ${SCRIPT_DIR}/../build-gbs
+       fi
+fi
 
-for ARG in $*
-do
-    echo $ARG
-    if [ "DEBUG" = $ARG ];then
-        DEBUG_ON=1
-        echo 'DEBUG ON'
-    fi
-done
+saveTempFile
+getBuildConfigs
+printDeviceChoice
 
 cd $ROOT_DIR
 
@@ -76,13 +106,36 @@ git commit -m "commit needed for GBS"
 trap cleanup INT
 
 function cleanup() {
-    rm -rf ${ROOT_DIR}/.git
-    exit 0
+       rm -rf ${ROOT_DIR}/.git
+       exit 0
 }
 
-gbs --conf ${SCRIPT_DIR}/gbs.conf build -P ${PROFILE} -A ${TARGET_ARCH} --incremental --include-all --threads 1 \
-       --define '__debug_install_post %{nil}' --define 'debug_package %{nil}' \
-       --define 'DEBUG '$DEBUG_ON --define 'GTEST_TYPE '$GTEST_TYPE
+NCPU=`nproc --ignore=1`
+if [ $NCPU -eq 0 ]; then
+       NCPU=1
+fi
+
+# Clean gbs root cache
+if [ ! -z "$USE_CLEAN" ]; then
+       echo "Removing cache files: ~/gbs_root_${PROFILE_NAME}/local/cache/*/repodata"
+       rm -rf ~/gbs_root_${PROFILE_NAME}/local/cache/*/repodata
+       echo "---------------------------------"
+fi
+
+GTEST_TYPE="mock"
+
+##############################################
+# Main build
+##############################################
+
+gbs --conf ${SCRIPT_DIR}/gbs.conf build -P ${PROFILE} -A ${TARGET_ARCH} \
+       --incremental ${USE_CLEAN} --include-all --threads 1 \
+       --define '__debug_install_post %{nil}' \
+       --define 'debug_package %{nil}' \
+       --define '_smp_nproc '$NCPU \
+       --define 'build_type '$BUILD_TYPE \
+       --define 'GTEST_TYPE '$GTEST_TYPE \
+       --define 'dpm_type '$DPM_TYPE \
+       #eol
 
-#remove temporary files
 cleanup
diff --git a/agent/scripts/build_and_coverage_ubuntu.sh b/agent/scripts/build_and_coverage_ubuntu.sh
new file mode 100755 (executable)
index 0000000..d3f63fd
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# @author Oleksandr Samoylov  (o.samoylov@samsung.com)
+
+SCRIPT_PATH=$(readlink -m ${0})
+SCRIPT_DIR=${SCRIPT_PATH%/*}
+ROOT_DIR=${SCRIPT_DIR}/..
+
+#remove old build
+rm -r ${ROOT_DIR}/build
+rm -r ${ROOT_DIR}/install
+
+#build project with CCOV type
+cd ${ROOT_DIR}
+cmake -H./ -B./build -DFLAVOR=UBUNTU -DDEBUG=1 -DCMAKE_BUILD_TYPE=CCOV
+cd build
+
+make install -j4 VERBOSE=1
+make runtests
+make coverage
old mode 100755 (executable)
new mode 100644 (file)
index 1ec2dac..c839ceb
@@ -21,9 +21,9 @@ declare -a RASPBERRY_PI_S=(
 )
 
 declare -a PROFILES_ARRAY=(
-"TM2 mobile"
+"TM2 mobile (deprecated)"
 "TM1 mobile / RaspberryPi3"
-"Kant TV Tizen 3.0"
+"Kant TV Tizen 3.0 (deprecated)"
 "Kant TV Tizen 4.0"
 )
 
@@ -73,10 +73,10 @@ function saveTempFile() {
 
 function getBuildConfigs {
        case $DEVICE in
-               0) PROFILE_NAME=tm2_tizen4 ; TARGET_ARCH=aarch64 ; GTEST_TYPE="main" ; KNOWN_DEVICES=() ;;
-               1) PROFILE_NAME=tm1_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ; KNOWN_DEVICES=( ${RASPBERRY_PI_S[@]} ) ;;
-               2) PROFILE_NAME=kantm_tizen3 ; TARGET_ARCH=armv7l ; GTEST_TYPE="mock" ; KNOWN_DEVICES=( ${KANTM_TV_S[@]} ) ;;
-               3) PROFILE_NAME=kantm_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ; KNOWN_DEVICES=( ${KANTM_TV_S[@]} ) ;;
+               0) PROFILE_NAME=tm2_tizen4 ; TARGET_ARCH=aarch64 ; GTEST_TYPE="main" ; KNOWN_DEVICES=() ; DPM_TYPE="MOBILE" ;;
+               1) PROFILE_NAME=tm1_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ; KNOWN_DEVICES=( ${RASPBERRY_PI_S[@]} ) ; DPM_TYPE="MOBILE" ;;
+               2) PROFILE_NAME=kantm_tizen3 ; TARGET_ARCH=armv7l ; GTEST_TYPE="mock" ; KNOWN_DEVICES=( ${KANTM_TV_S[@]} ) ; DPM_TYPE="TV" ;;
+               3) PROFILE_NAME=kantm_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ; KNOWN_DEVICES=( ${KANTM_TV_S[@]} ) ; DPM_TYPE="TV" ;;
                *) echo -e "${RED}error: unknown DEVICE number${NC}"; exit 1 ;;
        esac
        PROFILE=profile.${PROFILE_NAME}
diff --git a/agent/scripts/gcovr b/agent/scripts/gcovr
new file mode 100755 (executable)
index 0000000..bbbe692
--- /dev/null
@@ -0,0 +1,2334 @@
+#!/usr/bin/python
+# -*- coding:utf-8 -*-
+#
+# A report generator for gcov 3.4
+#
+# This routine generates a format that is similar to the format generated
+# by the Python coverage.py module.  This code is similar to the
+# data processing performed by lcov's geninfo command.  However, we
+# don't worry about parsing the *.gcna files, and backwards compatibility for
+# older versions of gcov is not supported.
+#
+# Outstanding issues
+#   - verify that gcov 3.4 or newer is being used
+#   - verify support for symbolic links
+#
+# gcovr is a FAST project.  For documentation, bug reporting, and
+# updates, see https://software.sandia.gov/trac/fast/wiki/gcovr
+#
+#  _________________________________________________________________________
+#
+#  Gcovr: A parsing and reporting tool for gcov
+#  Copyright (c) 2013 Sandia Corporation.
+#  This software is distributed under the BSD License.
+#  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+#  the U.S. Government retains certain rights in this software.
+#  For more information, see the README.md file.
+# _________________________________________________________________________
+#
+# $Revision$
+# $Date$
+#
+
+try:
+    import html
+except:
+    import cgi as html
+import copy
+import os
+import re
+import subprocess
+import sys
+import time
+import xml.dom.minidom
+import datetime
+import posixpath
+import itertools
+import zlib
+
+from optparse import OptionParser
+from string import Template
+from os.path import normpath
+
+try:
+    xrange
+except NameError:
+    xrange = range
+
+medium_coverage = 75.0
+high_coverage = 90.0
+low_color = "LightPink"
+medium_color = "#FFFF55"
+high_color = "LightGreen"
+covered_color = "LightGreen"
+uncovered_color = "LightPink"
+takenBranch_color = "Green"
+notTakenBranch_color = "Red"
+
+__version__ = "3.3"
+src_revision = "$Revision$"
+
+output_re = re.compile("[Cc]reating [`'](.*)'$")
+source_re = re.compile("[Cc]annot open (source|graph) file")
+
+starting_dir = os.getcwd()
+
+exclude_line_flag = "_EXCL_"
+exclude_line_pattern = re.compile('([GL]COVR?)_EXCL_(LINE|START|STOP)')
+
+c_style_comment_pattern = re.compile('/\*.*?\*/')
+cpp_style_comment_pattern = re.compile('//.*?$')
+
+
+def version_str():
+    ans = __version__
+    m = re.match('\$Revision:\s*(\S+)\s*\$', src_revision)
+    if m:
+        ans = ans + " (r%s)" % (m.group(1))
+    return ans
+
+
+#
+# Container object for coverage statistics
+#
+class CoverageData(object):
+    def __init__(
+            self, fname, uncovered, uncovered_exceptional, covered, branches,
+            noncode):
+        self.fname = fname
+        # Shallow copies are cheap & "safe" because the caller will
+        # throw away their copies of covered & uncovered after calling
+        # us exactly *once*
+        self.uncovered = copy.copy(uncovered)
+        self.uncovered_exceptional = copy.copy(uncovered_exceptional)
+        self.covered = copy.copy(covered)
+        self.noncode = copy.copy(noncode)
+        # But, a deep copy is required here
+        self.all_lines = copy.deepcopy(uncovered)
+        self.all_lines.update(uncovered_exceptional)
+        self.all_lines.update(covered.keys())
+        self.branches = copy.deepcopy(branches)
+
+    def update(
+            self, uncovered, uncovered_exceptional, covered, branches,
+            noncode):
+        self.all_lines.update(uncovered)
+        self.all_lines.update(uncovered_exceptional)
+        self.all_lines.update(covered.keys())
+        self.uncovered.update(uncovered)
+        self.uncovered_exceptional.update(uncovered_exceptional)
+        self.noncode.intersection_update(noncode)
+        for k in covered.keys():
+            self.covered[k] = self.covered.get(k, 0) + covered[k]
+        for k in branches.keys():
+            for b in branches[k]:
+                d = self.branches.setdefault(k, {})
+                d[b] = d.get(b, 0) + branches[k][b]
+        self.uncovered.difference_update(self.covered.keys())
+        self.uncovered_exceptional.difference_update(self.covered.keys())
+
+    def uncovered_str(self, exceptional):
+        if options.show_branch:
+            #
+            # Don't do any aggregation on branch results
+            #
+            tmp = []
+            for line in self.branches.keys():
+                for branch in self.branches[line]:
+                    if self.branches[line][branch] == 0:
+                        tmp.append(line)
+                        break
+            tmp.sort()
+            return ",".join([str(x) for x in tmp]) or ""
+
+        if exceptional:
+            tmp = list(self.uncovered_exceptional)
+        else:
+            tmp = list(self.uncovered)
+        if len(tmp) == 0:
+            return ""
+
+        #
+        # Walk through the uncovered lines in sorted order.
+        # Find blocks of consecutive uncovered lines, and return
+        # a string with that information.
+        #
+        tmp.sort()
+        first = None
+        last = None
+        ranges = []
+        for item in tmp:
+            if last is None:
+                first = item
+                last = item
+            elif item == (last + 1):
+                last = item
+            else:
+                #
+                # Should we include noncode lines in the range of lines
+                # to be covered???  This simplifies the ranges summary, but it
+                # provides a counterintuitive listing.
+                #
+                # if len(self.noncode.intersection(range(last+1,item))) \
+                #       == item - last - 1:
+                #    last = item
+                #    continue
+                #
+                if first == last:
+                    ranges.append(str(first))
+                else:
+                    ranges.append(str(first) + "-" + str(last))
+                first = item
+                last = item
+        if first == last:
+            ranges.append(str(first))
+        else:
+            ranges.append(str(first) + "-" + str(last))
+        return ",".join(ranges)
+
+    def coverage(self):
+        if options.show_branch:
+            total = 0
+            cover = 0
+            for line in self.branches.keys():
+                for branch in self.branches[line].keys():
+                    total += 1
+                    cover += self.branches[line][branch] > 0 and 1 or 0
+        else:
+            total = len(self.all_lines)
+            cover = len(self.covered)
+
+        percent = total and str(int(100.0 * cover / total)) or "--"
+        return (total, cover, percent)
+
+    def summary(self):
+        tmp = options.root_filter.sub('', self.fname)
+        if not self.fname.endswith(tmp):
+            # Do no truncation if the filter does not start matching at
+            # the beginning of the string
+            tmp = self.fname
+        tmp = tmp.ljust(40)
+        if len(tmp) > 40:
+            tmp = tmp + "\n" + " " * 40
+
+        (total, cover, percent) = self.coverage()
+        uncovered_lines = self.uncovered_str(False)
+        if not options.show_branch:
+            t = self.uncovered_str(True)
+            if len(t):
+                uncovered_lines += " [* " + t + "]"
+        return (total, cover,
+                tmp + str(total).rjust(8) + str(cover).rjust(8) +
+                percent.rjust(6) + "%   " + uncovered_lines)
+
+
+def resolve_symlinks(orig_path):
+    """
+    Return the normalized absolute path name with all symbolic links resolved
+    """
+    return os.path.realpath(orig_path)
+    # WEH - why doesn't os.path.realpath() suffice here?
+    #
+    drive, tmp = os.path.splitdrive(os.path.abspath(orig_path))
+    if not drive:
+        drive = os.path.sep
+    parts = tmp.split(os.path.sep)
+    actual_path = [drive]
+    while parts:
+        actual_path.append(parts.pop(0))
+        if not os.path.islink(os.path.join(*actual_path)):
+            continue
+        actual_path[-1] = os.readlink(os.path.join(*actual_path))
+        tmp_drive, tmp_path = os.path.splitdrive(
+            resolve_symlinks(os.path.join(*actual_path)))
+        if tmp_drive:
+            drive = tmp_drive
+        actual_path = [drive] + tmp_path.split(os.path.sep)
+    return os.path.join(*actual_path)
+
+
+#
+# Class that creates path aliases
+#
+class PathAliaser(object):
+    def __init__(self):
+        self.aliases = {}
+        self.master_targets = set()
+        self.preferred_name = {}
+
+    def path_startswith(self, path, base):
+        return path.startswith(base) and (
+            len(base) == len(path) or path[len(base)] == os.path.sep)
+
+    def master_path(self, path):
+        match_found = False
+        while True:
+            for base, alias in self.aliases.items():
+                if self.path_startswith(path, base):
+                    path = alias + path[len(base):]
+                    match_found = True
+                    break
+            for master_base in self.master_targets:
+                if self.path_startswith(path, master_base):
+                    return path, master_base, True
+            if match_found:
+                sys.stderr.write(
+                    "(ERROR) violating fundamental assumption while walking "
+                    "directory tree.\n\tPlease report this to the gcovr "
+                    "developers.\n")
+            return path, None, match_found
+
+    def unalias_path(self, path):
+        path = resolve_symlinks(path)
+        path, master_base, known_path = self.master_path(path)
+        if not known_path:
+            return path
+        # Try and resolve the preferred name for this location
+        if master_base in self.preferred_name:
+            return self.preferred_name[master_base] + path[len(master_base):]
+        return path
+
+    def add_master_target(self, master):
+        self.master_targets.add(master)
+
+    def add_alias(self, target, master):
+        self.aliases[target] = master
+
+    def set_preferred(self, master, preferred):
+        self.preferred_name[master] = preferred
+
+
+aliases = PathAliaser()
+
+
+# This is UGLY.  Here's why: UNIX resolves symbolic links by walking the
+# entire directory structure.  What that means is that relative links
+# are always relative to the actual directory inode, and not the
+# "virtual" path that the user might have traversed (over symlinks) on
+# the way to that directory.  Here's the canonical example:
+#
+#   a / b / c / testfile
+#   a / d / e --> ../../a/b
+#   m / n --> /a
+#   x / y / z --> /m/n/d
+#
+# If we start in "y", we will see the following directory structure:
+#   y
+#   |-- z
+#       |-- e
+#           |-- c
+#               |-- testfile
+#
+# The problem is that using a simple traversal based on the Python
+# documentation:
+#
+#    (os.path.join(os.path.dirname(path), os.readlink(result)))
+#
+# will not work: we will see a link to /m/n/d from /x/y, but completely
+# miss the fact that n is itself a link.  If we then naively attempt to
+# apply the "c" relative link, we get an intermediate path that looks
+# like "/m/n/d/e/../../a/b", which would get normalized to "/m/n/a/b"; a
+# nonexistant path.  The solution is that we need to walk the original
+# path, along with the full path of all links 1 directory at a time and
+# check for embedded symlinks.
+#
+#
+# NB:  Users have complained that this code causes a performance issue.
+# I have replaced this logic with os.walk(), which works for Python >= 2.6
+#
+def link_walker(path):
+    if sys.version_info >= (2, 6):
+        for root, dirs, files in os.walk(
+                os.path.abspath(path), followlinks=True
+        ):
+            for exc in options.exclude_dirs:
+                for d in dirs:
+                    m = exc.search(d)
+                    if m is not None:
+                        dirs[:] = [d for d in dirs if d is not m.group()]
+            yield (os.path.abspath(os.path.realpath(root)), dirs, files)
+    else:
+        targets = [os.path.abspath(path)]
+        while targets:
+            target_dir = targets.pop(0)
+            actual_dir = resolve_symlinks(target_dir)
+            # print "target dir: %s  (%s)" % (target_dir, actual_dir)
+            master_name, master_base, visited = aliases.master_path(actual_dir)
+            if visited:
+                # print "  ...root already visited as %s" % master_name
+                aliases.add_alias(target_dir, master_name)
+                continue
+            if master_name != target_dir:
+                aliases.set_preferred(master_name, target_dir)
+                aliases.add_alias(target_dir, master_name)
+            aliases.add_master_target(master_name)
+            # print "  ...master name = %s" % master_name
+            # print "  ...walking %s" % target_dir
+            for root, dirs, files in os.walk(target_dir, topdown=True):
+                # print "    ...reading %s" % root
+                for d in dirs:
+                    tmp = os.path.abspath(os.path.join(root, d))
+                    # print "    ...checking %s" % tmp
+                    if os.path.islink(tmp):
+                        # print "      ...buffering link %s" % tmp
+                        targets.append(tmp)
+                yield (root, dirs, files)
+
+
+def search_file(expr, path):
+    """
+    Given a search path, recursively descend to find files that match a
+    regular expression.
+    """
+    ans = []
+    pattern = re.compile(expr)
+    if path is None or path == ".":
+        path = os.getcwd()
+    elif not os.path.exists(path):
+        raise IOError("Unknown directory '" + path + "'")
+    for root, dirs, files in link_walker(path):
+        for name in files:
+            if pattern.match(name):
+                name = os.path.join(root, name)
+                if os.path.islink(name):
+                    ans.append(os.path.abspath(os.readlink(name)))
+                else:
+                    ans.append(os.path.abspath(name))
+    return ans
+
+
+def commonpath(files):
+    if len(files) == 1:
+        return os.path.join(os.path.relpath(os.path.split(files[0])[0]), '')
+
+    common_path = os.path.realpath(files[0])
+    common_dirs = common_path.split(os.path.sep)
+
+    for f in files[1:]:
+        path = os.path.realpath(f)
+        dirs = path.split(os.path.sep)
+        common = []
+        for a, b in itertools.izip(dirs, common_dirs):
+            if a == b:
+                common.append(a)
+            elif common:
+                common_dirs = common
+                break
+            else:
+                return ''
+
+    return os.path.join(os.path.relpath(os.path.sep.join(common_dirs)), '')
+
+
+#
+# Get the list of datafiles in the directories specified by the user
+#
+def get_datafiles(flist, options):
+    allfiles = set()
+    for dir_ in flist:
+        if options.gcov_files:
+            if options.verbose:
+                sys.stdout.write(
+                    "Scanning directory %s for gcov files...\n" % (dir_,)
+                )
+            files = search_file(".*\.gcov$", dir_)
+            gcov_files = [file for file in files if file.endswith('gcov')]
+            if options.verbose:
+                sys.stdout.write(
+                    "Found %d files (and will process %d)\n" %
+                    (len(files), len(gcov_files))
+                )
+            allfiles.update(gcov_files)
+        else:
+            if options.verbose:
+                sys.stdout.write(
+                    "Scanning directory %s for gcda/gcno files...\n" % (dir_,)
+                )
+            files = search_file(".*\.gc(da|no)$", dir_)
+            # gcno files will *only* produce uncovered results; however,
+            # that is useful information for the case where a compilation
+            # unit is never actually exercised by the test code.  So, we
+            # will process gcno files, but ONLY if there is no corresponding
+            # gcda file.
+            gcda_files = [
+                filenm for filenm in files if filenm.endswith('gcda')
+                ]
+            tmp = set(gcda_files)
+            gcno_files = [
+                filenm for filenm in files if
+                filenm.endswith('gcno') and filenm[:-2] + 'da' not in tmp
+                ]
+            if options.verbose:
+                sys.stdout.write(
+                    "Found %d files (and will process %d)\n" %
+                    (len(files), len(gcda_files) + len(gcno_files)))
+            allfiles.update(gcda_files)
+            allfiles.update(gcno_files)
+    return allfiles
+
+
+noncode_mapper = dict.fromkeys(ord(i) for i in '}{)(;')
+
+
+def is_non_code(code):
+    if sys.version_info < (3, 0):
+        code = code.strip().translate(None, '}{)(;')
+    else:
+        code = code.strip().translate(noncode_mapper)
+    return len(code) == 0 or code.startswith("//") or code == 'else'
+
+
+#
+# Process a single gcov datafile
+#
+def process_gcov_data(data_fname, covdata, source_fname, options):
+    INPUT = open(data_fname, "r")
+    #
+    # Get the filename
+    #
+    line = INPUT.readline()
+    segments = line.split(':', 3)
+    if len(segments) != 4 or not \
+            segments[2].lower().strip().endswith('source'):
+        raise RuntimeError(
+            'Fatal error parsing gcov file, line 1: \n\t"%s"' % line.rstrip()
+        )
+    #
+    # Find the source file
+    #
+    currdir = os.getcwd()
+    root_dir = os.path.abspath(options.root)
+    if source_fname is None:
+        common_dir = os.path.commonprefix([data_fname, currdir])
+        if sys.version_info >= (2, 6):
+            fname = aliases.unalias_path(os.path.join(common_dir, segments[-1].strip()))
+        else:
+            fname = aliases.unalias_path(os.path.join(common_dir, segments[-1]).strip())
+    else:
+        #     1. Try using the path to common prefix with the root_dir as the source directory
+        fname = os.path.join(root_dir, segments[-1].strip())
+        if not os.path.exists(fname):
+            # 2. Try using the path to the gcda file as the source directory
+            fname = os.path.join(os.path.dirname(source_fname), os.path.basename(segments[-1].strip()))
+
+    if options.verbose:
+        print("Finding source file corresponding to a gcov data file")
+        print('  currdir      ' + currdir)
+        print('  gcov_fname   ' + data_fname)
+        print('               ' + str(segments))
+        print('  source_fname ' + source_fname)
+        print('  root         ' + root_dir)
+        # print('  common_dir   '+common_dir)
+        # print('  subdir       '+subdir)
+        print('  fname        ' + fname)
+
+    if options.verbose:
+        sys.stdout.write("Parsing coverage data for file %s\n" % fname)
+    #
+    # Return if the filename does not match the filter
+    #
+    filtered_fname = None
+    for i in range(0, len(options.filter)):
+        if options.filter[i].match(fname):
+            filtered_fname = options.root_filter.sub('', fname)
+            break
+    if filtered_fname is None:
+        if options.verbose:
+            sys.stdout.write("  Filtering coverage data for file %s\n" % fname)
+        return
+    #
+    # Return if the filename matches the exclude pattern
+    #
+    for exc in options.exclude:
+        if (filtered_fname is not None and exc.match(filtered_fname)) or \
+                exc.match(fname) or \
+                exc.match(os.path.abspath(fname)):
+            if options.verbose:
+                sys.stdout.write(
+                    "  Excluding coverage data for file %s\n" % fname
+                )
+            return
+    #
+    # Parse each line, and record the lines that are uncovered
+    #
+    excluding = []
+    noncode = set()
+    uncovered = set()
+    uncovered_exceptional = set()
+    covered = {}
+    branches = {}
+    # first_record=True
+    lineno = 0
+    last_code_line = ""
+    last_code_lineno = 0
+    last_code_line_excluded = False
+    for line in INPUT:
+        segments = line.split(":", 2)
+        # print "\t","Y", segments
+        tmp = segments[0].strip()
+        if len(segments) > 1:
+            try:
+                lineno = int(segments[1].strip())
+            except:
+                pass  # keep previous line number!
+
+        if exclude_line_flag in line:
+            excl_line = False
+            for header, flag in exclude_line_pattern.findall(line):
+                if flag == 'START':
+                    excluding.append((header, lineno))
+                elif flag == 'STOP':
+                    if excluding:
+                        _header, _line = excluding.pop()
+                        if _header != header:
+                            sys.stderr.write(
+                                "(WARNING) %s_EXCL_START found on line %s "
+                                "was terminated by %s_EXCL_STOP on line %s, "
+                                "when processing %s\n"
+                                % (_header, _line, header, lineno, fname)
+                            )
+                    else:
+                        sys.stderr.write(
+                            "(WARNING) mismatched coverage exclusion flags.\n"
+                            "\t%s_EXCL_STOP found on line %s without "
+                            "corresponding %s_EXCL_START, when processing %s\n"
+                            % (header, lineno, header, fname)
+                        )
+                elif flag == 'LINE':
+                    # We buffer the line exclusion so that it is always
+                    # the last thing added to the exclusion list (and so
+                    # only ONE is ever added to the list).  This guards
+                    # against cases where puts a _LINE and _START (or
+                    # _STOP) on the same line... it also guards against
+                    # duplicate _LINE flags.
+                    excl_line = True
+            if excl_line:
+                excluding.append(False)
+
+        is_code_statement = False
+        if tmp[0] == '-' or (excluding and tmp[0] in "#=0123456789"):
+            is_code_statement = True
+            code = segments[2].strip()
+            # remember certain non-executed lines
+            if excluding or is_non_code(segments[2]):
+                noncode.add(lineno)
+        elif tmp[0] == '#':
+            is_code_statement = True
+            if is_non_code(segments[2]):
+                noncode.add(lineno)
+            else:
+                uncovered.add(lineno)
+        elif tmp[0] == '=':
+            is_code_statement = True
+            uncovered_exceptional.add(lineno)
+        elif tmp[0] in "0123456789":
+            is_code_statement = True
+            covered[lineno] = int(segments[0].strip())
+        elif tmp.startswith('branch'):
+            exclude_branch = False
+            if options.exclude_unreachable_branches and \
+                            lineno == last_code_lineno:
+                if last_code_line_excluded:
+                    exclude_branch = True
+                    exclude_reason = "marked with exclude pattern"
+                else:
+                    code = last_code_line
+                    code = re.sub(cpp_style_comment_pattern, '', code)
+                    code = re.sub(c_style_comment_pattern, '', code)
+                    code = code.strip()
+                    code_nospace = code.replace(' ', '')
+                    exclude_branch = \
+                        code in ['', '{', '}'] or code_nospace == '{}'
+                    exclude_reason = "detected as compiler-generated code"
+
+            if exclude_branch:
+                if options.verbose:
+                    sys.stdout.write(
+                        "Excluding unreachable branch on line %d "
+                        "in file %s (%s).\n"
+                        % (lineno, fname, exclude_reason)
+                    )
+            else:
+                fields = line.split()
+                try:
+                    count = int(fields[3])
+                except:
+                    count = 0
+                branches.setdefault(lineno, {})[int(fields[1])] = count
+        elif tmp.startswith('call'):
+            pass
+        elif tmp.startswith('function'):
+            pass
+        elif tmp[0] == 'f':
+            pass
+            # if first_record:
+            # first_record=False
+            # uncovered.add(prev)
+            # if prev in uncovered:
+            # tokens=re.split('[ \t]+',tmp)
+            # if tokens[3] != "0":
+            # uncovered.remove(prev)
+            # prev = int(segments[1].strip())
+            # first_record=True
+        else:
+            sys.stderr.write(
+                "(WARNING) Unrecognized GCOV output: '%s'\n"
+                "\tThis is indicitive of a gcov output parse error.\n"
+                "\tPlease report this to the gcovr developers." % tmp
+            )
+
+        # save the code line to use it later with branches
+        if is_code_statement:
+            last_code_line = "".join(segments[2:])
+            last_code_lineno = lineno
+            last_code_line_excluded = False
+            if excluding:
+                last_code_line_excluded = True
+
+        # clear the excluding flag for single-line excludes
+        if excluding and not excluding[-1]:
+            excluding.pop()
+
+    if options.verbose:
+        print('uncovered ' + str(uncovered))
+        # print('covered ',+covered)
+        # print('branches ',+str(branches))
+        # print('noncode ',+str(noncode))
+    #
+    # If the file is already in covdata, then we
+    # remove lines that are covered here.  Otherwise,
+    # initialize covdata
+    #
+    if not fname in covdata:
+        covdata[fname] = CoverageData(
+            fname, uncovered, uncovered_exceptional, covered, branches, noncode
+        )
+    else:
+        covdata[fname].update(
+            uncovered, uncovered_exceptional, covered, branches, noncode
+        )
+    INPUT.close()
+
+    for header, line in excluding:
+        sys.stderr.write("(WARNING) The coverage exclusion region start flag "
+                         "%s_EXCL_START\n\ton line %d did not have "
+                         "corresponding %s_EXCL_STOP flag\n\t in file %s.\n"
+                         % (header, line, header, fname))
+
+
+#
+# Process a datafile (generated by running the instrumented application)
+# and run gcov with the corresponding arguments
+#
+# This is trickier than it sounds: The gcda/gcno files are stored in the
+# same directory as the object files; however, gcov must be run from the
+# same directory where gcc/g++ was run.  Normally, the user would know
+# where gcc/g++ was invoked from and could tell gcov the path to the
+# object (and gcda) files with the --object-directory command.
+# Unfortunately, we do everything backwards: gcovr looks for the gcda
+# files and then has to infer the original gcc working directory.
+#
+# In general, (but not always) we can assume that the gcda file is in a
+# subdirectory of the original gcc working directory, so we will first
+# try ".", and on error, move up the directory tree looking for the
+# correct working directory (letting gcov's own error codes dictate when
+# we hit the right directory).  This covers 90+% of the "normal" cases.
+# The exception to this is if gcc was invoked with "-o ../[...]" (i.e.,
+# the object directory was a peer (not a parent/child) of the cwd.  In
+# this case, things are really tough.  We accept an argument
+# (--object-directory) that SHOULD BE THE SAME as the one povided to
+# gcc.  We will then walk that path (backwards) in the hopes of
+# identifying the original gcc working directory (there is a bit of
+# trial-and-error here)
+#
+def process_datafile(filename, covdata, options):
+    if options.verbose:
+        print("Processing file: " + filename)
+    #
+    # Launch gcov
+    #
+    abs_filename = os.path.abspath(filename)
+    dirname, fname = os.path.split(abs_filename)
+
+    potential_wd = []
+    errors = []
+    Done = False
+
+    if options.objdir:
+        # print "X - objdir"
+        src_components = abs_filename.split(os.sep)
+        components = normpath(options.objdir).split(os.sep)
+        idx = 1
+        while idx <= len(components):
+            if idx > len(src_components):
+                break
+            if components[-1 * idx] != src_components[-1 * idx]:
+                break
+            idx += 1
+        if idx > len(components):
+            pass  # a parent dir; the normal process will find it
+        elif components[-1 * idx] == '..':
+            # NB: os.path.join does not re-add leading '/' characters!?!
+            dirs = [
+                os.path.sep.join(src_components[:len(src_components) - idx])
+            ]
+            while idx <= len(components) and components[-1 * idx] == '..':
+                tmp = []
+                for d in dirs:
+                    for f in os.listdir(d):
+                        x = os.path.join(d, f)
+                        if os.path.isdir(x):
+                            tmp.append(x)
+                dirs = tmp
+                idx += 1
+            potential_wd = dirs
+        else:
+            if components[0] == '':
+                # absolute path
+                tmp = [options.objdir]
+            else:
+                # relative path: check relative to both the cwd and the
+                # gcda file
+                tmp = [
+                    os.path.join(x, options.objdir) for x in
+                    [os.path.dirname(abs_filename), os.getcwd()]
+                    ]
+            potential_wd = [
+                testdir for testdir in tmp if os.path.isdir(testdir)
+                ]
+            if len(potential_wd) == 0:
+                errors.append("ERROR: cannot identify the location where GCC "
+                              "was run using --object-directory=%s\n" %
+                              options.objdir)
+
+    # no objdir was specified (or it was a parent dir); walk up the dir tree
+    if len(potential_wd) == 0:
+        potential_wd.append(root_dir)
+        # print "X - potential_wd", root_dir
+        wd = os.path.split(abs_filename)[0]
+        while True:
+            potential_wd.append(wd)
+            wd = os.path.split(wd)[0]
+            if wd == potential_wd[-1]:
+                #
+                # Stop at the root of the file system
+                #
+                break
+
+    #
+    # If the first element of cmd - the executable name - has embedded spaces it probably
+    # includes extra arguments.
+    #
+    cmd = options.gcov_cmd.split(' ') + [
+        abs_filename,
+        "--branch-counts", "--branch-probabilities", "--preserve-paths",
+        '--object-directory', dirname
+    ]
+
+    # NB: Currently, we will only parse English output
+    env = dict(os.environ)
+    env['LC_ALL'] = 'en_US'
+
+    # print "HERE", potential_wd
+    while len(potential_wd) > 0 and not Done:
+        # NB: either len(potential_wd) == 1, or all entires are absolute
+        # paths, so we don't have to chdir(starting_dir) at every
+        # iteration.
+
+        #
+        # Iterate from the end of the potential_wd list, which is the root
+        # directory
+        #
+        dir_ = potential_wd.pop(0)
+        # print "X DIR:", dir_
+        os.chdir(dir_)
+
+        if options.verbose:
+            sys.stdout.write(
+                "Running gcov: '%s' in '%s'\n" % (' '.join(cmd), os.getcwd())
+            )
+        out, err = subprocess.Popen(
+            cmd, env=env,
+            stdout=subprocess.PIPE,
+            stderr=subprocess.PIPE).communicate()
+        out = out.decode('utf-8')
+        err = err.decode('utf-8')
+
+        # find the files that gcov created
+        gcov_files = {'active': [], 'filter': [], 'exclude': []}
+        for line in out.splitlines():
+            found = output_re.search(line.strip())
+            if found is not None:
+                fname = found.group(1)
+                if not options.gcov_filter.match(fname):
+                    if options.verbose:
+                        sys.stdout.write("Filtering gcov file %s\n" % fname)
+                    gcov_files['filter'].append(fname)
+                    continue
+                exclude = False
+                for exc in options.gcov_exclude:
+                    if exc.match(options.gcov_filter.sub('', fname)) or \
+                            exc.match(fname) or \
+                            exc.match(os.path.abspath(fname)):
+                        exclude = True
+                        break
+                if not exclude:
+                    gcov_files['active'].append(fname)
+                elif options.verbose:
+                    sys.stdout.write("Excluding gcov file %s\n" % fname)
+                    gcov_files['exclude'].append(fname)
+
+        # print "HERE", err, "XXX", source_re.search(err)
+        if source_re.search(err):
+            #
+            # gcov tossed errors: try the next potential_wd
+            #
+            errors.append(err)
+        else:
+            #
+            # Process *.gcov files
+            #
+            for fname in gcov_files['active']:
+                process_gcov_data(fname, covdata, abs_filename, options)
+            Done = True
+
+        if not options.keep:
+            for group in gcov_files.values():
+                for fname in group:
+                    if os.path.exists(fname):
+                        # Only remove files that actually exist.
+                        os.remove(fname)
+
+    os.chdir(starting_dir)
+    if options.delete:
+        if not abs_filename.endswith('gcno'):
+            os.remove(abs_filename)
+
+    if not Done:
+        sys.stderr.write(
+            "(WARNING) GCOV produced the following errors processing %s:\n"
+            "\t   %s"
+            "\t(gcovr could not infer a working directory that resolved it.)\n"
+            % (filename, "\t   ".join(errors))
+        )
+
+
+#
+#  Process Already existing gcov files
+#
+def process_existing_gcov_file(filename, covdata, options):
+    #
+    # Ignore this file if it does not match the gcov filter
+    #
+    if not options.gcov_filter.match(filename):
+        if options.verbose:
+            sys.stdout.write("This gcov file does not match the filter: %s\n" % filename)
+        return
+    #
+    # Ignore this file if it matches one of the exclusion regex's
+    #
+    for exc in options.gcov_exclude:
+        if exc.match(options.gcov_filter.sub('', filename)) or \
+                exc.match(filename) or \
+                exc.match(os.path.abspath(filename)):
+            if options.verbose:
+                sys.stdout.write("Excluding gcov file: %s\n" % filename)
+            return
+    #
+    # Process the gcov data file
+    #
+    process_gcov_data(filename, covdata, None, options)
+    #
+    # Remove the file unless the user has indicated that we keep gcov data files
+    #
+    if not options.keep:
+        #
+        # Only remove files that actually exist.
+        #
+        if os.path.exists(filename):
+            os.remove(filename)
+
+
+#
+# Produce the classic gcovr text report
+#
+def print_text_report(covdata):
+    def _num_uncovered(key):
+        (total, covered, percent) = covdata[key].coverage()
+        return total - covered
+
+    def _percent_uncovered(key):
+        (total, covered, percent) = covdata[key].coverage()
+        if covered:
+            return -1.0 * covered / total
+        else:
+            return total or 1e6
+
+    def _alpha(key):
+        return key
+
+    if options.output:
+        OUTPUT = open(options.output, 'w')
+    else:
+        OUTPUT = sys.stdout
+    total_lines = 0
+    total_covered = 0
+
+    # Header
+    OUTPUT.write("-" * 78 + '\n')
+    OUTPUT.write(" " * 27 + "GCC Code Coverage Report\n")
+    if options.root is not None:
+        OUTPUT.write("Directory: " + options.root + "\n")
+
+    OUTPUT.write("-" * 78 + '\n')
+    a = options.show_branch and "Branches" or "Lines"
+    b = options.show_branch and "Taken" or "Exec"
+    c = "Missing"
+    OUTPUT.write(
+        "File".ljust(40) + a.rjust(8) + b.rjust(8) + "  Cover   " + c + "\n"
+    )
+    OUTPUT.write("-" * 78 + '\n')
+
+    # Data
+    keys = list(covdata.keys())
+    keys.sort(
+        key=options.sort_uncovered and _num_uncovered or
+            options.sort_percent and _percent_uncovered or _alpha
+    )
+    for key in keys:
+        (t, n, txt) = covdata[key].summary()
+        total_lines += t
+        total_covered += n
+        OUTPUT.write(txt + '\n')
+
+    # Footer & summary
+    OUTPUT.write("-" * 78 + '\n')
+    percent = total_lines and str(int(100.0 * total_covered / total_lines)) \
+              or "--"
+    OUTPUT.write(
+        "TOTAL".ljust(40) + str(total_lines).rjust(8) +
+        str(total_covered).rjust(8) + str(percent).rjust(6) + "%" + '\n'
+    )
+    OUTPUT.write("-" * 78 + '\n')
+
+    # Close logfile
+    if options.output:
+        OUTPUT.close()
+
+
+#
+# Prints a small report to the standard output
+#
+def print_summary(covdata):
+    lines_total = 0
+    lines_covered = 0
+    branches_total = 0
+    branches_covered = 0
+
+    keys = list(covdata.keys())
+
+    for key in keys:
+        options.show_branch = False
+        (t, n, txt) = covdata[key].coverage()
+        lines_total += t
+        lines_covered += n
+
+        options.show_branch = True
+        (t, n, txt) = covdata[key].coverage()
+        branches_total += t
+        branches_covered += n
+
+    percent = lines_total and (100.0 * lines_covered / lines_total)
+    percent_branches = branches_total and \
+                       (100.0 * branches_covered / branches_total)
+
+    lines_out = "lines: %0.1f%% (%s out of %s)\n" % (
+        percent, lines_covered, lines_total
+    )
+    branches_out = "branches: %0.1f%% (%s out of %s)\n" % (
+        percent_branches, branches_covered, branches_total
+    )
+
+    sys.stdout.write(lines_out)
+    sys.stdout.write(branches_out)
+
+
+#
+# CSS declarations for the HTML output
+#
+css = Template('''
+    body
+    {
+      color: #000000;
+      background-color: #FFFFFF;
+    }
+
+    /* Link formats: use maroon w/underlines */
+    a:link
+    {
+      color: navy;
+      text-decoration: underline;
+    }
+    a:visited
+    {
+      color: maroon;
+      text-decoration: underline;
+    }
+    a:active
+    {
+      color: navy;
+      text-decoration: underline;
+    }
+
+    /*** TD formats ***/
+    td
+    {
+      font-family: sans-serif;
+    }
+    td.title
+    {
+      text-align: center;
+      padding-bottom: 10px;
+      font-size: 20pt;
+      font-weight: bold;
+    }
+
+    /* TD Header Information */
+    td.headerName
+    {
+      text-align: right;
+      color: black;
+      padding-right: 6px;
+      font-weight: bold;
+      vertical-align: top;
+      white-space: nowrap;
+    }
+    td.headerValue
+    {
+      text-align: left;
+      color: blue;
+      font-weight: bold;
+      white-space: nowrap;
+    }
+    td.headerTableEntry
+    {
+      text-align: right;
+      color: black;
+      font-weight: bold;
+      white-space: nowrap;
+      padding-left: 12px;
+      padding-right: 4px;
+      background-color: LightBlue;
+    }
+    td.headerValueLeg
+    {
+      text-align: left;
+      color: black;
+      font-size: 80%;
+      white-space: nowrap;
+      padding-left: 10px;
+      padding-right: 10px;
+      padding-top: 2px;
+    }
+
+    /* Color of horizontal ruler */
+    td.hr
+    {
+      background-color: navy;
+      height:3px;
+    }
+    /* Footer format */
+    td.footer
+    {
+      text-align: center;
+      padding-top: 3px;
+      font-family: sans-serif;
+    }
+
+    /* Coverage Table */
+
+    td.coverTableHead
+    {
+      text-align: center;
+      color: white;
+      background-color: SteelBlue;
+      font-family: sans-serif;
+      font-size: 120%;
+      white-space: nowrap;
+      padding-left: 4px;
+      padding-right: 4px;
+    }
+    td.coverFile
+    {
+      text-align: left;
+      padding-left: 10px;
+      padding-right: 20px;
+      color: black;
+      background-color: LightBlue;
+      font-family: monospace;
+      font-weight: bold;
+      font-size: 110%;
+    }
+    td.coverBar
+    {
+      padding-left: 10px;
+      padding-right: 10px;
+      background-color: LightBlue;
+    }
+    td.coverBarOutline
+    {
+      background-color: white;
+    }
+    td.coverValue
+    {
+      padding-top: 2px;
+      text-align: right;
+      padding-left: 10px;
+      padding-right: 10px;
+      font-family: sans-serif;
+      white-space: nowrap;
+      font-weight: bold;
+    }
+
+    /* Link Details */
+    a.detail:link
+    {
+      color: #B8D0FF;
+      font-size:80%;
+    }
+    a.detail:visited
+    {
+      color: #B8D0FF;
+      font-size:80%;
+    }
+    a.detail:active
+    {
+      color: #FFFFFF;
+      font-size:80%;
+    }
+
+    .graphcont{
+        color:#000;
+        font-weight:700;
+        float:left
+    }
+
+    .graph{
+        float:left;
+        background-color: white;
+        position:relative;
+        width:280px;
+        padding:0
+    }
+
+    .graph .bar{
+        display:block;
+        position:relative;
+        border:black 1px solid;
+        text-align:center;
+        color:#fff;
+        height:10px;
+        font-family:Arial,Helvetica,sans-serif;
+        font-size:12px;
+        line-height:1.9em
+    }
+
+    .graph .bar span{
+        position:absolute;
+        left:1em
+    }
+
+    td.coveredLine,
+    span.coveredLine
+    {
+        background-color: ${covered_color}!important;
+    }
+
+    td.uncoveredLine,
+    span.uncoveredLine
+    {
+        background-color: ${uncovered_color}!important;
+    }
+
+    .linebranch, .linecount
+    {
+        border-right: 1px gray solid;
+        background-color: lightgray;
+    }
+
+    span.takenBranch
+    {
+        color: ${takenBranch_color}!important;
+        cursor: help;
+    }
+
+    span.notTakenBranch
+    {
+        color: ${notTakenBranch_color}!important;
+        cursor: help;
+    }
+
+    .src
+    {
+        padding-left: 12px;
+    }
+
+    .srcHeader,
+    span.takenBranch,
+    span.notTakenBranch
+    {
+        font-family: monospace;
+        font-weight: bold;
+    }
+
+    pre
+    {
+        height : 15px;
+        margin-top: 0;
+        margin-bottom: 0;
+    }
+
+    .lineno
+    {
+        background-color: #EFE383;
+        border-right: 1px solid #BBB15F;
+    }
+''')
+
+#
+# A string template for the root HTML output
+#
+root_page = Template('''
+<html>
+
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+  <title>${HEAD}</title>
+  <style media="screen" type="text/css">
+  ${CSS}
+  </style>
+</head>
+
+<body>
+
+  <table width="100%" border=0 cellspacing=0 cellpadding=0>
+    <tr><td class="title">GCC Code Coverage Report</td></tr>
+    <tr><td class="hr"></td></tr>
+
+    <tr>
+      <td width="100%">
+        <table cellpadding=1 border=0 width="100%">
+          <tr>
+            <td width="10%" class="headerName">Directory:</td>
+            <td width="35%" class="headerValue">${DIRECTORY}</td>
+            <td width="5%"></td>
+            <td width="15%"></td>
+            <td width="10%" class="headerValue" style="text-align:right;">Exec</td>
+            <td width="10%" class="headerValue" style="text-align:right;">Total</td>
+            <td width="15%" class="headerValue" style="text-align:right;">Coverage</td>
+          </tr>
+          <tr>
+            <td class="headerName">Date:</td>
+            <td class="headerValue">${DATE}</td>
+            <td></td>
+            <td class="headerName">Lines:</td>
+            <td class="headerTableEntry">${LINES_EXEC}</td>
+            <td class="headerTableEntry">${LINES_TOTAL}</td>
+            <td class="headerTableEntry" style="background-color:${LINES_COLOR}">${LINES_COVERAGE} %</td>
+          </tr>
+          <tr>
+            <td class="headerName">Legend:</td>
+            <td class="headerValueLeg">
+              <span style="background-color:${low_color}">low: &lt; ${COVERAGE_MED} %</span>
+              <span style="background-color:${medium_color}">medium: &gt;= ${COVERAGE_MED} %</span>
+              <span style="background-color:${high_color}">high: &gt;= ${COVERAGE_HIGH} %</span>
+            </td>
+            <td></td>
+            <td class="headerName">Branches:</td>
+            <td class="headerTableEntry">${BRANCHES_EXEC}</td>
+            <td class="headerTableEntry">${BRANCHES_TOTAL}</td>
+            <td class="headerTableEntry" style="background-color:${BRANCHES_COLOR}">${BRANCHES_COVERAGE} %</td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+
+    <tr><td class="hr"></td></tr>
+  </table>
+
+  <center>
+  <table width="80%" cellpadding=1 cellspacing=1 border=0>
+    <tr>
+      <td width="44%"><br></td>
+      <td width="8%"></td>
+      <td width="8%"></td>
+      <td width="8%"></td>
+      <td width="8%"></td>
+      <td width="8%"></td>
+    </tr>
+    <tr>
+      <td class="coverTableHead">File</td>
+      <td class="coverTableHead" colspan=3>Lines</td>
+      <td class="coverTableHead" colspan=2>Branches</td>
+    </tr>
+
+    ${ROWS}
+
+    <tr>
+      <td width="44%"><br></td>
+      <td width="8%"></td>
+      <td width="8%"></td>
+      <td width="8%"></td>
+      <td width="8%"></td>
+      <td width="8%"></td>
+    </tr>
+  </table>
+  </center>
+
+  <table width="100%" border=0 cellspacing=0 cellpadding=0>
+    <tr><td class="hr"><td></tr>
+    <tr><td class="footer">Generated by: <a href="http://gcovr.com">GCOVR (Version ${VERSION})</a></td></tr>
+  </table>
+  <br>
+
+</body>
+
+</html>
+''')
+
+#
+# A string template for the source file HTML output
+#
+source_page = Template('''
+<html>
+
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+  <title>${HEAD}</title>
+  <style media="screen" type="text/css">
+  ${CSS}
+  </style>
+</head>
+
+<body>
+
+  <table width="100%" border="0" cellspacing="0" cellpadding="0">
+    <tr><td class="title">GCC Code Coverage Report</td></tr>
+    <tr><td class="hr"></td></tr>
+
+    <tr>
+      <td width="100%">
+        <table cellpadding="1" border="0" width="100%">
+          <tr>
+            <td width="10%" class="headerName">Directory:</td>
+            <td width="35%" class="headerValue">${DIRECTORY}</td>
+            <td width="5%"></td>
+            <td width="15%"></td>
+            <td width="10%" class="headerValue" style="text-align:right;">Exec</td>
+            <td width="10%" class="headerValue" style="text-align:right;">Total</td>
+            <td width="15%" class="headerValue" style="text-align:right;">Coverage</td>
+          </tr>
+          <tr>
+            <td class="headerName">File:</td>
+            <td class="headerValue">${FILENAME}</td>
+            <td></td>
+            <td class="headerName">Lines:</td>
+            <td class="headerTableEntry">${LINES_EXEC}</td>
+            <td class="headerTableEntry">${LINES_TOTAL}</td>
+            <td class="headerTableEntry" style="background-color:${LINES_COLOR}">${LINES_COVERAGE} %</td>
+          </tr>
+          <tr>
+            <td class="headerName">Date:</td>
+            <td class="headerValue">${DATE}</td>
+            <td></td>
+            <td class="headerName">Branches:</td>
+            <td class="headerTableEntry">${BRANCHES_EXEC}</td>
+            <td class="headerTableEntry">${BRANCHES_TOTAL}</td>
+            <td class="headerTableEntry" style="background-color:${BRANCHES_COLOR}">${BRANCHES_COVERAGE} %</td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+
+    <tr><td class="hr"></td></tr>
+  </table>
+
+  <br>
+  <table cellspacing="0" cellpadding="1">
+    <tr>
+      <td width="5%" align="right" class="srcHeader">Line</td>
+      <td width="5%" align="right" class="srcHeader">Branch</td>
+      <td width="5%" align="right" class="srcHeader">Exec</td>
+      <td width="75%" align="left" class="srcHeader src">Source</td>
+    </tr>
+
+    ${ROWS}
+
+  </table>
+  <br>
+
+  <table width="100%" border="0" cellspacing="0" cellpadding="0">
+    <tr><td class="hr"><td></tr>
+    <tr><td class="footer">Generated by: <a href="http://gcovr.com">GCOVR (Version ${VERSION})</a></td></tr>
+  </table>
+  <br>
+
+</body>
+
+</html>
+''')
+
+
+def calculate_coverage(covered, total):
+    return 0.0 if total == 0 else round(100.0 * covered / total, 1)
+
+
+def coverage_to_color(coverage):
+    if coverage < medium_coverage:
+        return low_color
+    elif coverage < high_coverage:
+        return medium_color
+    else:
+        return high_color
+
+
+#
+# Produce an HTML report
+#
+def print_html_report(covdata, details):
+    def _num_uncovered(key):
+        (total, covered, percent) = covdata[key].coverage()
+        return total - covered
+
+    def _percent_uncovered(key):
+        (total, covered, percent) = covdata[key].coverage()
+        if covered:
+            return -1.0 * covered / total
+        else:
+            return total or 1e6
+
+    def _alpha(key):
+        return key
+
+    if options.output is None:
+        details = False
+    data = {}
+    data['HEAD'] = "Head"
+    data['VERSION'] = version_str()
+    data['TIME'] = str(int(time.time()))
+    data['DATE'] = datetime.date.today().isoformat()
+    data['ROWS'] = []
+    data['low_color'] = low_color
+    data['medium_color'] = medium_color
+    data['high_color'] = high_color
+    data['COVERAGE_MED'] = medium_coverage
+    data['COVERAGE_HIGH'] = high_coverage
+    data['CSS'] = css.substitute(low_color=low_color, medium_color=medium_color, high_color=high_color,
+                                 covered_color=covered_color, uncovered_color=uncovered_color,
+                                 takenBranch_color=takenBranch_color, notTakenBranch_color=notTakenBranch_color
+                                 )
+    data['DIRECTORY'] = ''
+
+    branchTotal = 0
+    branchCovered = 0
+    options.show_branch = True
+    for key in covdata.keys():
+        (total, covered, percent) = covdata[key].coverage()
+        branchTotal += total
+        branchCovered += covered
+    data['BRANCHES_EXEC'] = str(branchCovered)
+    data['BRANCHES_TOTAL'] = str(branchTotal)
+    coverage = calculate_coverage(branchCovered, branchTotal)
+    data['BRANCHES_COVERAGE'] = str(coverage)
+    data['BRANCHES_COLOR'] = coverage_to_color(coverage)
+
+    lineTotal = 0
+    lineCovered = 0
+    options.show_branch = False
+    for key in covdata.keys():
+        (total, covered, percent) = covdata[key].coverage()
+        lineTotal += total
+        lineCovered += covered
+    data['LINES_EXEC'] = str(lineCovered)
+    data['LINES_TOTAL'] = str(lineTotal)
+    coverage = calculate_coverage(lineCovered, lineTotal)
+    data['LINES_COVERAGE'] = str(coverage)
+    data['LINES_COLOR'] = coverage_to_color(coverage)
+
+    # Generate the coverage output (on a per-package basis)
+    # source_dirs = set()
+    files = []
+    dirs = []
+    filtered_fname = ''
+    keys = list(covdata.keys())
+    keys.sort(
+        key=options.sort_uncovered and _num_uncovered or
+            options.sort_percent and _percent_uncovered or _alpha
+    )
+    for f in keys:
+        cdata = covdata[f]
+        filtered_fname = options.root_filter.sub('', f)
+        files.append(filtered_fname)
+        dirs.append(os.path.dirname(filtered_fname) + os.sep)
+        cdata._filename = filtered_fname
+        ttmp = os.path.abspath(options.output).split('.')
+        longname = cdata._filename.replace(os.sep, '_')
+        longname_hash = ""
+        while True:
+            if len(ttmp) > 1:
+                cdata._sourcefile = \
+                    '.'.join(ttmp[:-1]) + \
+                    '.' + longname + longname_hash + \
+                    '.' + ttmp[-1]
+            else:
+                cdata._sourcefile = \
+                    ttmp[0] + '.' + longname + longname_hash + '.html'
+            # we add a hash at the end and attempt to shorten the
+            # filename if it exceeds common filesystem limitations
+            if len(os.path.basename(cdata._sourcefile)) < 256:
+                break
+            longname_hash = "_" + hex(zlib.crc32(longname) & 0xffffffff)[2:]
+            longname = longname[(len(cdata._sourcefile) - len(longname_hash)):]
+
+    # Define the common root directory, which may differ from options.root
+    # when source files share a common prefix.
+    if len(files) > 1:
+        commondir = commonpath(files)
+        if commondir != '':
+            data['DIRECTORY'] = commondir
+    else:
+        dir_, file_ = os.path.split(filtered_fname)
+        if dir_ != '':
+            data['DIRECTORY'] = dir_ + os.sep
+
+    for f in keys:
+        cdata = covdata[f]
+        class_lines = 0
+        class_hits = 0
+        class_branches = 0
+        class_branch_hits = 0
+        for line in sorted(cdata.all_lines):
+            hits = cdata.covered.get(line, 0)
+            class_lines += 1
+            if hits > 0:
+                class_hits += 1
+            branches = cdata.branches.get(line)
+            if branches is None:
+                pass
+            else:
+                b_hits = 0
+                for v in branches.values():
+                    if v > 0:
+                        b_hits += 1
+                coverage = 100 * b_hits / len(branches)
+                class_branch_hits += b_hits
+                class_branches += len(branches)
+
+        lines_covered = 100.0 if class_lines == 0 else \
+            100.0 * class_hits / class_lines
+        branches_covered = 100.0 if class_branches == 0 else \
+            100.0 * class_branch_hits / class_branches
+
+        data['ROWS'].append(html_row(
+            details, cdata._sourcefile,
+            directory=data['DIRECTORY'],
+            filename=os.path.relpath(os.path.realpath(cdata._filename), data['DIRECTORY']),
+            LinesExec=class_hits,
+            LinesTotal=class_lines,
+            LinesCoverage=lines_covered,
+            BranchesExec=class_branch_hits,
+            BranchesTotal=class_branches,
+            BranchesCoverage=branches_covered
+        ))
+    data['ROWS'] = '\n'.join(data['ROWS'])
+
+    if data['DIRECTORY'] == '':
+        data['DIRECTORY'] = "."
+
+    htmlString = root_page.substitute(**data)
+
+    if options.output is None:
+        sys.stdout.write(htmlString + '\n')
+    else:
+        OUTPUT = open(options.output, 'w')
+        OUTPUT.write(htmlString + '\n')
+        OUTPUT.close()
+
+    # Return, if no details are requested
+    if not details:
+        return
+
+    #
+    # Generate an HTML file for every source file
+    #
+    for f in keys:
+        cdata = covdata[f]
+
+        data['FILENAME'] = cdata._filename
+        data['ROWS'] = ''
+
+        options.show_branch = True
+        branchTotal, branchCovered, tmp = cdata.coverage()
+        data['BRANCHES_EXEC'] = str(branchCovered)
+        data['BRANCHES_TOTAL'] = str(branchTotal)
+        coverage = calculate_coverage(branchCovered, branchTotal)
+        data['BRANCHES_COVERAGE'] = str(coverage)
+        data['BRANCHES_COLOR'] = coverage_to_color(coverage)
+
+        options.show_branch = False
+        lineTotal, lineCovered, tmp = cdata.coverage()
+        data['LINES_EXEC'] = str(lineCovered)
+        data['LINES_TOTAL'] = str(lineTotal)
+        coverage = calculate_coverage(lineCovered, lineTotal)
+        data['LINES_COVERAGE'] = str(coverage)
+        data['LINES_COLOR'] = coverage_to_color(coverage)
+
+        data['ROWS'] = []
+        currdir = os.getcwd()
+        os.chdir(root_dir)
+        INPUT = open(data['FILENAME'], 'r')
+        ctr = 1
+        for line in INPUT:
+            data['ROWS'].append(
+                source_row(ctr, line.rstrip(), cdata)
+            )
+            ctr += 1
+        INPUT.close()
+        os.chdir(currdir)
+        data['ROWS'] = '\n'.join(data['ROWS'])
+
+        htmlString = source_page.substitute(**data)
+        OUTPUT = open(cdata._sourcefile, 'w')
+        OUTPUT.write(htmlString + '\n')
+        OUTPUT.close()
+
+
+def source_row(lineno, source, cdata):
+    rowstr = Template('''
+    <tr>
+    <td align="right" class="lineno"><pre>${lineno}</pre></td>
+    <td align="right" class="linebranch">${linebranch}</td>
+    <td align="right" class="linecount ${covclass}"><pre>${linecount}</pre></td>
+    <td align="left" class="src ${covclass}"><pre>${source}</pre></td>
+    </tr>''')
+    kwargs = {}
+    kwargs['lineno'] = str(lineno)
+    if lineno in cdata.covered:
+        kwargs['covclass'] = 'coveredLine'
+        kwargs['linebranch'] = ''
+        # If line has branches them show them with ticks or crosses
+        if lineno in cdata.branches.keys():
+            branches = cdata.branches.get(lineno)
+            branchcounter = 0
+            for branch in branches:
+                if branches[branch] > 0:
+                    kwargs['linebranch'] += '<span class="takenBranch" title="Branch ' + str(branch) + ' taken ' + str(
+                        branches[branch]) + ' times">&check;</span>'
+                else:
+                    kwargs['linebranch'] += '<span class="notTakenBranch" title="Branch ' + str(
+                        branch) + ' not taken">&cross;</span>'
+                branchcounter += 1
+                # Wrap at 4 branches to avoid too wide column
+                if (branchcounter > 0) and ((branchcounter % 4) == 0):
+                    kwargs['linebranch'] += '<br/>'
+        kwargs['linecount'] = str(cdata.covered.get(lineno, 0))
+    elif lineno in cdata.uncovered:
+        kwargs['covclass'] = 'uncoveredLine'
+        kwargs['linebranch'] = ''
+        kwargs['linecount'] = ''
+    else:
+        kwargs['covclass'] = ''
+        kwargs['linebranch'] = ''
+        kwargs['linecount'] = ''
+    kwargs['source'] = html.escape(source)
+    return rowstr.substitute(**kwargs)
+
+
+#
+# Generate the table row for a single file
+#
+nrows = 0
+
+
+def html_row(details, sourcefile, **kwargs):
+    if options.relative_anchors:
+        sourcefile = os.path.basename(sourcefile)
+    rowstr = Template('''
+    <tr>
+      <td class="coverFile" ${altstyle}>${filename}</td>
+      <td class="coverBar" align="center" ${altstyle}>
+        <table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline">
+                <div class="graph"><strong class="bar" style="width:${LinesCoverage}%; ${BarBorder}background-color:${LinesBar}"></strong></div>
+                </td></tr></table>
+      </td>
+      <td class="CoverValue" style="font-weight:bold; background-color:${LinesColor};">${LinesCoverage}&nbsp;%</td>
+      <td class="CoverValue" style="font-weight:bold; background-color:${LinesColor};">${LinesExec} / ${LinesTotal}</td>
+      <td class="CoverValue" style="background-color:${BranchesColor};">${BranchesCoverage}&nbsp;%</td>
+      <td class="CoverValue" style="background-color:${BranchesColor};">${BranchesExec} / ${BranchesTotal}</td>
+    </tr>
+''')
+    global nrows
+    nrows += 1
+    if nrows % 2 == 0:
+        kwargs['altstyle'] = 'style="background-color:LightSteelBlue"'
+    else:
+        kwargs['altstyle'] = ''
+    if details:
+        kwargs['filename'] = '<a href="%s">%s</a>' % (
+            sourcefile, kwargs['filename']
+        )
+    kwargs['LinesCoverage'] = round(kwargs['LinesCoverage'], 1)
+    # Disable the border if the bar is too short to see the color
+    if kwargs['LinesCoverage'] < 1e-7:
+        kwargs['BarBorder'] = "border:white; "
+    else:
+        kwargs['BarBorder'] = ""
+    if kwargs['LinesCoverage'] < medium_coverage:
+        kwargs['LinesColor'] = low_color
+        kwargs['LinesBar'] = 'red'
+    elif kwargs['LinesCoverage'] < high_coverage:
+        kwargs['LinesColor'] = medium_color
+        kwargs['LinesBar'] = 'yellow'
+    else:
+        kwargs['LinesColor'] = high_color
+        kwargs['LinesBar'] = 'green'
+
+    kwargs['BranchesCoverage'] = round(kwargs['BranchesCoverage'], 1)
+    if kwargs['BranchesCoverage'] < medium_coverage:
+        kwargs['BranchesColor'] = low_color
+        kwargs['BranchesBar'] = 'red'
+    elif kwargs['BranchesCoverage'] < high_coverage:
+        kwargs['BranchesColor'] = medium_color
+        kwargs['BranchesBar'] = 'yellow'
+    else:
+        kwargs['BranchesColor'] = high_color
+        kwargs['BranchesBar'] = 'green'
+
+    return rowstr.substitute(**kwargs)
+
+
+#
+# Produce an XML report in the Cobertura format
+#
+def print_xml_report(covdata):
+    branchTotal = 0
+    branchCovered = 0
+    lineTotal = 0
+    lineCovered = 0
+
+    options.show_branch = True
+    for key in covdata.keys():
+        (total, covered, percent) = covdata[key].coverage()
+        branchTotal += total
+        branchCovered += covered
+
+    options.show_branch = False
+    for key in covdata.keys():
+        (total, covered, percent) = covdata[key].coverage()
+        lineTotal += total
+        lineCovered += covered
+
+    impl = xml.dom.minidom.getDOMImplementation()
+    docType = impl.createDocumentType(
+        "coverage", None,
+        "http://cobertura.sourceforge.net/xml/coverage-03.dtd"
+    )
+    doc = impl.createDocument(None, "coverage", docType)
+    root = doc.documentElement
+    root.setAttribute(
+        "line-rate", lineTotal == 0 and '0.0' or
+                     str(float(lineCovered) / lineTotal)
+    )
+    root.setAttribute(
+        "branch-rate", branchTotal == 0 and '0.0' or
+                       str(float(branchCovered) / branchTotal)
+    )
+    root.setAttribute(
+        "timestamp", str(int(time.time()))
+    )
+    root.setAttribute(
+        "version", "gcovr %s" % (version_str(),)
+    )
+
+    # Generate the <sources> element: this is either the root directory
+    # (specified by --root), or the CWD.
+    sources = doc.createElement("sources")
+    root.appendChild(sources)
+
+    # Generate the coverage output (on a per-package basis)
+    packageXml = doc.createElement("packages")
+    root.appendChild(packageXml)
+    packages = {}
+    source_dirs = set()
+
+    keys = list(covdata.keys())
+    keys.sort()
+    for f in keys:
+        data = covdata[f]
+        directory = options.root_filter.sub('', f)
+        if f.endswith(directory):
+            src_path = f[:-1 * len(directory)]
+            if len(src_path) > 0:
+                while directory.startswith(os.path.sep):
+                    src_path += os.path.sep
+                    directory = directory[len(os.path.sep):]
+                source_dirs.add(src_path)
+        else:
+            # Do no truncation if the filter does not start matching at
+            # the beginning of the string
+            directory = f
+        directory, fname = os.path.split(directory)
+
+        package = packages.setdefault(
+            directory, [doc.createElement("package"), {}, 0, 0, 0, 0]
+        )
+        c = doc.createElement("class")
+        # The Cobertura DTD requires a methods section, which isn't
+        # trivial to get from gcov (so we will leave it blank)
+        c.appendChild(doc.createElement("methods"))
+        lines = doc.createElement("lines")
+        c.appendChild(lines)
+
+        class_lines = 0
+        class_hits = 0
+        class_branches = 0
+        class_branch_hits = 0
+        for line in sorted(data.all_lines):
+            hits = data.covered.get(line, 0)
+            class_lines += 1
+            if hits > 0:
+                class_hits += 1
+            l = doc.createElement("line")
+            l.setAttribute("number", str(line))
+            l.setAttribute("hits", str(hits))
+            branches = data.branches.get(line)
+            if branches is None:
+                l.setAttribute("branch", "false")
+            else:
+                b_hits = 0
+                for v in branches.values():
+                    if v > 0:
+                        b_hits += 1
+                coverage = 100 * b_hits / len(branches)
+                l.setAttribute("branch", "true")
+                l.setAttribute(
+                    "condition-coverage",
+                    "%i%% (%i/%i)" % (coverage, b_hits, len(branches))
+                )
+                cond = doc.createElement('condition')
+                cond.setAttribute("number", "0")
+                cond.setAttribute("type", "jump")
+                cond.setAttribute("coverage", "%i%%" % (coverage))
+                class_branch_hits += b_hits
+                class_branches += float(len(branches))
+                conditions = doc.createElement("conditions")
+                conditions.appendChild(cond)
+                l.appendChild(conditions)
+
+            lines.appendChild(l)
+
+        className = fname.replace('.', '_')
+        c.setAttribute("name", className)
+        c.setAttribute("filename", os.path.join(directory, fname))
+        c.setAttribute(
+            "line-rate",
+            str(class_hits / (1.0 * class_lines or 1.0))
+        )
+        c.setAttribute(
+            "branch-rate",
+            str(class_branch_hits / (1.0 * class_branches or 1.0))
+        )
+        c.setAttribute("complexity", "0.0")
+
+        package[1][className] = c
+        package[2] += class_hits
+        package[3] += class_lines
+        package[4] += class_branch_hits
+        package[5] += class_branches
+
+    keys = list(packages.keys())
+    keys.sort()
+    for packageName in keys:
+        packageData = packages[packageName]
+        package = packageData[0]
+        packageXml.appendChild(package)
+        classes = doc.createElement("classes")
+        package.appendChild(classes)
+        classNames = list(packageData[1].keys())
+        classNames.sort()
+        for className in classNames:
+            classes.appendChild(packageData[1][className])
+        package.setAttribute("name", packageName.replace(os.sep, '.'))
+        package.setAttribute(
+            "line-rate", str(packageData[2] / (1.0 * packageData[3] or 1.0))
+        )
+        package.setAttribute(
+            "branch-rate", str(packageData[4] / (1.0 * packageData[5] or 1.0))
+        )
+        package.setAttribute("complexity", "0.0")
+
+    # Populate the <sources> element: this is either the root directory
+    # (specified by --root), or relative directories based
+    # on the filter, or the CWD
+    if options.root is not None:
+        source = doc.createElement("source")
+        source.appendChild(doc.createTextNode(options.root.strip()))
+        sources.appendChild(source)
+    elif len(source_dirs) > 0:
+        cwd = os.getcwd()
+        for d in source_dirs:
+            source = doc.createElement("source")
+            if d.startswith(cwd):
+                reldir = d[len(cwd):].lstrip(os.path.sep)
+            elif cwd.startswith(d):
+                i = 1
+                while normpath(d) != \
+                        normpath(os.path.join(*tuple([cwd] + ['..'] * i))):
+                    i += 1
+                reldir = os.path.join(*tuple(['..'] * i))
+            else:
+                reldir = d
+            source.appendChild(doc.createTextNode(reldir.strip()))
+            sources.appendChild(source)
+    else:
+        source = doc.createElement("source")
+        source.appendChild(doc.createTextNode('.'))
+        sources.appendChild(source)
+
+    if options.prettyxml:
+        import textwrap
+        lines = doc.toprettyxml(" ").split('\n')
+        for i in xrange(len(lines)):
+            n = 0
+            while n < len(lines[i]) and lines[i][n] == " ":
+                n += 1
+            lines[i] = "\n".join(textwrap.wrap(
+                lines[i], 78,
+                break_long_words=False,
+                break_on_hyphens=False,
+                subsequent_indent=" " + n * " "
+            ))
+        xmlString = "\n".join(lines)
+        # print textwrap.wrap(doc.toprettyxml(" "), 80)
+    else:
+        xmlString = doc.toprettyxml(indent="")
+    if options.output is None:
+        sys.stdout.write(xmlString + '\n')
+    else:
+        OUTPUT = open(options.output, 'w')
+        OUTPUT.write(xmlString + '\n')
+        OUTPUT.close()
+
+
+##
+## MAIN
+##
+
+#
+# Create option parser
+#
+parser = OptionParser()
+parser.add_option(
+    "--version",
+    help="Print the version number, then exit",
+    action="store_true",
+    dest="version",
+    default=False
+)
+parser.add_option(
+    "-v", "--verbose",
+    help="Print progress messages",
+    action="store_true",
+    dest="verbose",
+    default=False
+)
+parser.add_option(
+    '--object-directory',
+    help="Specify the directory that contains the gcov data files.  gcovr "
+         "must be able to identify the path between the *.gcda files and the "
+         "directory where gcc was originally run.  Normally, gcovr can guess "
+         "correctly.  This option overrides gcovr's normal path detection and "
+         "can specify either the path from gcc to the gcda file (i.e. what "
+         "was passed to gcc's '-o' option), or the path from the gcda file to "
+         "gcc's original working directory.",
+    action="store",
+    dest="objdir",
+    default=None
+)
+parser.add_option(
+    "-o", "--output",
+    help="Print output to this filename",
+    action="store",
+    dest="output",
+    default=None
+)
+parser.add_option(
+    "-k", "--keep",
+    help="Keep the temporary *.gcov files generated by gcov.  "
+         "By default, these are deleted.",
+    action="store_true",
+    dest="keep",
+    default=False
+)
+parser.add_option(
+    "-d", "--delete",
+    help="Delete the coverage files after they are processed.  "
+         "These are generated by the users's program, and by default gcovr "
+         "does not remove these files.",
+    action="store_true",
+    dest="delete",
+    default=False
+)
+parser.add_option(
+    "-f", "--filter",
+    help="Keep only the data files that match this regular expression",
+    action="append",
+    dest="filter",
+    default=[]
+)
+parser.add_option(
+    "-e", "--exclude",
+    help="Exclude data files that match this regular expression",
+    action="append",
+    dest="exclude",
+    default=[]
+)
+parser.add_option(
+    "--gcov-filter",
+    help="Keep only gcov data files that match this regular expression",
+    action="store",
+    dest="gcov_filter",
+    default=None
+)
+parser.add_option(
+    "--gcov-exclude",
+    help="Exclude gcov data files that match this regular expression",
+    action="append",
+    dest="gcov_exclude",
+    default=[]
+)
+parser.add_option(
+    "-r", "--root",
+    help="Defines the root directory for source files.  "
+         "This is also used to filter the files, and to standardize "
+         "the output.",
+    action="store",
+    dest="root",
+    default=None
+)
+parser.add_option(
+    "-x", "--xml",
+    help="Generate XML instead of the normal tabular output.",
+    action="store_true",
+    dest="xml",
+    default=False
+)
+parser.add_option(
+    "--xml-pretty",
+    help="Generate pretty XML instead of the normal dense format.",
+    action="store_true",
+    dest="prettyxml",
+    default=False
+)
+parser.add_option(
+    "--html",
+    help="Generate HTML instead of the normal tabular output.",
+    action="store_true",
+    dest="html",
+    default=False
+)
+parser.add_option(
+    "--html-details",
+    help="Generate HTML output for source file coverage.",
+    action="store_true",
+    dest="html_details",
+    default=False
+)
+parser.add_option(
+    "--html-absolute-paths",
+    help="Set the paths in the HTML report to be absolute instead of relative",
+    action="store_false",
+    dest="relative_anchors",
+    default=True
+)
+parser.add_option(
+    "-b", "--branches",
+    help="Tabulate the branch coverage instead of the line coverage.",
+    action="store_true",
+    dest="show_branch",
+    default=None
+)
+parser.add_option(
+    "-u", "--sort-uncovered",
+    help="Sort entries by increasing number of uncovered lines.",
+    action="store_true",
+    dest="sort_uncovered",
+    default=None
+)
+parser.add_option(
+    "-p", "--sort-percentage",
+    help="Sort entries by decreasing percentage of covered lines.",
+    action="store_true",
+    dest="sort_percent",
+    default=None
+)
+parser.add_option(
+    "--gcov-executable",
+    help="Defines the name/path to the gcov executable [defaults to the "
+         "GCOV environment variable, if present; else 'gcov'].",
+    action="store",
+    dest="gcov_cmd",
+    default=os.environ.get('GCOV', 'gcov')
+)
+parser.add_option(
+    "--exclude-unreachable-branches",
+    help="Exclude from coverage branches which are marked to be excluded by "
+         "LCOV/GCOV markers or are determined to be from lines containing "
+         "only compiler-generated \"dead\" code.",
+    action="store_true",
+    dest="exclude_unreachable_branches",
+    default=False
+)
+parser.add_option(
+    "--exclude-directories",
+    help="Exclude directories from search path that match this regular expression",
+    action="append",
+    dest="exclude_dirs",
+    default=[]
+)
+parser.add_option(
+    "-g", "--use-gcov-files",
+    help="Use preprocessed gcov files for analysis.",
+    action="store_true",
+    dest="gcov_files",
+    default=False
+)
+parser.add_option(
+    "-s", "--print-summary",
+    help="Prints a small report to stdout with line & branch "
+         "percentage coverage",
+    action="store_true",
+    dest="print_summary",
+    default=False
+)
+parser.usage = "gcovr [options]"
+parser.description = \
+    "A utility to run gcov and generate a simple report that summarizes " \
+    "the coverage"
+#
+# Process options
+#
+options, args = parser.parse_args(args=sys.argv)
+
+if options.version:
+    sys.stdout.write(
+        "gcovr %s\n"
+        "\n"
+        "Copyright (2013) Sandia Corporation. Under the terms of Contract\n"
+        "DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government\n"
+        "retains certain rights in this software.\n"
+        % (version_str(),)
+    )
+    sys.exit(0)
+
+if options.objdir is not None:
+    if not options.objdir:
+        sys.stderr.write(
+            "(ERROR) empty --object-directory option.\n"
+            "\tThis option specifies the path to the object file "
+            "directory of your project.\n"
+            "\tThis option cannot be an empty string.\n"
+        )
+        sys.exit(1)
+    tmp = options.objdir.replace('/', os.sep).replace('\\', os.sep)
+    while os.sep + os.sep in tmp:
+        tmp = tmp.replace(os.sep + os.sep, os.sep)
+    if normpath(options.objdir) != tmp:
+        sys.stderr.write(
+            "(WARNING) relative referencing in --object-directory.\n"
+            "\tthis could cause strange errors when gcovr attempts to\n"
+            "\tidentify the original gcc working directory.\n")
+    if not os.path.exists(normpath(options.objdir)):
+        sys.stderr.write(
+            "(ERROR) Bad --object-directory option.\n"
+            "\tThe specified directory does not exist.\n")
+        sys.exit(1)
+
+if options.output is not None:
+    options.output = os.path.abspath(options.output)
+
+if options.root is not None:
+    if not options.root:
+        sys.stderr.write(
+            "(ERROR) empty --root option.\n"
+            "\tRoot specifies the path to the root "
+            "directory of your project.\n"
+            "\tThis option cannot be an empty string.\n"
+        )
+        sys.exit(1)
+    root_dir = os.path.abspath(options.root)
+else:
+    root_dir = starting_dir
+
+#
+# Setup filters
+#
+options.root_filter = re.compile(re.escape(root_dir + os.sep))
+for i in range(0, len(options.exclude)):
+    options.exclude[i] = re.compile(options.exclude[i])
+
+if options.exclude_dirs is not None:
+    for i in range(0, len(options.exclude_dirs)):
+        options.exclude_dirs[i] = re.compile(options.exclude_dirs[i])
+
+for i in range(0, len(options.filter)):
+    options.filter[i] = re.compile(options.filter[i])
+if len(options.filter) == 0:
+    options.filter.append(options.root_filter)
+
+for i in range(0, len(options.gcov_exclude)):
+    options.gcov_exclude[i] = re.compile(options.gcov_exclude[i])
+if options.gcov_filter is not None:
+    options.gcov_filter = re.compile(options.gcov_filter)
+else:
+    options.gcov_filter = re.compile('')
+#
+# Get data files
+#
+if len(args) == 1:
+    if options.root is None:
+        search_paths = ["."]
+    else:
+        search_paths = [options.root]
+
+    if options.objdir is not None:
+        search_paths.append(options.objdir)
+
+    datafiles = get_datafiles(search_paths, options)
+else:
+    datafiles = get_datafiles(args[1:], options)
+#
+# Get coverage data
+#
+covdata = {}
+for file_ in datafiles:
+    if options.gcov_files:
+        process_existing_gcov_file(file_, covdata, options)
+    else:
+        process_datafile(file_, covdata, options)
+if options.verbose:
+    sys.stdout.write(
+        "Gathered coveraged data for " + str(len(covdata)) + " files\n"
+    )
+#
+# Print report
+#
+if options.xml or options.prettyxml:
+    print_xml_report(covdata)
+elif options.html:
+    print_html_report(covdata, options.html_details)
+else:
+    print_text_report(covdata)
+
+if options.print_summary:
+    print_summary(covdata)
\ No newline at end of file
index a7bca40..fd1f3bf 100755 (executable)
@@ -121,10 +121,10 @@ TARGET_HOST="root@${TARGET_IP}"
 PASS="sshpass -p ${SSH_PASSWORD}"
 ${PASS} ssh ${TARGET_HOST} "mount -o remount,rw /"
 
-${PASS} ssh ${TARGET_HOST} "rpm -e --nodeps \$(rpm -qa 'agent-*')"
-${PASS} ssh ${TARGET_HOST} "rm -r /tmp/agent/"
-${PASS} ssh ${TARGET_HOST} "mkdir /tmp/agent/"
-${PASS} scp ${GBS_RPMS_DIR}/agent-*.rpm ${TARGET_HOST}:/tmp/agent/
-${PASS} ssh ${TARGET_HOST} "rpm -Uvih --nodeps --force /tmp/agent/*"
-
-
+${PASS} ssh ${TARGET_HOST} "rpm -e --nodeps \$(rpm -qa 'nwmanager*')"
+${PASS} ssh ${TARGET_HOST} "rm -r /tmp/nm/"
+${PASS} ssh ${TARGET_HOST} "mkdir /tmp/nm/"
+${PASS} scp ${GBS_RPMS_DIR}/nwmanager-1.0.0-* ${TARGET_HOST}:/tmp/nm/
+${PASS} scp ${GBS_RPMS_DIR}/nwmanager-nmdaemon${WORKING_MODE_PACKAGE}-1.0.0-* ${TARGET_HOST}:/tmp/nm/
+${PASS} scp ${GBS_RPMS_DIR}/nwmanager-test-1.0.0-* ${TARGET_HOST}:/tmp/nm/
+${PASS} ssh ${TARGET_HOST} "rpm -Uvih --nodeps --force /tmp/nm/*"
index 53bc134..1feee5c 100644 (file)
@@ -1,4 +1,11 @@
-//#define PROFILE_TV
+//0) PROFILE_NAME=tm2_tizen4
+//1) PROFILE_NAME=tm1_tizen4
+//2) PROFILE_NAME=kantm_tizen3
+//3) PROFILE_NAME=kantm_tizen4
+
+#ifndef PROFILE_NAME
+#  define PROFILE_NAME 1
+#endif
 
 #include <string>
 #include <vector>
 #include <dpm/restriction.h>
 #include <dpm/application.h>
 #include <dpm/security.h>
-#ifdef PROFILE_TV
+#if PROFILE_NAME == 3
 #  include <dpm/firewall.h>
 #endif
 
 typedef device_policy_manager_h dpmh;
 
-#define directly
+bool directly = false;
 
-#ifndef PROFILE_TV
+#if PROFILE_NAME != 3
 int dpm_firewall_apply_allow_rules(device_policy_manager_h handle, const char* rules){ return 0; }
 int dpm_firewall_flush_allow_rules(device_policy_manager_h handle){ return 0; }
 int dpm_firewall_apply_deny_rules(device_policy_manager_h handle, const char* rules){ return 0; }
 int dpm_firewall_flush_deny_rules(device_policy_manager_h handle){ return 0; }
-int dpm_restriction_set_usb_client_state(device_policy_manager_h handle, int allow){ return 0; }
-int dpm_restriction_get_usb_client_state(device_policy_manager_h handle, int *is_allowed){ return 0; }
+int dpm_restriction_set_usb_client_state(device_policy_manager_h handle, int allow)
+{
+    return dpm_restriction_set_camera_state(handle, allow);
+}
+int dpm_restriction_get_usb_client_state(device_policy_manager_h handle, int *is_allowed)
+{
+    return dpm_restriction_get_camera_state(handle, is_allowed);
+}
 int dpm_restriction_set_sound_state(device_policy_manager_h handle, int allow){ return 0; }
 int dpm_restriction_get_sound_state(device_policy_manager_h handle, int *is_allowed){ return 0; }
 int dpm_restriction_set_tuner_state(device_policy_manager_h handle, int allow){ return 0; }
@@ -119,6 +132,8 @@ int main(int argc, char* argv[])
     if (argc > 1)
     {
         id = argv[1];
+        if (argc > 2)
+            directly = true;
     }
     else
     {
@@ -158,6 +173,8 @@ int main(int argc, char* argv[])
                 cout << "\t4 - IPtables" << endl;
                 cout << "\t5 - Sound" << endl;
                 cout << "\t6 - Tuner" << endl;
+                cout << "\t--- " << (directly ? "DPM" : "nmdaemon") << " ---" << endl;
+                cout << "\td - switch DPM/nmdaemon" << endl;
                 cout << "\t------------------\n\tq - exit" << endl;
 
                 cin >> option;
@@ -185,6 +202,9 @@ int main(int argc, char* argv[])
                 case '6':
                     state = State::Tuner;
                     break;
+                case 'd':
+                    directly = !directly;
+                    break;
                 case 'q':
                     work = false;
                     break;
@@ -213,26 +233,18 @@ int main(int argc, char* argv[])
                 switch (option)
                 {
                 case '1':
-                    policy.setUsbSate(true);
-#ifdef directly
-                    res = dpm_restriction_set_usb_client_state(handle, 1);
-                    cout << "set res = " << res << endl;
-                    res = dpm_restriction_get_usb_client_state(handle, &allow);
-                    cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                    applyPolicy(id, policy);
-#endif
-                    break;
                 case '2':
-                    policy.setUsbSate(false);
-#ifdef directly
-                    res = dpm_restriction_set_usb_client_state(handle, 0);
-                    cout << "dpm res = " << res << endl;
-                    res = dpm_restriction_get_usb_client_state(handle, &allow);
-                    cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                    applyPolicy(id, policy);
-#endif
+                    policy.setUsbSate(option == '1');
+                    if (directly)
+                    {
+                        res = dpm_restriction_set_usb_client_state(handle, option == '1');
+                        cout << "set res = " << res << endl;
+                        res = dpm_restriction_get_usb_client_state(handle, &allow);
+                        cout << "get res = " << res << "  state = " << allow << endl;
+                    }
+                    else
+                        applyPolicy(id, policy);
+
                     break;
                 case '0':
                     state = State::Main;
@@ -262,26 +274,17 @@ int main(int argc, char* argv[])
                     switch (option)
                     {
                     case '1':
-                        policy.setWiFiSate(true);
-#ifdef directly
-                        res = dpm_restriction_set_wifi_state(handle, 1);
-                        cout << "set res = " << res << endl;
-                        res = dpm_restriction_get_wifi_state(handle, &allow);
-                        cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                       applyPolicy(id, policy);
-#endif
-                        break;
                     case '2':
-                        policy.setWiFiSate(false);
-#ifdef directly
-                        res = dpm_restriction_set_wifi_state(handle, 0);
-                        cout << "set res = " << res << endl;
-                        res = dpm_restriction_get_wifi_state(handle, &allow);
-                        cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                       applyPolicy(id, policy);
-#endif
+                        policy.setWiFiSate(option == '1');
+                        if (directly)
+                        {
+                            res = dpm_restriction_set_wifi_state(handle, option == '1');
+                            cout << "set res = " << res << endl;
+                            res = dpm_restriction_get_wifi_state(handle, &allow);
+                            cout << "get res = " << res << "  state = " << allow << endl;
+                        }
+                        else
+                            applyPolicy(id, policy);
                         break;
                     case '0':
                         state = State::Main;
@@ -311,26 +314,17 @@ int main(int argc, char* argv[])
                 switch (option)
                 {
                 case '1':
-                    policy.setSoundState(true);
-#ifdef directly
-                        res = dpm_restriction_set_sound_state(handle, 1);
-                        cout << "set res = " << res << endl;
-                        res = dpm_restriction_get_sound_state(handle, &allow);
-                        cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                       applyPolicy(id, policy);
-#endif
-                    break;
                 case '2':
-                    policy.setSoundState(false);
-#ifdef directly
-                        res = dpm_restriction_set_sound_state(handle, 0);
+                    policy.setSoundState(option == '1');
+                    if (directly)
+                    {
+                        res = dpm_restriction_set_sound_state(handle, option == '1');
                         cout << "set res = " << res << endl;
                         res = dpm_restriction_get_sound_state(handle, &allow);
                         cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                       applyPolicy(id, policy);
-#endif
+                    }
+                    else
+                        applyPolicy(id, policy);
                     break;
                 case '0':
                     state = State::Main;
@@ -360,26 +354,17 @@ int main(int argc, char* argv[])
                 switch (option)
                 {
                 case '1':
-                    policy.setTunerState(true);
-#ifdef directly
-                        res = dpm_restriction_set_tuner_state(handle, 1);
-                        cout << "set res = " << res << endl;
-                        res = dpm_restriction_get_tuner_state(handle, &allow);
-                        cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                       applyPolicy(id, policy);
-#endif
-                    break;
                 case '2':
-                    policy.setTunerState(false);
-#ifdef directly
-                        res = dpm_restriction_set_tuner_state(handle, 0);
+                    policy.setTunerState(option == '1');
+                    if (directly)
+                    {
+                        res = dpm_restriction_set_tuner_state(handle, option == '1');
                         cout << "set res = " << res << endl;
                         res = dpm_restriction_get_tuner_state(handle, &allow);
                         cout << "get res = " << res << "  state = " << allow << endl;
-#else
+                    }
+                    else
                        applyPolicy(id, policy);
-#endif
                     break;
                 case '0':
                     state = State::Main;
@@ -408,27 +393,17 @@ int main(int argc, char* argv[])
                 switch (option)
                 {
                 case '1':
-                    policy.setBluetoothState(true);
-#ifdef directly
-                    res = dpm_restriction_set_bluetooth_mode_change_state(handle, 1);
-                    cout << "set res = " << res << endl;
-                    res = dpm_restriction_get_bluetooth_mode_change_state(handle, &allow);
-                    cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                    applyPolicy(id, policy);
-#endif
-
-                    break;
                 case '2':
-                    policy.setBluetoothState(false);
-#ifdef directly
-                    res = dpm_restriction_set_bluetooth_mode_change_state(handle, 0);
-                    cout << "set res = " << res << endl;
-                    res = dpm_restriction_get_bluetooth_mode_change_state(handle, &allow);
-                    cout << "get res = " << res << "  state = " << allow << endl;
-#else
-                    applyPolicy(id, policy);
-#endif
+                    policy.setBluetoothState(option == '1');
+                    if (directly)
+                    {
+                        res = dpm_restriction_set_bluetooth_mode_change_state(handle, option == '1');
+                        cout << "set res = " << res << endl;
+                        res = dpm_restriction_get_bluetooth_mode_change_state(handle, &allow);
+                        cout << "get res = " << res << "  state = " << allow << endl;
+                    }
+                    else
+                        applyPolicy(id, policy);
                     break;
                 case '0':
                     state = State::Main;
@@ -491,64 +466,19 @@ int main(int argc, char* argv[])
                     string rule;
                     cin >> rule;
 
-#ifdef directly
-                    if (rule_allow)
-                       res = dpm_firewall_apply_allow_rules(handle, rule.c_str());
+                    if (directly)
+                    {
+                        if (rule_allow)
+                            res = dpm_firewall_apply_allow_rules(handle, rule.c_str());
+                        else
+                            res = dpm_firewall_apply_deny_rules(handle, rule.c_str());
+                        cout << "    res = " << res << endl;
+                    }
                     else
-                       res = dpm_firewall_apply_deny_rules(handle, rule.c_str());
-                    cout << "    res = " << res << endl;
-#else
-                    policy.iptablesAddRule(rule);
-                    applyPolicy(id, policy);
-#endif
-
-//                    try
-//                    {
-//                        cout << endl << "Iptables add to block list:" << endl;
-//                        cout << "----------------------" << endl;
-//                        cout << "    Enter ip address: ";
-//                        string ip, ports;
-//                        cin >> ip;
-//                        unsigned proto;
-//                        do
-//                        {
-//                            cout << "    Enter protocol (1 - UDP, 2 - TCP): ";
-//                            cin >> proto;
-//                        } while (proto != 1 && proto != 2);
-//
-//                        cout << "    Enter ports (one value, coma separated list, or range as start-end)" << endl;
-//                        cout << "    Examples:" << endl << "      1234" << endl << "      80,8080,8000" << endl << "      22-1000" << endl;
-//                        cin >> ports;
-//
-//                        auto pos = ports.find('-');
-//
-//                        IPTablesProtocol p = proto == 1 ? IPTablesProtocol::UDP : IPTablesProtocol::TCP;
-//
-//                        if (pos != string::npos)
-//                        {
-//                            string start = strip(ports.substr(0, pos));
-//                            string end = strip(ports.substr(pos + 1, string::npos));
-//                            policy.iptablesAddBlockRange(ip, p, std::stoul(start), std::stoul(end));
-//                        }
-//                        else
-//                        {
-//                            auto sports = split(ports, ',');
-//
-//                            std::vector<unsigned short> vports;
-//                            for (auto sport : sports)
-//                            {
-//                                vports.push_back((unsigned short)std::stoul(strip(sport)));
-//                            }
-//
-//                            policy.iptablesAddBlock(ip, p, vports);
-//                            applyPolicy(id, policy);
-//                        }
-//                    }
-//                    catch (...)
-//                    {
-//                        cout << "Wrong format" << endl;
-//                    }
-
+                    {
+                        policy.iptablesAddRule(rule);
+                        applyPolicy(id, policy);
+                    }
                 }
                 state = State::Iptables;
                 break;
@@ -557,33 +487,19 @@ int main(int argc, char* argv[])
                     try
                     {
                         cout << endl << "Iptables remove from block list" << endl;
-#ifdef directly
-                        if (rule_allow)
-                               res = dpm_firewall_flush_allow_rules(handle);
+                        if (directly)
+                        {
+                            if (rule_allow)
+                                res = dpm_firewall_flush_allow_rules(handle);
+                            else
+                                res = dpm_firewall_flush_deny_rules(handle);
+                            cout << "    res = " << res << endl;
+                        }
                         else
-                               res = dpm_firewall_flush_deny_rules(handle);
-                        cout << "    res = " << res << endl;
-#else
-                    policy.iptablesClear();
-                    applyPolicy(id, policy);
-#endif
-
-
-//                        cout << "----------------------" << endl;
-//                        cout << "    Enter ip address: ";
-//                        string ip, ports;
-//                        cin >> ip;
-//                        unsigned proto;
-//                        do
-//                        {
-//                            cout << "    Enter protocol (1 - UDP, 2 - TCP): ";
-//                            cin >> proto;
-//                        } while (proto != 1 && proto != 2);
-//
-//                        IPTablesProtocol p = proto == 1 ? IPTablesProtocol::UDP : IPTablesProtocol::TCP;
-//
-//                        policy.iptablesRemoveBlock(ip, p);
-//                        applyPolicy(id, policy);
+                        {
+                            policy.iptablesClear();
+                            applyPolicy(id, policy);
+                        }
                     }
                     catch (...)
                     {
index 91e9aec..cbe4d1f 100644 (file)
@@ -13,12 +13,12 @@ SET(CMAKE_MAKEFILE_DEPENDS
   "CMakeLists.txt"
   "libs/CMakeLists.txt"
   "libs/dpm.pc.in"
-  "libs/tv.cmake"
+  "libs/mobile.cmake"
   "server/CMakeLists.txt"
+  "server/mobile.cmake"
   "server/systemd/device-policy-manager.service.in"
-  "server/tv.cmake"
   "tests/CMakeLists.txt"
-  "tests/tv.cmake"
+  "tests/mobile.cmake"
   "tools/CMakeLists.txt"
   "tools/cli/CMakeLists.txt"
   "tools/syspopup/CMakeLists.txt"
@@ -29,6 +29,7 @@ SET(CMAKE_MAKEFILE_DEPENDS
   "/usr/share/cmake/Modules/CMakeGenericSystem.cmake"
   "/usr/share/cmake/Modules/CMakeParseArguments.cmake"
   "/usr/share/cmake/Modules/CMakeSystemSpecificInformation.cmake"
+  "/usr/share/cmake/Modules/CMakeUnixFindMake.cmake"
   "/usr/share/cmake/Modules/Compiler/GNU-C.cmake"
   "/usr/share/cmake/Modules/Compiler/GNU-CXX.cmake"
   "/usr/share/cmake/Modules/Compiler/GNU.cmake"
index 5916288..d5c9539 100644 (file)
@@ -80,7 +80,7 @@ server/preinstall:
 server/CMakeFiles/device-policy-manager.dir/all:
        $(MAKE) -f server/CMakeFiles/device-policy-manager.dir/build.make server/CMakeFiles/device-policy-manager.dir/depend
        $(MAKE) -f server/CMakeFiles/device-policy-manager.dir/build.make server/CMakeFiles/device-policy-manager.dir/build
-       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
        @echo "Built target device-policy-manager"
 .PHONY : server/CMakeFiles/device-policy-manager.dir/all
 
@@ -90,7 +90,7 @@ all: server/CMakeFiles/device-policy-manager.dir/all
 
 # Build rule for subdir invocation for target.
 server/CMakeFiles/device-policy-manager.dir/rule: cmake_check_build_system
-       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 15
+       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 17
        $(MAKE) -f CMakeFiles/Makefile2 server/CMakeFiles/device-policy-manager.dir/all
        $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 0
 .PHONY : server/CMakeFiles/device-policy-manager.dir/rule
@@ -130,7 +130,7 @@ libs/preinstall:
 libs/CMakeFiles/dpm.dir/all:
        $(MAKE) -f libs/CMakeFiles/dpm.dir/build.make libs/CMakeFiles/dpm.dir/depend
        $(MAKE) -f libs/CMakeFiles/dpm.dir/build.make libs/CMakeFiles/dpm.dir/build
-       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  16 17 18 19 20 21 22 23 24 25 26 27 28 29
+       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
        @echo "Built target dpm"
 .PHONY : libs/CMakeFiles/dpm.dir/all
 
@@ -140,7 +140,7 @@ all: libs/CMakeFiles/dpm.dir/all
 
 # Build rule for subdir invocation for target.
 libs/CMakeFiles/dpm.dir/rule: cmake_check_build_system
-       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 14
+       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 15
        $(MAKE) -f CMakeFiles/Makefile2 libs/CMakeFiles/dpm.dir/all
        $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 0
 .PHONY : libs/CMakeFiles/dpm.dir/rule
@@ -198,7 +198,7 @@ tools/cli/preinstall:
 tools/cli/CMakeFiles/dpm-admin-cli.dir/all: libs/CMakeFiles/dpm.dir/all
        $(MAKE) -f tools/cli/CMakeFiles/dpm-admin-cli.dir/build.make tools/cli/CMakeFiles/dpm-admin-cli.dir/depend
        $(MAKE) -f tools/cli/CMakeFiles/dpm-admin-cli.dir/build.make tools/cli/CMakeFiles/dpm-admin-cli.dir/build
-       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 
+       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  33
        @echo "Built target dpm-admin-cli"
 .PHONY : tools/cli/CMakeFiles/dpm-admin-cli.dir/all
 
@@ -208,7 +208,7 @@ all: tools/cli/CMakeFiles/dpm-admin-cli.dir/all
 
 # Build rule for subdir invocation for target.
 tools/cli/CMakeFiles/dpm-admin-cli.dir/rule: cmake_check_build_system
-       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 14
+       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 16
        $(MAKE) -f CMakeFiles/Makefile2 tools/cli/CMakeFiles/dpm-admin-cli.dir/all
        $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 0
 .PHONY : tools/cli/CMakeFiles/dpm-admin-cli.dir/rule
@@ -250,7 +250,7 @@ tools/syspopup/preinstall: tools/syspopup/po/preinstall
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/all: libs/CMakeFiles/dpm.dir/all
        $(MAKE) -f tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/build.make tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/depend
        $(MAKE) -f tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/build.make tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/build
-       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  38 39 40 41 42 43 44
+       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  42 43 44 45 46 47
        @echo "Built target org.tizen.dpm-syspopup"
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/all
 
@@ -300,7 +300,7 @@ tools/syspopup/po/preinstall:
 tools/syspopup/po/CMakeFiles/po.dir/all:
        $(MAKE) -f tools/syspopup/po/CMakeFiles/po.dir/build.make tools/syspopup/po/CMakeFiles/po.dir/depend
        $(MAKE) -f tools/syspopup/po/CMakeFiles/po.dir/build.make tools/syspopup/po/CMakeFiles/po.dir/build
-       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
+       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
        @echo "Built target po"
 .PHONY : tools/syspopup/po/CMakeFiles/po.dir/all
 
@@ -310,7 +310,7 @@ all: tools/syspopup/po/CMakeFiles/po.dir/all
 
 # Build rule for subdir invocation for target.
 tools/syspopup/po/CMakeFiles/po.dir/rule: cmake_check_build_system
-       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 56
+       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 53
        $(MAKE) -f CMakeFiles/Makefile2 tools/syspopup/po/CMakeFiles/po.dir/all
        $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 0
 .PHONY : tools/syspopup/po/CMakeFiles/po.dir/rule
@@ -350,7 +350,7 @@ tests/preinstall:
 tests/CMakeFiles/dpm-api-tests.dir/all: libs/CMakeFiles/dpm.dir/all
        $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/depend
        $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/build
-       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  30 31 32 33 34 35 36 37
+       $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles  34 35 36 37 38 39 40 41
        @echo "Built target dpm-api-tests"
 .PHONY : tests/CMakeFiles/dpm-api-tests.dir/all
 
@@ -360,7 +360,7 @@ all: tests/CMakeFiles/dpm-api-tests.dir/all
 
 # Build rule for subdir invocation for target.
 tests/CMakeFiles/dpm-api-tests.dir/rule: cmake_check_build_system
-       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 22
+       $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 23
        $(MAKE) -f CMakeFiles/Makefile2 tests/CMakeFiles/dpm-api-tests.dir/all
        $(CMAKE_COMMAND) -E cmake_progress_start /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles 0
 .PHONY : tests/CMakeFiles/dpm-api-tests.dir/rule
index 08686bd..d9c4148 100755 (executable)
@@ -40,7 +40,7 @@ else()
        SET(CXX_STD "c++11")
 endif()
 
-SET(COMPILE_BASE_FLAGS         "-g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive")
+SET(COMPILE_BASE_FLAGS         "-g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -DDPM_BUILD_${TIZEN_PROFILE_NAME}")
 SET(CMAKE_C_FLAGS_PROFILING    "${COMPILE_BASE_FLAGS} -O0 -pg")
 SET(CMAKE_CXX_FLAGS_PROFILING  "${COMPILE_BASE_FLAGS} -O0 -pg -std=${CXX_STD} -fno-rtti")
 SET(CMAKE_C_FLAGS_DEBUG                "${COMPILE_BASE_FLAGS} -O0 -ggdb")
index f426d75..f9688d9 100644 (file)
@@ -85,16 +85,6 @@ install/local: preinstall
 install/local/fast: install/local
 .PHONY : install/local/fast
 
-# Special rule for the target install/strip
-install/strip: preinstall
-       @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
-       /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-.PHONY : install/strip
-
-# Special rule for the target install/strip
-install/strip/fast: install/strip
-.PHONY : install/strip/fast
-
 # Special rule for the target list_install_components
 list_install_components:
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"RuntimeLibraries\" \"Unspecified\""
@@ -232,7 +222,6 @@ help:
        @echo "... edit_cache"
        @echo "... install"
        @echo "... install/local"
-       @echo "... install/strip"
        @echo "... list_install_components"
        @echo "... rebuild_cache"
        @echo "... device-policy-manager"
index 1b846dd..5fe9127 100755 (executable)
@@ -55,6 +55,7 @@ BluetoothPolicy::~BluetoothPolicy()
 // for restriction CPIs
 int BluetoothPolicy::setModeChangeState(bool enable)
 {
+    std::cout << "LIB: BluetoothPolicy::setModeChangeState() " << enable << std::endl;
        PolicyControlContext& context = pimpl->context;
        return context->methodCall<int>("BluetoothPolicy::setModeChangeState", enable);
 }
index 2579dc4..19b15bf 100755 (executable)
@@ -344,9 +344,14 @@ EXPORT_API int dpm_restriction_set_bluetooth_mode_change_state(device_policy_man
 
        try {
                return bluetooth.setModeChangeState(allow);
-       } catch (...) {
-               return -1;
-       }
+    } catch (runtime::Exception& e) {
+        std::cout << "LIB: exception: " << e.what() << std::endl;
+        return -1;
+    }
+    catch (...) {
+        std::cout << "LIB: unknown exception  " << std::endl;
+        return -1;
+    }
 }
 
 EXPORT_API int dpm_restriction_get_bluetooth_mode_change_state(device_policy_manager_h handle, int *is_allowed)
index 6fa9d26..3dd0a07 100644 (file)
@@ -37,8 +37,10 @@ BuildRequires: pkgconfig(key-manager)
 BuildRequires: pkgconfig(cynara-client)
 BuildRequires: pkgconfig(cynara-session)
 BuildRequires: pkgconfig(jsoncpp)
+%if "%{profile}" == "tv"
 BuildRequires: pkgconfig(capi-system-usbdevice)
 BuildRequires: pkgconfig(capi-media-sound-manager-tv)
+%endif
 
 %if "%{profile}" != "tv"
 BuildRequires: pkgconfig(capi-location-manager)
index 906d67a..392b130 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+rm -f ../CMakeCache.txt
+
 SCRIPT_PATH=$(readlink -m ${0})
 SCRIPT_DIR=${SCRIPT_PATH%/*}
 ROOT_DIR=${SCRIPT_DIR}/..
@@ -50,10 +52,10 @@ echo -e "\n\n"
 
 
 case $DEVICE in
-       0) PROFILE=profile.tzmb_3.0_TM2 ; TARGET_ARCH=aarch64 ; GTEST_TYPE="main" ;;
-       1) PROFILE=tm1_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ;;
-       2) PROFILE=profile.Main2017_KantM ; TARGET_ARCH=armv7l ; GTEST_TYPE="mock" ;;
-       3) PROFILE=profile.kantm_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ;;
+       0) PROFILE=profile.tzmb_3.0_TM2 ; TARGET_ARCH=aarch64 ; GTEST_TYPE="main" ; prof=mobile;;
+       1) PROFILE=tm1_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ; prof=mobile ;;
+       2) PROFILE=profile.Main2017_KantM ; TARGET_ARCH=armv7l ; GTEST_TYPE="mock" ; prof=tv ;;
+       3) PROFILE=profile.kantm_tizen4 ; TARGET_ARCH=armv7l ; GTEST_TYPE="main" ; prof=tv ;;
        ?) echo "error: unknown DEVICE number"; exit 1 ;;
 esac
 
@@ -76,6 +78,11 @@ do
                USE_CLEAN="--clean"
                echo 'CLEAN ON'
        fi
+
+       if [ "-c" = $ARG ];then
+               USE_CLEAN="--clean"
+               echo 'CLEAN ON'
+       fi
 done
 
 cd $ROOT_DIR
@@ -95,7 +102,7 @@ function cleanup() {
 
 gbs --conf ${SCRIPT_DIR}/gbs.conf build -P ${PROFILE} -A ${TARGET_ARCH} --incremental ${USE_CLEAN} --include-all --threads 1 \
        --define '__debug_install_post %{nil}' --define 'debug_package %{nil}' \
-       --define 'build_type '$BUILD_TYPE --define 'GTEST_TYPE '$GTEST_TYPE
+       --define 'build_type '$BUILD_TYPE --define 'GTEST_TYPE '$GTEST_TYPE --define 'profile '$prof
 
 #remove temporary files
 cleanup
index 324eff2..da8773c 100644 (file)
@@ -31,7 +31,7 @@ url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm64/packages
 [repo.snapshots_tizen4_tm2_srk]
 url = http://52.71.167.178/repo/tm2/packages/
 [repo.snapshots_tizen4]
-url = http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/
+url = http://download.tizen.org/snapshots/tizen/unified/tizen-unified_20170905.1/repos/standard/packages/
 
 [profile.tm2_tizen4]
 obs = obs.tizen_org
index 4723b39..7ebdcaa 100755 (executable)
@@ -40,6 +40,12 @@ SET(POLICY                   administration.cpp
                                        wifi.cpp
 )
 
+IF("${TIZEN_PROFILE_NAME}" STREQUAL "tv")
+       SET(DEPENDENCY_EXT              capi-media-sound-manager-tv)
+else()
+       SET(DEPENDENCY_EXT              )
+endif()
+
 SET(DEPENDENCY         klay
                                        glib-2.0
                                        gio-2.0
@@ -65,7 +71,7 @@ SET(DEPENDENCY                klay
                                        cynara-client
                                        cynara-session
                                        jsoncpp
-                                       capi-media-sound-manager-tv
+                                       ${DEPENDENCY_EXT}
 )
 
 INCLUDE("${TIZEN_PROFILE_NAME}.cmake")
@@ -76,7 +82,11 @@ PKG_CHECK_MODULES(SERVER_DEPS REQUIRED ${DEPENDENCY})
 
 INCLUDE_DIRECTORIES(SYSTEM ${SERVER_DEPS_INCLUDE_DIRS} ${DPM_POLICY} ${DPM_SERVER})
 
-TARGET_LINK_LIBRARIES(${TARGET} ${SERVER_DEPS_LIBRARIES} pthread sqlite3 capi-media-sound-manager-tv)
+IF("${TIZEN_PROFILE_NAME}" STREQUAL "tv")
+       TARGET_LINK_LIBRARIES(${TARGET} ${SERVER_DEPS_LIBRARIES} pthread sqlite3 capi-media-sound-manager-tv)
+else()
+       TARGET_LINK_LIBRARIES(${TARGET} ${SERVER_DEPS_LIBRARIES} pthread sqlite3)
+endif()
 
 SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS "-fPIE")
 SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_FLAGS "-pie")
index 3d864f1..60e7c24 100755 (executable)
@@ -49,7 +49,6 @@ public:
        bool operator()(bool enable)
        {
                int ret = 0;
-               dpmlog( "BluetoothStateEnforceModel:operator(): %i\n", enable ? 1 : 0);
 
                if (enable) {
                        //turn on
@@ -155,13 +154,13 @@ BluetoothPolicy::~BluetoothPolicy()
 
 int BluetoothPolicy::setModeChangeState(bool enable)
 {
-       dpmlog( "BluetoothPolicy::setModeChangeState(%i)\n", enable ? 1 : 0);
-
-       try {
+    std::cout << "SERVER: BluetoothPolicy::setModeChangeState() " << enable << std::endl;
+    try {
                pimpl->setPolicy(pimpl->modeChange, enable);
        } catch (runtime::Exception& e) {
                ERROR(e.what());
-               return -1;
+        std::cout << "   exception: " << e.what() << std::endl;
+        return -1;
        }
 
        return 0;
index 996b8ef..adeaae8 100755 (executable)
 #include "syspopup.h"
 #include "server.h"
 
-void dpmlog(const char* _msg, ...)
-{
-    va_list vl;
-
-    va_start(vl, _msg);
-    FILE* file = fopen("/tmp/dpmlog", "a+");
-    if(file)
-    {
-        vfprintf(file, _msg, vl);
-        fclose(file);
-    }
-    va_end(vl);
-}
-
 void signalHandler(int signum)
 {
        exit(0);
@@ -56,10 +42,9 @@ int main(int argc, char *argv[])
 
        ::umask(022);
 
-       dpmlog("##############################\n");
        try {
-               audit::Logger::setBackend(new audit::DlogLogSink());
-               audit::Logger::setTag("DPM");
+//             audit::Logger::setBackend(new audit::DlogLogSink());
+//             audit::Logger::setTag("DPM");
 
                PreferencesStore& instance = PreferencesStore::getInstance();
                instance.load("/etc/device-policy-manager.ini");
index 4ae8648..2e43696 100755 (executable)
 #include <klay/exception.h>
 #include <klay/dbus/connection.h>
 #include <klay/audit/logger.h>
-#include <usb-device.h>
 #include <iostream>
 #include <fstream>
+#ifdef DPM_BUILD_tv
 #include <media/sound_manager_product.h>
+#endif
 #include "privilege.h"
 #include "policy-builder.h"
 #include "policy-model.h"
 #include "restriction.hxx"
 
-void dpmlog(const char* _msg, ...);
-
 #define PULSEAUDIO_LOGIN_INTERFACE          \
        "org.pulseaudio.Server",                \
        "/org/pulseaudio/StreamManager",        \
@@ -39,8 +38,6 @@ void dpmlog(const char* _msg, ...);
        "org.tizen.system.deviced.SysNoti",     \
        "control"
 
-void dpmlog(const char* _msg, ...);
-
 namespace DevicePolicyManager {
 
 class RecordingEnforceModel : public BaseEnforceModel {
@@ -118,14 +115,13 @@ int set_external_storage_state(int allow)
 
                  if (d == NULL)
                  {
-                         dpmlog( "Couldn't open directory\n");
+              ERROR( "Couldn't open directory\n");
                          return 1;
                  }
 
 
                  while ((de = readdir(d)))
                  {
-                         dpmlog( "fake_dpm_usb: unbind file %s\n", de->d_name);
                          std::ofstream ofs("/sys/bus/usb/drivers/usb-storage/unbind");
                          ofs << de->d_name;
                  }
@@ -144,11 +140,9 @@ int set_external_storage_state(int allow)
 
        while (true)
        {
-               dpmlog( "fake_dpm_usb: %s\n", s);
                res = system(s);
                if (res)
                {
-                       dpmlog( "%s returned error.\n", s);
                        if (tries--)
                                std::this_thread::sleep_for(std::chrono::seconds(1));
                        else
@@ -160,7 +154,6 @@ int set_external_storage_state(int allow)
 
        if (res)
        {
-               dpmlog( "modprobe(%s) error %i\n", s, res);
                return 1;
        }
        else
@@ -176,8 +169,6 @@ public:
 
        bool operator()(bool enable)
        {
-        dpmlog("UsbClientEnforceModel::operator(%i)\n", int(enable));
-
         int ret = 0;
         //usb_device_init();
 
@@ -191,8 +182,6 @@ public:
             ret = set_external_storage_state(0);
         }
 
-        dpmlog("UsbClientEnforceModel ret = %i\n", ret);
-
         //usb_device_fini();
 
         if (ret == 0) {
@@ -301,7 +290,6 @@ RestrictionPolicy::~RestrictionPolicy()
 
 int RestrictionPolicy::setCameraState(bool enable)
 {
-       dpmlog("RestrictionPolicy::setCameraState()\n");
        try {
                pimpl->setPolicy(pimpl->camera, enable);
        } catch (runtime::Exception& e) {
@@ -314,7 +302,6 @@ int RestrictionPolicy::setCameraState(bool enable)
 
 bool RestrictionPolicy::getCameraState()
 {
-       dpmlog("RestrictionPolicy::getCameraState()\n");
        return pimpl->getPolicy(pimpl->camera);
 }
 
@@ -456,19 +443,15 @@ bool RestrictionPolicy::getBrowserState()
 
 bool RestrictionPolicy::getUsbClientState()
 {
-       dpmlog("RestrictionPolicy::getUsbClientState()\n");
        return pimpl->getPolicy(pimpl->usbClient);
 }
 
 int RestrictionPolicy::setUsbClientState(bool enable)
 {
-       dpmlog("RestrictionPolicy::setUsbClientState(%i)\n", (int)enable);
-
     try {
                pimpl->setPolicy(pimpl->usbClient, enable);
        } catch (runtime::Exception& e) {
                ERROR(e.what());
-               dpmlog("throw: %s\n", e.what());
                return 0;
        }
 
@@ -477,27 +460,29 @@ int RestrictionPolicy::setUsbClientState(bool enable)
 
 bool RestrictionPolicy::getSpeakerOutAllow()
 {
-    bool flag;
+    bool flag = true;
 
+#ifdef DPM_BUILD_tv
     if (sound_manager_get_device_mute(SOUND_TV_DEVICE_MUTE_SPEAKER, &flag) != 0)
     {
        ERROR("Sound manager error!");
 
         return false;
     }
+#endif
 
     return !flag;
 }
 int RestrictionPolicy::setSpeakerOutAllow(bool enable)
 {
-       dpmlog("RestrictionPolicy::SetSpeakerOutAllow(%d)\n", int(enable));
-
+#ifdef DPM_BUILD_tv
     if (sound_manager_set_device_mute(SOUND_TV_DEVICE_MUTE_SPEAKER, !enable) != 0)
     {
        ERROR("Sound manager error!");
 
         return -1;
     }
+#endif
 
     return 0;
 }
@@ -509,13 +494,10 @@ bool RestrictionPolicy::getDTVTunerAllow()
 
 int RestrictionPolicy::setDTVTunerAllow(bool enable)
 {
-       dpmlog("Target TUNER state %d\n", enable);
-
     bool state = (system("/usr/bin/systemctl status tvs_deamon.service") == 0);
 
     if (enable == state)
     {
-       dpmlog("DTV tuner already %s. Return 0\n", state ? "enabled":"disabled");
         return 0;
     }
 
@@ -526,7 +508,6 @@ int RestrictionPolicy::setDTVTunerAllow(bool enable)
 
     if (system(command.c_str()))
     {
-       dpmlog("%s returned error.", command.c_str());
         return -1;
     }
 
index 72badb2..eda978b 100755 (executable)
@@ -24,8 +24,6 @@
 #include <klay/file-descriptor.h>
 #include <klay/rmi/service.h>
 
-void dpmlog(const char* _msg, ...);
-
 class Server {
 public:
        Server();
index 9d3716e..3b0e40d 100755 (executable)
@@ -43,8 +43,6 @@ namespace DevicePolicyManager {
 
 int fake_set_wifi_state(int allow)
 {
-       dpmlog("[fake_set_wifi_state] %i\n", allow);
-
        int res = 0;
 
        // install/remove kernel module wlan.ko
@@ -62,7 +60,6 @@ int fake_set_wifi_state(int allow)
                res = ExecuteCommand::executeCommand(std::string(s));
                if (res)
                {
-                       dpmlog("  [%s] returned error %i\n", s, res);
                        if (tries--)
                                std::this_thread::sleep_for(std::chrono::seconds(1));
                        else
@@ -74,7 +71,6 @@ int fake_set_wifi_state(int allow)
 
        if (res)
        {
-               dpmlog("  modprobe(%s) error %i\n", s, res);
                return 1;
        }
        else
@@ -90,7 +86,6 @@ public:
 
        bool operator()(bool enable)
        {
-               dpmlog("WifiStateEnforceModel(%i)\n", (int)enable);
 //        try {
 //            dbus::Connection &systemDBus = dbus::Connection::getSystem();
 //            systemDBus.methodcall(NETCONFIG_INTERFACE,
@@ -120,7 +115,6 @@ public:
 
        bool operator()(bool enable)
        {
-               dpmlog("WifiProfileChangeEnforceModel(%i)\n", (int)enable);
                try {
                        dbus::Connection &systemDBus = dbus::Connection::getSystem();
                        systemDBus.methodcall(NETCONFIG_INTERFACE,
index 42053ca..1b8b44f 100644 (file)
@@ -85,16 +85,6 @@ install/local: preinstall
 install/local/fast: install/local
 .PHONY : install/local/fast
 
-# Special rule for the target install/strip
-install/strip: preinstall
-       @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
-       /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-.PHONY : install/strip
-
-# Special rule for the target install/strip
-install/strip/fast: install/strip
-.PHONY : install/strip/fast
-
 # Special rule for the target list_install_components
 list_install_components:
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"RuntimeLibraries\" \"Unspecified\""
@@ -303,6 +293,30 @@ manager.c.s:
        cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1 && $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/manager.c.s
 .PHONY : manager.c.s
 
+password.o: password.c.o
+.PHONY : password.o
+
+# target to build an object file
+password.c.o:
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1 && $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/password.c.o
+.PHONY : password.c.o
+
+password.i: password.c.i
+.PHONY : password.i
+
+# target to preprocess a source file
+password.c.i:
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1 && $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/password.c.i
+.PHONY : password.c.i
+
+password.s: password.c.s
+.PHONY : password.s
+
+# target to generate assembly for a file
+password.c.s:
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1 && $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/password.c.s
+.PHONY : password.c.s
+
 restriction.o: restriction.c.o
 .PHONY : restriction.o
 
@@ -399,6 +413,30 @@ wifi.c.s:
        cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1 && $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/wifi.c.s
 .PHONY : wifi.c.s
 
+zone.o: zone.c.o
+.PHONY : zone.o
+
+# target to build an object file
+zone.c.o:
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1 && $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/zone.c.o
+.PHONY : zone.c.o
+
+zone.i: zone.c.i
+.PHONY : zone.i
+
+# target to preprocess a source file
+zone.c.i:
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1 && $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/zone.c.i
+.PHONY : zone.c.i
+
+zone.s: zone.c.s
+.PHONY : zone.s
+
+# target to generate assembly for a file
+zone.c.s:
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1 && $(MAKE) -f tests/CMakeFiles/dpm-api-tests.dir/build.make tests/CMakeFiles/dpm-api-tests.dir/zone.c.s
+.PHONY : zone.c.s
+
 # Help Target
 help:
        @echo "The following are some of the valid targets for this Makefile:"
@@ -409,7 +447,6 @@ help:
        @echo "... edit_cache"
        @echo "... install"
        @echo "... install/local"
-       @echo "... install/strip"
        @echo "... list_install_components"
        @echo "... rebuild_cache"
        @echo "... admin.o"
@@ -430,6 +467,9 @@ help:
        @echo "... manager.o"
        @echo "... manager.i"
        @echo "... manager.s"
+       @echo "... password.o"
+       @echo "... password.i"
+       @echo "... password.s"
        @echo "... restriction.o"
        @echo "... restriction.i"
        @echo "... restriction.s"
@@ -442,6 +482,9 @@ help:
        @echo "... wifi.o"
        @echo "... wifi.i"
        @echo "... wifi.s"
+       @echo "... zone.o"
+       @echo "... zone.i"
+       @echo "... zone.s"
 .PHONY : help
 
 
diff --git a/device-policy-manager/tests/cmake_install.cmake b/device-policy-manager/tests/cmake_install.cmake
new file mode 100644 (file)
index 0000000..f218b34
--- /dev/null
@@ -0,0 +1,38 @@
+# Install script for directory: /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tests
+
+# Set the install prefix
+IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+  SET(CMAKE_INSTALL_PREFIX "/usr")
+ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+
+# Set the install configuration name.
+IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+  IF(BUILD_TYPE)
+    STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
+           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
+  ELSE(BUILD_TYPE)
+    SET(CMAKE_INSTALL_CONFIG_NAME "RELEASE")
+  ENDIF(BUILD_TYPE)
+  MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
+ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+
+# Set the component getting installed.
+IF(NOT CMAKE_INSTALL_COMPONENT)
+  IF(COMPONENT)
+    MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
+    SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
+  ELSE(COMPONENT)
+    SET(CMAKE_INSTALL_COMPONENT)
+  ENDIF(COMPONENT)
+ENDIF(NOT CMAKE_INSTALL_COMPONENT)
+
+# Install shared libraries without execute permission?
+IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+  SET(CMAKE_INSTALL_SO_NO_EXE "0")
+ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+
+IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
+  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "/home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tests/dpm-api-tests")
+ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
+
old mode 100755 (executable)
new mode 100644 (file)
index 46919b2..340832c
@@ -59,15 +59,15 @@ tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o: tools/cli/CMakeFiles
 tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o: tools/cli/dpm-admin-cli.cpp
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_1)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli && /bin/c++   $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-admin-cli.cpp
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli && /usr/bin/c++   $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-admin-cli.cpp
 
 tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli && /bin/c++  $(CXX_DEFINES) $(CXX_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-admin-cli.cpp > CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli && /usr/bin/c++  $(CXX_DEFINES) $(CXX_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-admin-cli.cpp > CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.i
 
 tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli && /bin/c++  $(CXX_DEFINES) $(CXX_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-admin-cli.cpp -o CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli && /usr/bin/c++  $(CXX_DEFINES) $(CXX_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-admin-cli.cpp -o CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.s
 
 tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o.requires:
 .PHONY : tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o.requires
old mode 100755 (executable)
new mode 100644 (file)
index fd0e396..bbf10c1
Binary files a/device-policy-manager/tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o and b/device-policy-manager/tools/cli/CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o differ
old mode 100755 (executable)
new mode 100644 (file)
index 12ed8aa..d88d7da
@@ -1,8 +1,8 @@
 # CMAKE generated file: DO NOT EDIT!
 # Generated by "Unix Makefiles" Generator, CMake Version 2.8
 
-# compile CXX with /bin/c++
-CXX_FLAGS = -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed --param=ssp-buffer-size=4 -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -march=armv7ve -mlittle-endian -mfpu=neon-vfpv4 -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -g -std=gnu++11  -g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -O2 -DNDEBUG -std=c++11 -fno-rtti -isystem /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/libs   
+# compile CXX with /usr/bin/c++
+CXX_FLAGS = -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -g -std=gnu++11  -g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -DDPM_BUILD_mobile -O2 -DNDEBUG -std=c++11 -fno-rtti -isystem /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/libs   
 
 CXX_DEFINES = -DUG_WAYLAND
 
old mode 100755 (executable)
new mode 100644 (file)
index 997abe4..d33d288
@@ -1 +1 @@
-/bin/c++   -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed --param=ssp-buffer-size=4 -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -march=armv7ve -mlittle-endian -mfpu=neon-vfpv4 -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -g -std=gnu++11  -g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -O2 -DNDEBUG -std=c++11 -fno-rtti    CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o  -o dpm-admin-cli -rdynamic ../../libs/libdpm.so.0.0.1 -lklay -ldlog -lsqlite3 -lxml2 -ltzplatform-config-2.0 -lglib-2.0 -lcapi-base-common -lpthread 
+/usr/bin/c++   -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -g -std=gnu++11  -g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -DDPM_BUILD_mobile -O2 -DNDEBUG -std=c++11 -fno-rtti    CMakeFiles/dpm-admin-cli.dir/dpm-admin-cli.cpp.o  -o dpm-admin-cli -rdynamic ../../libs/libdpm.so.0.0.1 -lklay -lglib-2.0 -lcapi-base-common -lpthread 
diff --git a/device-policy-manager/tools/cli/cmake_install.cmake b/device-policy-manager/tools/cli/cmake_install.cmake
new file mode 100644 (file)
index 0000000..0cc08b2
--- /dev/null
@@ -0,0 +1,46 @@
+# Install script for directory: /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli
+
+# Set the install prefix
+IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+  SET(CMAKE_INSTALL_PREFIX "/usr")
+ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+
+# Set the install configuration name.
+IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+  IF(BUILD_TYPE)
+    STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
+           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
+  ELSE(BUILD_TYPE)
+    SET(CMAKE_INSTALL_CONFIG_NAME "RELEASE")
+  ENDIF(BUILD_TYPE)
+  MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
+ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
+
+# Set the component getting installed.
+IF(NOT CMAKE_INSTALL_COMPONENT)
+  IF(COMPONENT)
+    MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
+    SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
+  ELSE(COMPONENT)
+    SET(CMAKE_INSTALL_COMPONENT)
+  ENDIF(COMPONENT)
+ENDIF(NOT CMAKE_INSTALL_COMPONENT)
+
+# Install shared libraries without execute permission?
+IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+  SET(CMAKE_INSTALL_SO_NO_EXE "0")
+ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
+
+IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
+  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE FILE FILES "/home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-storage-builder")
+ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
+
+IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
+  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE FILE FILES "/home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-syspopup")
+ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
+
+IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
+  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE EXECUTABLE FILES "/home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/cli/dpm-admin-cli")
+ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
+
old mode 100755 (executable)
new mode 100644 (file)
index f904234..138f72a
@@ -31,10 +31,7 @@ SET(CMAKE_C_TARGET_INCLUDE_PATH
   "tools/syspopup/./include"
   "/usr/include/appfw"
   "/usr/include/vconf"
-  "/usr/include/appcore"
-  "/usr/include/sensor"
-  "/usr/include/aul"
-  "/usr/include/capi-system-system-settings"
+  "/usr/include/system"
   "/usr/include/ui"
   "/usr/include/ui/ui"
   "/usr/include/elementary-1"
@@ -64,7 +61,6 @@ SET(CMAKE_C_TARGET_INCLUDE_PATH
   "/usr/include/ecore-ipc-1"
   "/usr/include/eio-1"
   "/usr/include/libdrm"
-  "/usr/include/exynos"
   "/usr/include/ecore-wayland-1"
   "/usr/include/wayland-extension"
   "/usr/include/ecore-input-1"
@@ -84,11 +80,6 @@ SET(CMAKE_C_TARGET_INCLUDE_PATH
   "/usr/include/notification"
   "/usr/include/glib-2.0"
   "/usr/lib/glib-2.0/include"
-  "/usr/include/capi-system-info"
-  "/usr/include/factory-api"
-  "/usr/include/factory-api-internal"
-  "/usr/include/vd_kernel-interfaces"
-  "/usr/include/system-type"
   "libs"
   )
 SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
old mode 100755 (executable)
new mode 100644 (file)
index f6fe586..10e4352
@@ -59,15 +59,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o: tools/syspopu
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o: tools/syspopup/src/main.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_1)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/main.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/main.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/main.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/main.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/main.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/main.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o.requires
@@ -82,15 +82,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o: tools/syspopup/
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o: tools/syspopup/src/ui.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_2)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/ui.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/ui.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/ui.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/ui.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/ui.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/ui.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o.requires
@@ -105,15 +105,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o: tools/syspo
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o: tools/syspopup/src/widget.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_3)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/widget.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/widget.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/widget.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/widget.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/widget.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/widget.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o.requires
@@ -128,15 +128,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o: tools/s
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o: tools/syspopup/src/popup-list.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_4)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/popup-list.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/popup-list.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/popup-list.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/popup-list.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/popup-list.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/popup-list.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o.requires
@@ -151,15 +151,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o: tools/s
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o: tools/syspopup/src/appcontrol.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_5)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/appcontrol.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/appcontrol.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/appcontrol.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/appcontrol.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/appcontrol.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/appcontrol.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o.requires
@@ -174,15 +174,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o: tools
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o: tools/syspopup/src/notification.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_6)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/notification.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/notification.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/notification.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/notification.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/notification.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/notification.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o.requires
@@ -197,15 +197,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o: too
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o: tools/syspopup/src/mobile/default.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_7)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/default.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/default.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/default.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/default.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/default.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/default.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o.requires
@@ -220,15 +220,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o: tools
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o: tools/syspopup/src/mobile/toast.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_8)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/toast.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/toast.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/toast.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/toast.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/toast.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/toast.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o.requires
@@ -243,15 +243,15 @@ tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.o: tools/syspopup/src/mobile/password-enforce-change.c
        $(CMAKE_COMMAND) -E cmake_progress_report /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/CMakeFiles $(CMAKE_PROGRESS_9)
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building C object tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.o"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/password-enforce-change.c
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.o   -c /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/password-enforce-change.c
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.i: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.i"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/password-enforce-change.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.i
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -E /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/password-enforce-change.c > CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.i
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.s: cmake_force
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.s"
-       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/password-enforce-change.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.s
+       cd /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup && /usr/bin/cc  $(C_DEFINES) $(C_FLAGS) -S /home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/src/mobile/password-enforce-change.c -o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.s
 
 tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.o.requires:
 .PHONY : tools/syspopup/CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.o.requires
old mode 100755 (executable)
new mode 100644 (file)
index 04af362..0e8988c
@@ -1,8 +1,8 @@
 # CMAKE generated file: DO NOT EDIT!
 # Generated by "Unix Makefiles" Generator, CMake Version 2.8
 
-# compile C with /bin/cc
-C_FLAGS = -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed --param=ssp-buffer-size=4 -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -march=armv7ve -mlittle-endian -mfpu=neon-vfpv4 -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -g  -fPIE -g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -O2 -DNDEBUG -I/home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/./include -I/usr/include/appfw -I/usr/include/vconf -I/usr/include/appcore -I/usr/include/sensor -I/usr/include/aul -I/usr/include/capi-system-system-settings -I/usr/include/ui -I/usr/include/ui/ui -I/usr/include/elementary-1 -I/usr/include/efl-1 -I/usr/include/ecore-fb-1 -I/usr/include/ethumb-client-1 -I/usr/include/ethumb-1 -I/usr/include/edje-1 -I/usr/include/ecore-audio-1 -I/usr/include/embryo-1 -I/usr/include/ecore-imf-evas-1 -I/usr/include/ecore-evas-1 -I/usr/include/ecore-drm-1 -I/usr/include/ecore-input-evas-1 -I/usr/include/emotion-1 -I/usr/include/evas-1 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/ector-1 -I/usr/include/ecore-imf-1 -I/usr/include/eldbus-1 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/efreet-1 -I/usr/include/ecore-ipc-1 -I/usr/include/eio-1 -I/usr/include/libdrm -I/usr/include/exynos -I/usr/include/ecore-wayland-1 -I/usr/include/wayland-extension -I/usr/include/ecore-input-1 -I/usr/include/eeze-1 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/ecore-file-1 -I/usr/include/ecore-con-1 -I/usr/include/eet-1 -I/usr/include/emile-1 -I/usr/include/ecore-1 -I/usr/include/eo-1 -I/usr/include/eina-1 -I/usr/include/eina-1/eina -I/usr/include/dlog -I/usr/include/notification -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/capi-system-info -I/usr/include/factory-api -I/usr/include/factory-api-internal -I/usr/include/vd_kernel-interfaces -I/usr/include/system-type -I/home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/libs   
+# compile C with /usr/bin/cc
+C_FLAGS = -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -g  -fPIE -g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -DDPM_BUILD_mobile -O2 -DNDEBUG -I/home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/tools/syspopup/./include -I/usr/include/appfw -I/usr/include/vconf -I/usr/include/system -I/usr/include/ui -I/usr/include/ui/ui -I/usr/include/elementary-1 -I/usr/include/efl-1 -I/usr/include/ecore-fb-1 -I/usr/include/ethumb-client-1 -I/usr/include/ethumb-1 -I/usr/include/edje-1 -I/usr/include/ecore-audio-1 -I/usr/include/embryo-1 -I/usr/include/ecore-imf-evas-1 -I/usr/include/ecore-evas-1 -I/usr/include/ecore-drm-1 -I/usr/include/ecore-input-evas-1 -I/usr/include/emotion-1 -I/usr/include/evas-1 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/ector-1 -I/usr/include/ecore-imf-1 -I/usr/include/eldbus-1 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/efreet-1 -I/usr/include/ecore-ipc-1 -I/usr/include/eio-1 -I/usr/include/libdrm -I/usr/include/ecore-wayland-1 -I/usr/include/wayland-extension -I/usr/include/ecore-input-1 -I/usr/include/eeze-1 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/ecore-file-1 -I/usr/include/ecore-con-1 -I/usr/include/eet-1 -I/usr/include/emile-1 -I/usr/include/ecore-1 -I/usr/include/eo-1 -I/usr/include/eina-1 -I/usr/include/eina-1/eina -I/usr/include/dlog -I/usr/include/notification -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/home/abuild/rpmbuild/BUILD/device-policy-manager-0.0.1/libs   
 
 C_DEFINES = -DUG_WAYLAND
 
old mode 100755 (executable)
new mode 100644 (file)
index d3a7534..540e606
@@ -1 +1 @@
-/bin/cc  -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed --param=ssp-buffer-size=4 -mcpu=cortex-a15.cortex-a7 -mtune=cortex-a15.cortex-a7 -march=armv7ve -mlittle-endian -mfpu=neon-vfpv4 -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -g  -fPIE -g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -O2 -DNDEBUG    -pie CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.o  -o org.tizen.dpm-syspopup -rdynamic -lcapi-appfw-application -lcapi-appfw-app-common -lappcore-common -ltzplatform-config-2.0 -lcapi-system-system-settings -lcapi-ui-efl-util -ldlog -lelementary -lefl -leina -lpthread -leet -levas -lecore -lecore_evas -lecore_file -lecore_input -ledje -leo -lethumb_client -lemotion -lecore_imf -lecore_con -leldbus -lefreet -lefreet_mime -lefreet_trash -leio -ldl -lm -ldrm -lecore_wayland -lwayland-tbm-client -ltbm -lscreenshooter-client -ltizen-extension-client -lwayland-client -lnotification -lbundle -lglib-2.0 -lcapi-appfw-app-control -lvconf -lcapi-system-info -lcapi-base-common -lfactory-interface ../../libs/libdpm.so.0.0.1 -lklay -ldlog -lsqlite3 -lxml2 -ltzplatform-config-2.0 -lpthread -lglib-2.0 -lcapi-base-common 
+/usr/bin/cc  -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat-security -fmessage-length=0 -Wl,--as-needed --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb -g  -fPIE -g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -DDPM_BUILD_mobile -O2 -DNDEBUG    -pie CMakeFiles/org.tizen.dpm-syspopup.dir/src/main.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/ui.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/widget.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/popup-list.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/appcontrol.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/notification.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/default.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/toast.c.o CMakeFiles/org.tizen.dpm-syspopup.dir/src/mobile/password-enforce-change.c.o  -o org.tizen.dpm-syspopup -rdynamic -lcapi-appfw-application -lcapi-appfw-app-common -ltzplatform-config-2.0 -lcapi-system-system-settings -lcapi-ui-efl-util -ldlog -lelementary -lefl -leina -lpthread -leet -levas -lecore -lecore_evas -lecore_file -lecore_input -ledje -leo -lethumb_client -lemotion -lecore_imf -lecore_con -leldbus -lefreet -lefreet_mime -lefreet_trash -leio -ldl -lm -ldrm -lecore_wayland -lwayland-tbm-client -ltbm -lscreenshooter-client -ltizen-extension-client -lwayland-client -lnotification -lbundle -lglib-2.0 -lcapi-appfw-app-control -lvconf -lcapi-system-info -lcapi-base-common ../../libs/libdpm.so.0.0.1 -lklay -lpthread -lglib-2.0 -lcapi-base-common 
index 2a40b76..351cfd6 100644 (file)
@@ -1,10 +1,10 @@
-CMAKE_PROGRESS_1 = 38
-CMAKE_PROGRESS_2 = 
-CMAKE_PROGRESS_3 = 39
-CMAKE_PROGRESS_4 = 40
-CMAKE_PROGRESS_5 = 41
+CMAKE_PROGRESS_1 = 42
+CMAKE_PROGRESS_2 = 43
+CMAKE_PROGRESS_3 = 
+CMAKE_PROGRESS_4 = 44
+CMAKE_PROGRESS_5 = 45
 CMAKE_PROGRESS_6 = 
-CMAKE_PROGRESS_7 = 42
-CMAKE_PROGRESS_8 = 43
-CMAKE_PROGRESS_9 = 44
+CMAKE_PROGRESS_7 = 46
+CMAKE_PROGRESS_8 = 47
+CMAKE_PROGRESS_9 = 
 
old mode 100755 (executable)
new mode 100644 (file)
index c095dde..9aa3810
@@ -17,10 +17,7 @@ SET(CMAKE_C_TARGET_INCLUDE_PATH
   "tools/syspopup/./include"
   "/usr/include/appfw"
   "/usr/include/vconf"
-  "/usr/include/appcore"
-  "/usr/include/sensor"
-  "/usr/include/aul"
-  "/usr/include/capi-system-system-settings"
+  "/usr/include/system"
   "/usr/include/ui"
   "/usr/include/ui/ui"
   "/usr/include/elementary-1"
@@ -50,7 +47,6 @@ SET(CMAKE_C_TARGET_INCLUDE_PATH
   "/usr/include/ecore-ipc-1"
   "/usr/include/eio-1"
   "/usr/include/libdrm"
-  "/usr/include/exynos"
   "/usr/include/ecore-wayland-1"
   "/usr/include/wayland-extension"
   "/usr/include/ecore-input-1"
@@ -70,11 +66,6 @@ SET(CMAKE_C_TARGET_INCLUDE_PATH
   "/usr/include/notification"
   "/usr/include/glib-2.0"
   "/usr/lib/glib-2.0/include"
-  "/usr/include/capi-system-info"
-  "/usr/include/factory-api"
-  "/usr/include/factory-api-internal"
-  "/usr/include/vd_kernel-interfaces"
-  "/usr/include/system-type"
   "libs"
   )
 SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
index 2be4420..0220e67 100644 (file)
@@ -1,72 +1,72 @@
-CMAKE_PROGRESS_1 = 
-CMAKE_PROGRESS_2 = 45
-CMAKE_PROGRESS_3 = 46
-CMAKE_PROGRESS_4 = 47
-CMAKE_PROGRESS_5 = 
-CMAKE_PROGRESS_6 = 48
-CMAKE_PROGRESS_7 = 49
-CMAKE_PROGRESS_8 = 50
-CMAKE_PROGRESS_9 = 
-CMAKE_PROGRESS_10 = 51
-CMAKE_PROGRESS_11 = 52
-CMAKE_PROGRESS_12 = 
-CMAKE_PROGRESS_13 = 53
-CMAKE_PROGRESS_14 = 54
-CMAKE_PROGRESS_15 = 55
-CMAKE_PROGRESS_16 = 
-CMAKE_PROGRESS_17 = 56
-CMAKE_PROGRESS_18 = 57
-CMAKE_PROGRESS_19 = 58
+CMAKE_PROGRESS_1 = 48
+CMAKE_PROGRESS_2 = 49
+CMAKE_PROGRESS_3 = 50
+CMAKE_PROGRESS_4 = 
+CMAKE_PROGRESS_5 = 51
+CMAKE_PROGRESS_6 = 52
+CMAKE_PROGRESS_7 = 
+CMAKE_PROGRESS_8 = 53
+CMAKE_PROGRESS_9 = 54
+CMAKE_PROGRESS_10 = 
+CMAKE_PROGRESS_11 = 55
+CMAKE_PROGRESS_12 = 56
+CMAKE_PROGRESS_13 = 
+CMAKE_PROGRESS_14 = 57
+CMAKE_PROGRESS_15 = 58
+CMAKE_PROGRESS_16 = 59
+CMAKE_PROGRESS_17 = 
+CMAKE_PROGRESS_18 = 60
+CMAKE_PROGRESS_19 = 61
 CMAKE_PROGRESS_20 = 
-CMAKE_PROGRESS_21 = 59
-CMAKE_PROGRESS_22 = 60
-CMAKE_PROGRESS_23 = 61
-CMAKE_PROGRESS_24 = 
-CMAKE_PROGRESS_25 = 62
-CMAKE_PROGRESS_26 = 63
-CMAKE_PROGRESS_27 = 64
-CMAKE_PROGRESS_28 = 
-CMAKE_PROGRESS_29 = 65
-CMAKE_PROGRESS_30 = 66
-CMAKE_PROGRESS_31 = 67
-CMAKE_PROGRESS_32 = 
-CMAKE_PROGRESS_33 = 68
-CMAKE_PROGRESS_34 = 69
-CMAKE_PROGRESS_35 = 70
+CMAKE_PROGRESS_21 = 62
+CMAKE_PROGRESS_22 = 63
+CMAKE_PROGRESS_23 = 
+CMAKE_PROGRESS_24 = 64
+CMAKE_PROGRESS_25 = 65
+CMAKE_PROGRESS_26 = 
+CMAKE_PROGRESS_27 = 66
+CMAKE_PROGRESS_28 = 67
+CMAKE_PROGRESS_29 = 68
+CMAKE_PROGRESS_30 = 
+CMAKE_PROGRESS_31 = 69
+CMAKE_PROGRESS_32 = 70
+CMAKE_PROGRESS_33 = 
+CMAKE_PROGRESS_34 = 71
+CMAKE_PROGRESS_35 = 72
 CMAKE_PROGRESS_36 = 
-CMAKE_PROGRESS_37 = 71
-CMAKE_PROGRESS_38 = 72
-CMAKE_PROGRESS_39 = 73
+CMAKE_PROGRESS_37 = 73
+CMAKE_PROGRESS_38 = 74
+CMAKE_PROGRESS_39 = 75
 CMAKE_PROGRESS_40 = 
-CMAKE_PROGRESS_41 = 74
-CMAKE_PROGRESS_42 = 75
-CMAKE_PROGRESS_43 = 76
-CMAKE_PROGRESS_44 = 
-CMAKE_PROGRESS_45 = 77
-CMAKE_PROGRESS_46 = 78
-CMAKE_PROGRESS_47 = 79
-CMAKE_PROGRESS_48 = 
-CMAKE_PROGRESS_49 = 80
-CMAKE_PROGRESS_50 = 81
-CMAKE_PROGRESS_51 = 82
-CMAKE_PROGRESS_52 = 
-CMAKE_PROGRESS_53 = 83
-CMAKE_PROGRESS_54 = 84
-CMAKE_PROGRESS_55 = 85
+CMAKE_PROGRESS_41 = 76
+CMAKE_PROGRESS_42 = 77
+CMAKE_PROGRESS_43 = 
+CMAKE_PROGRESS_44 = 78
+CMAKE_PROGRESS_45 = 79
+CMAKE_PROGRESS_46 = 
+CMAKE_PROGRESS_47 = 80
+CMAKE_PROGRESS_48 = 81
+CMAKE_PROGRESS_49 = 
+CMAKE_PROGRESS_50 = 82
+CMAKE_PROGRESS_51 = 83
+CMAKE_PROGRESS_52 = 84
+CMAKE_PROGRESS_53 = 
+CMAKE_PROGRESS_54 = 85
+CMAKE_PROGRESS_55 = 86
 CMAKE_PROGRESS_56 = 
-CMAKE_PROGRESS_57 = 86
-CMAKE_PROGRESS_58 = 87
-CMAKE_PROGRESS_59 = 88
-CMAKE_PROGRESS_60 = 
-CMAKE_PROGRESS_61 = 89
-CMAKE_PROGRESS_62 = 90
+CMAKE_PROGRESS_57 = 87
+CMAKE_PROGRESS_58 = 88
+CMAKE_PROGRESS_59 = 
+CMAKE_PROGRESS_60 = 89
+CMAKE_PROGRESS_61 = 90
+CMAKE_PROGRESS_62 = 
 CMAKE_PROGRESS_63 = 91
-CMAKE_PROGRESS_64 = 
-CMAKE_PROGRESS_65 = 92
-CMAKE_PROGRESS_66 = 93
+CMAKE_PROGRESS_64 = 92
+CMAKE_PROGRESS_65 = 93
+CMAKE_PROGRESS_66 = 
 CMAKE_PROGRESS_67 = 94
-CMAKE_PROGRESS_68 = 
-CMAKE_PROGRESS_69 = 95
+CMAKE_PROGRESS_68 = 95
+CMAKE_PROGRESS_69 = 
 CMAKE_PROGRESS_70 = 96
 CMAKE_PROGRESS_71 = 97
 CMAKE_PROGRESS_72 = 
index d50a69e..4fdb3b0 100644 (file)
@@ -16,7 +16,7 @@
 #include <dpm/application.h>
 #include <dpm/security.h>
 #   ifdef DPM_BUILD_TV
-#  include <dpm/firewall.h>
+#  includeadf<dpm/firewall.h>
 #   endif
 #endif