From 799e26d5bdf6b74ab615644e0cd291de6e352989 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Mon, 13 Mar 2017 06:39:08 +0000 Subject: make test: add scripts for easy test looping Allows easy running of test(s) in a loop with configurable action (e.g. git pull) run between test runs and possible email notification on failure. Usage: test-loop.sh [-p ] [-m ] -- Example: Run 'make test-debug' in a loop until a failure is encountered, upon which an email is fired to ksekera@cisco.com. In between test runs, update the workspace using via 'git pull' and if anything changed, perform 'git clean' before running another 'make test-debug': test/scripts/test-loop.sh -p test/scripts/git_pull_or_clean.sh \ -m ksekera@cisco.com -- test-debug Change-Id: I114321c6c152d2c7e181e915fc8c51aab1ff3693 Signed-off-by: Klement Sekera --- test/scripts/git_pull_or_clean.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 test/scripts/git_pull_or_clean.sh (limited to 'test/scripts/git_pull_or_clean.sh') diff --git a/test/scripts/git_pull_or_clean.sh b/test/scripts/git_pull_or_clean.sh new file mode 100755 index 00000000000..489091f9b82 --- /dev/null +++ b/test/scripts/git_pull_or_clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +git pull | grep -q -v 'Already up-to-date.' || git clean -dfX */ -- cgit 1.2.3-korg