From: Dariusz Michaluk Date: Thu, 6 Apr 2023 09:19:48 +0000 (+0200) Subject: Remove perf dependency X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Ftest%2Fsecurity-tests.git;a=commitdiff_plain;h=40f3f0db5340ac29e874be4022b13c0c500ff6aa Remove perf dependency perf is not provided on tizen.org Change-Id: I1402c2b6a4f5f6d5cf9b180258bed49acb9b062a --- diff --git a/packaging/security-tests.manifest b/packaging/security-tests.manifest index 9b87770..0374731 100644 --- a/packaging/security-tests.manifest +++ b/packaging/security-tests.manifest @@ -1,7 +1,5 @@ - - diff --git a/packaging/security-tests.spec b/packaging/security-tests.spec index 249a34e..99ac084 100644 --- a/packaging/security-tests.spec +++ b/packaging/security-tests.spec @@ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 954a51a..9a6f938 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 index 5d373ce..0000000 --- a/src/test-performance-check.sh +++ /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" - -