From 023c838039a12c38c1f0b70ddfe1a6d24de08374 Mon Sep 17 00:00:00 2001 From: John Bieren Date: Aug 08 2018 13:49:59 +0000 Subject: Remove old logs first, fail if failed --- diff --git a/misc/ltp/test_local.yml b/misc/ltp/test_local.yml index 3cf71c7..7736b5b 100644 --- a/misc/ltp/test_local.yml +++ b/misc/ltp/test_local.yml @@ -40,6 +40,11 @@ git: repo: http://pagure.io/ktests dest: ./ktests + + - name: Clear existing logs + file: + path: "{{ltplogs}}" + state: absent - name: Run autotools for ltp make: @@ -69,3 +74,9 @@ - block: - name: Run ltp shell: ./ktests/misc/ltp/runtest.sh {{ltpdir}} + + always: + - name: Fail play if testing failed + shell: "egrep '^Total Failures' {{ltplogs}}/ltp.log | awk '{print $3}'" + register: number_failures + failed_when: number_failures.stdout != 0