Linux Perf Users
 help / color / mirror / Atom feed
From: Michael Petlan <mpetlan@redhat.com>
To: "linux-perf-users@vger.kernel.org" <linux-perf-users@vger.kernel.org>
Subject: [PATCH 2/3] tools/perf/testsuite: Adding a skeleton for future testcases
Date: Thu, 22 Oct 2015 01:08:57 +0200	[thread overview]
Message-ID: <1445468937.12960.119.camel@Rudolf-RHEL-7> (raw)


The skeleton should be a specimen for future testcases.
---
 tools/perf/testsuite/base_skeleton/cleanup.sh  | 16 +++++++++++
 tools/perf/testsuite/base_skeleton/settings.sh | 10 +++++++
 tools/perf/testsuite/base_skeleton/setup.sh    | 16 +++++++++++
 tools/perf/testsuite/base_skeleton/test_01.sh  | 40 ++++++++++++++++++++++++++
 4 files changed, 82 insertions(+)
 create mode 100755 tools/perf/testsuite/base_skeleton/cleanup.sh
 create mode 100644 tools/perf/testsuite/base_skeleton/settings.sh
 create mode 100755 tools/perf/testsuite/base_skeleton/setup.sh
 create mode 100755 tools/perf/testsuite/base_skeleton/test_01.sh

diff --git a/tools/perf/testsuite/base_skeleton/cleanup.sh b/tools/perf/testsuite/base_skeleton/cleanup.sh
new file mode 100755
index 0000000..21ca683
--- /dev/null
+++ b/tools/perf/testsuite/base_skeleton/cleanup.sh
@@ -0,0 +1,16 @@
+#
+#	cleanup.sh of SKELETON test
+#	Author: Michael Petlan <mpetlan@redhat.com>
+#
+#	Description:
+#		FIXME
+#
+#
+
+. ../common/settings.sh
+. ../common/patterns.sh
+. ../common/init.sh
+. ./settings.sh
+
+print_overall_results 0
+exit 0
diff --git a/tools/perf/testsuite/base_skeleton/settings.sh b/tools/perf/testsuite/base_skeleton/settings.sh
new file mode 100644
index 0000000..6bbffc0
--- /dev/null
+++ b/tools/perf/testsuite/base_skeleton/settings.sh
@@ -0,0 +1,10 @@
+#
+#	settings.sh of SKELETON test
+#	Author: Michael Petlan <mpetlan@redhat.com>
+#
+#	Description:
+#		FIXME
+#
+#
+
+export TEST_NAME="SKELETON"
diff --git a/tools/perf/testsuite/base_skeleton/setup.sh b/tools/perf/testsuite/base_skeleton/setup.sh
new file mode 100755
index 0000000..41fbbf5
--- /dev/null
+++ b/tools/perf/testsuite/base_skeleton/setup.sh
@@ -0,0 +1,16 @@
+#
+#	setup.sh of SKELETON test
+#	Author: Michael Petlan <mpetlan@redhat.com>
+#
+#	Description:
+#		FIXME
+#
+#
+
+. ../common/settings.sh
+. ../common/patterns.sh
+. ../common/init.sh
+. ./settings.sh
+
+print_overall_results 0
+exit 0
diff --git a/tools/perf/testsuite/base_skeleton/test_01.sh b/tools/perf/testsuite/base_skeleton/test_01.sh
new file mode 100755
index 0000000..34aa973
--- /dev/null
+++ b/tools/perf/testsuite/base_skeleton/test_01.sh
@@ -0,0 +1,40 @@
+#
+#	test_01 of SKELETON test
+#	Author: Michael Petlan <mpetlan@redhat.com>
+#
+#	Description:
+#		FIXME
+#
+#
+
+. ../common/settings.sh
+. ../common/patterns.sh
+. ../common/init.sh
+. ./settings.sh
+
+THIS_TEST_NAME=`basename $0`
+TEST_RESULT=0
+
+
+# testcases
+
+# format:
+# print_results $PERF_COMMAND_EXIT_CODE $REGEXP_PARSER_EXIT_CODE "comment (subtest name, etc...)"
+
+print_results 0 0 "some	 passing test 01"
+(( TEST_RESULT += $? ))
+
+print_results 0 0 "some passing test 02"
+(( TEST_RESULT += $? ))
+
+print_results 1 0 "some test failing on perf command"
+(( TEST_RESULT += $? ))
+
+print_results 0 1 "some test failing on parsing output"
+(( TEST_RESULT += $? ))
+
+print_results 1 1 "some completely failing test"
+(( TEST_RESULT += $? ))
+
+# print results
+print_overall_results 3
-- 
1.8.3.1

                 reply	other threads:[~2015-10-21 23:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445468937.12960.119.camel@Rudolf-RHEL-7 \
    --to=mpetlan@redhat.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox