diff mbox

[nft,1/2] tests/shell/run-tests.sh: execute tests in sorted order

Message ID 146297037318.18781.4519893770358950261.stgit@nfdev2.cica.es
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Arturo Borrero May 11, 2016, 12:39 p.m. UTC
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(-)


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Pablo Neira Ayuso May 13, 2016, 9:40 a.m. UTC | #1
On Wed, May 11, 2016 at 02:39:33PM +0200, Arturo Borrero Gonzalez wrote:
> Let's sort tests files before iterating over them.
> 
> Put the find string in a separated function so it's more readable.

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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