From patchwork Sat Dec 29 01:35:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 11581 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 943CE44DE28 for ; Sat, 29 Dec 2018 03:36:24 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 493D868A583; Sat, 29 Dec 2018 03:36:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe08-2.mx.upcmail.net (vie01a-dmta-pe08-2.mx.upcmail.net [84.116.36.21]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DAF6168A6BE for ; Sat, 29 Dec 2018 03:36:15 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1gd3Y6-0008AV-0i for ffmpeg-devel@ffmpeg.org; Sat, 29 Dec 2018 02:36:22 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id d3X8gSUjn2WSsd3X8geKg0; Sat, 29 Dec 2018 02:35:22 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.41.20 X-CNFS-Analysis: v=2.3 cv=E7kcWpVl c=1 sm=1 tr=0 a=I1eytVlZLDX1BM2VTtTtSw==:117 a=I1eytVlZLDX1BM2VTtTtSw==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=IhfmrU5DAAAA:8 a=Mn5wlua-NbjFF24oKbcA:9 a=QGKmA-w0eHZdatfI:21 a=bHiHeQ6IfvcAfRnK:21 a=QUmUJGn8_LQjycELRnGZ:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 29 Dec 2018 02:35:18 +0100 Message-Id: <20181229013519.8910-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CMAE-Envelope: MS4wfPJ78fEak4oUK7hCXeHcxzhn741MFRflGpp8SiWQFdvQamxFKUpqhhf69KZmKjKU7aBUPb3UViBKyfKG/pJNuE1z28Cg8AwJJ7Tg4O83EX+wS89MSpOp Owl2MRwT++QPcCxeE+JqQnum20xWM3FGUskxAzz1NGG8jtnUSB7mEYTi Subject: [FFmpeg-devel] [PATCH 1/2] tools/target_dec_fate.sh: print some statistics X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- tools/target_dec_fate.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/target_dec_fate.sh b/tools/target_dec_fate.sh index 1fdfdcaaea..5e683676d1 100755 --- a/tools/target_dec_fate.sh +++ b/tools/target_dec_fate.sh @@ -43,6 +43,9 @@ test ! -d "$1" && echo $1 is not an accessable directory && show_help test ! -f target_dec_fate.sh && echo $0 Must be run from its location && show_help grep 'CONFIG_OSSFUZZ 0' ../config.h && echo not configured for ossfuzz && show_help +CACHED=0 +DOWNLOADED=0 +FAILED2DOWNLOAD=0 #Download testcases while read -r LINE; do ISSUE_NUM=`echo $LINE | sed 's#/.*##'` @@ -50,10 +53,12 @@ while read -r LINE; do FILE=`echo $LINE | sed 's# .*##'` if test -f "$1/$FILE" ; then echo exists $FILE + CACHED=$((CACHED+1)) else echo downloading $FILE mkdir -p "$1/$ISSUE_NUM" - wget -O "$1/$FILE" "https://oss-fuzz.com/download?testcase_id=$FILE_ID" || rm "$1/$FILE" + wget -O "$1/$FILE" "https://oss-fuzz.com/download?testcase_id=$FILE_ID" || ( rm "$1/$FILE" ; FAILED2DOWNLOAD=$((FAILED2DOWNLOAD+1)) ) + DOWNLOADED=$((DOWNLOADED+1)) fi done < "$LIST" @@ -75,4 +80,4 @@ while read -r LINE; do tools/$TOOL_ID $1/$FILE done < "tools/$LIST" -echo OK +echo OK cached:$CACHED downloaded:$DOWNLOADED failed to download:$FAILED2DOWNLOAD