[dpdk-ci] [PATCH] tools: slugify report label

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Feb 20 15:48:09 CET 2017


The report label will be used in some URLs with patchwork 2.0.
That's why the spaces are automatically replaced by a dash.

Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
---
 tools/send-patch-report.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/send-patch-report.sh b/tools/send-patch-report.sh
index 7f78316..c6113ad 100755
--- a/tools/send-patch-report.sh
+++ b/tools/send-patch-report.sh
@@ -43,7 +43,7 @@ print_usage () {
 	        -m msgid    id of the patch email
 	        -p pwid     id of the patch in patchwork (retrieved from msgid otherwise)
 	        -o listid   origin of the patch
-	        -l label    title of the test
+			-l label    title of the test (slug formatted)
 	        -s status   one of these test results: SUCCESS, WARNING, FAILURE
 	        -d desc     few words to better describe the status
 	        -h          this help
@@ -69,7 +69,7 @@ while getopts d:f:hl:m:o:p:s:t: arg ; do
 		m ) msgid=$OPTARG ;;
 		p ) pwid=$OPTARG ;;
 		o ) listid=$OPTARG ;;
-		l ) label=$OPTARG ;;
+		l ) label=$(echo $OPTARG | sed 's,[[:space:]]\+,-,g') ;;
 		s ) status=$OPTARG ;;
 		d ) desc=$OPTARG ;;
 		h ) print_usage ; exit 0 ;;
-- 
2.7.0



More information about the ci mailing list