Remove perf dependency 07/291007/1
authorDariusz Michaluk <d.michaluk@samsung.com>
Thu, 6 Apr 2023 09:19:48 +0000 (11:19 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Thu, 6 Apr 2023 09:24:42 +0000 (11:24 +0200)
perf is not provided on tizen.org

Change-Id: I1402c2b6a4f5f6d5cf9b180258bed49acb9b062a

packaging/security-tests.manifest
packaging/security-tests.spec
src/CMakeLists.txt
src/test-performance-check.sh [deleted file]

index 9b87770..0374731 100644 (file)
@@ -1,7 +1,5 @@
 <manifest>
     <assign>
-        <filesystem path="/usr/bin/test-performance-check.sh" exec_label="_" />
-
         <filesystem path="/usr/bin/security-manager-tests" exec_label="System::Privileged" />
         <filesystem path="/usr/bin/cynara-tests" exec_label="_" />
         <filesystem path="/usr/bin/ckm-tests" exec_label="User" />
index 249a34e..99ac084 100644 (file)
@@ -36,7 +36,6 @@ BuildRequires: pkgconfig(libgum) >= 1.0.5
 BuildRequires: pkgconfig(security-privilege-manager)
 BuildRequires: pkgconfig(libsystemd)
 BuildRequires: openssl1.1
-Requires: perf
 Requires: gdb
 Requires: diffutils
 Requires: iproute2
@@ -99,7 +98,6 @@ echo "security-tests postinst done ..."
 %defattr(-, root, root, -)
 /usr/bin/security-tests.sh
 /usr/bin/security-tests-all.sh
-/usr/bin/test-performance-check.sh
 /usr/bin/setup-nether-tests-nns.sh
 /usr/bin/teardown-nether-tests-nns.sh
 /usr/bin/setup-nether-tests-dns.sh
index 954a51a..9a6f938 100644 (file)
@@ -78,18 +78,6 @@ INSTALL(FILES ${PROJECT_SOURCE_DIR}/src/security-tests-all.sh
                 WORLD_EXECUTE
     )
 
-INSTALL(FILES
-    ${PROJECT_SOURCE_DIR}/src/test-performance-check.sh
-    DESTINATION bin
-    PERMISSIONS OWNER_READ
-                OWNER_WRITE
-                OWNER_EXECUTE
-                GROUP_READ
-                GROUP_EXECUTE
-                WORLD_READ
-                WORLD_EXECUTE
-    )
-
 IF(BUILD_CKM OR BUILD_SM OR BUILD_CYNARA OR BUILD_WEB)
     ADD_SUBDIRECTORY(common)
 ENDIF(BUILD_CKM OR BUILD_SM OR BUILD_CYNARA OR BUILD_WEB)
diff --git a/src/test-performance-check.sh b/src/test-performance-check.sh
deleted file mode 100644 (file)
index 5d373ce..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/sh
-
-NOF_TRIES=3
-i=$NOF_TRIES
-ERR_FILE=error.log
-RESULTS_FILE=results.log
-
-SUM=0
-
-black="\033[0;30m";
-red="\033[0;31m";
-green="\033[0;32m";
-brown="\033[0;33m";
-blue="\033[0;34m";
-purple="\033[0;35m";
-grey="\033[1;30m";
-yellow="\033[1;33m";
-default="\033[0m";
-
-
-function echo_as_percent () {
-full=$(( $1 / 100 ))
-rest_full=$(( $1 % 100 ))
-dec=$(($rest_full / 10 ))
-rest_dec=$(($rest_full % 10 ))
-echo "$full.$dec$rest_dec%"
-echo "$full.$dec$rest_dec%" >> $RESULTS_FILE
-
-}
-
-date >> $RESULTS_FILE
-date >> $ERR_FILE
-while [ $((i--)) -gt 0 ]
-do
-echo -e "$blue==============test no $i=============$default"
-
-perf record -a -g & > /dev/null 2> /dev/null
-sleep 1
-security-tests-all.sh > /dev/null 2> /dev/null
-pkill -SIGINT perf
-
-sleep 2
-
-echo "perf results:"
-perf report -U -s symbol -gflat,1,caller 2>> $ERR_FILE | grep smk
-OUTPUT=$(perf report -U -s symbol -gflat,1,caller 2>> $ERR_FILE | grep smk | sed "s:%.*$::g;s:^[ \t]::g;s:[^0-9]::g;s:^0::g;s:^0::g;s:$:+:g;$ s:+::" | tr -d "\n")
-
-echo -e "$blue sum:"
-echo_as_percent $(($OUTPUT))
-echo -e "$default"
-
-SUM=$(($SUM + $OUTPUT))
-
-done
-echo -e "$blue==============done============="
-OUTPUT=$(($SUM/3))
-echo "average:"
-echo "average:" >> $RESULTS_FILE
-echo_as_percent $OUTPUT
-echo -e "$default"
-
-