From: Christian Lanig <clanig@suse.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] Add wanted output to shell lib test case
Date: Tue, 28 Aug 2018 13:18:44 +0200 [thread overview]
Message-ID: <20180828111844.20152-2-clanig@suse.com> (raw)
In-Reply-To: <20180828111844.20152-1-clanig@suse.com>
---
Please do not merge!
I would like to get some feedback for this one and the previous patch. It is
based on Petr Vorel's [RFC,v3,2/2] lib: Add tests from May 22nd 2018 with the
message ID 20180522193430.20117-2-pvorel@suse.cz.
These two patches transfer Petr's test cases in a separate folder and a shell
script loops over all files as suggested in the replies to the initial message.
The output is verified against a comment section in the test case file itself.
This section is started with the line "# output:" and it is expected that it
goes to the end of the document without interception.
I have run the script with various Shell implementations to make sure it's
portable.
Limitations:
The script is currently unable to test e.g. whether TFAIL is displayed with red
color.
So far I have only added the correct output line in a single test case file so
just one test is currently passing.
Before proceeding I would like to know whether this is a good way to go.
lib/newlib_tests/shell/test.TST_TEST.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/newlib_tests/shell/test.TST_TEST.sh b/lib/newlib_tests/shell/test.TST_TEST.sh
index 42f14151b..aa4e20377 100755
--- a/lib/newlib_tests/shell/test.TST_TEST.sh
+++ b/lib/newlib_tests/shell/test.TST_TEST.sh
@@ -21,5 +21,12 @@ do_test()
}
tst_run
+# output:
# test 1 TINFO: Test 1 passed with no data ('')
# test 1 TPASS: true returned 0
+#
+# Summary:
+# passed 1
+# failed 0
+# skipped 0
+# warnings 0
--
2.16.4
next prev parent reply other threads:[~2018-08-28 11:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 19:34 [LTP] [RFC PATCH v3 1/2] tst_test.sh: Add TST_TEST_DATA and TST_TEST_DATA_IFS Petr Vorel
2018-05-22 19:34 ` [LTP] [RFC PATCH v3 2/2] lib: Add tests Petr Vorel
2018-05-24 13:46 ` Cyril Hrubis
2018-05-24 14:00 ` Petr Vorel
2018-08-28 11:18 ` [LTP] [PATCH 1/2] Make shell lib tests standalone Christian Lanig
2018-08-28 11:18 ` Christian Lanig [this message]
2018-08-29 17:24 ` Petr Vorel
2018-08-29 17:30 ` Petr Vorel
2018-08-31 15:24 ` [LTP] [RFC PATCH 0/1] Add automated tests for shell lib Christian Lanig
2018-08-31 15:24 ` [LTP] [RFC PATCH 1/1] " Christian Lanig
2018-10-03 9:51 ` Cyril Hrubis
2018-10-03 10:46 ` Petr Vorel
2018-10-03 11:32 ` Petr Vorel
2019-08-22 19:12 ` [LTP] [RFC PATCH v2 0/1] " Christian Lanig
2019-08-22 19:12 ` [LTP] [RFC PATCH v2 1/1] " Christian Lanig
2019-09-19 16:41 ` Petr Vorel
2019-09-30 18:27 ` Christian Lanig
2019-09-20 14:21 ` Clemens Famulla-Conrad
2019-09-19 14:26 ` [LTP] [RFC PATCH v2 0/1] " Petr Vorel
2018-08-31 11:46 ` [LTP] [PATCH 1/2] Make shell lib tests standalone Cyril Hrubis
2018-05-24 13:41 ` [LTP] [RFC PATCH v3 1/2] tst_test.sh: Add TST_TEST_DATA and TST_TEST_DATA_IFS Cyril Hrubis
2018-05-24 13:53 ` Petr Vorel
2018-05-24 14:00 ` Cyril Hrubis
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=20180828111844.20152-2-clanig@suse.com \
--to=clanig@suse.com \
--cc=ltp@lists.linux.it \
/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