netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nft PATCH 1/2] tests/shell/run-tests.sh: execute tests in sorted order
@ 2016-05-11 12:39 Arturo Borrero Gonzalez
  2016-05-11 12:39 ` [nft PATCH 2/2] tests/shell/run-tests.sh: print hint about testcase being executed Arturo Borrero Gonzalez
  2016-05-13  9:40 ` [nft PATCH 1/2] tests/shell/run-tests.sh: execute tests in sorted order Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Arturo Borrero Gonzalez @ 2016-05-11 12:39 UTC (permalink / raw)
  To: netfilter-devel

Let's sort tests files before iterating over them.

Put the find string in a separated function so it's more readable.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 tests/shell/run-tests.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index 0bbb136..057f11e 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -61,10 +61,15 @@ kernel_cleanup() {
 	nf_tables_ipv4 nf_tables_ipv6 nf_tables
 }
 
+find_tests() {
+	${FIND} ${TESTDIR} -executable -regex \
+		.*${RETURNCODE_SEPARATOR}[0-9]+ | sort
+}
+
 echo ""
 ok=0
 failed=0
-for testfile in $(${FIND} ${TESTDIR} -executable -regex .*${RETURNCODE_SEPARATOR}[0-9]+)
+for testfile in $(find_tests)
 do
 	kernel_cleanup
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-13  9:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11 12:39 [nft PATCH 1/2] tests/shell/run-tests.sh: execute tests in sorted order Arturo Borrero Gonzalez
2016-05-11 12:39 ` [nft PATCH 2/2] tests/shell/run-tests.sh: print hint about testcase being executed Arturo Borrero Gonzalez
2016-05-13  9:40   ` Pablo Neira Ayuso
2016-05-13  9:40 ` [nft PATCH 1/2] tests/shell/run-tests.sh: execute tests in sorted order Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).