Francois Gouget : winetest: Run build-index and/or build-errors as needed.

Alexandre Julliard julliard at winehq.org
Wed May 17 11:56:25 CDT 2017


Module: tools
Branch: master
Commit: f7b0a4cc7e3a7f48a4f987ef4907ac753f5ff692
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=f7b0a4cc7e3a7f48a4f987ef4907ac753f5ff692

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed May 17 11:27:08 2017 +0200

winetest: Run build-index and/or build-errors as needed.

If a report has been accepted then run both gather and build-index to
refresh the index files.
If a report has been rejected run build-errors to update errors.html.
And if there is nothing new both can be skipped.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 winetest/winetest.cron | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/winetest/winetest.cron b/winetest/winetest.cron
index 45581e2..6b59f4f 100755
--- a/winetest/winetest.cron
+++ b/winetest/winetest.cron
@@ -39,15 +39,29 @@ if [ ! -f $lock ]; then
     touch $lock
     cd $workdir
 
-    while $tools/dissect; [ $? -eq 0 -o $? -eq 1 ]; do true; done
-    updated=0
-    while $tools/gather; do updated=1; done
-    if [ $updated -eq 1 -o ! -d data/tests -o ! -d old-data ]
+    refresh_index=""
+    refresh_errors=""
+    while true
+    do
+        $tools/dissect
+        case $? in
+            0) refresh_index=1 ;;
+            1) refresh_errors=1 ;;
+            *) break ;;
+        esac
+    done
+    if [ -n "$refresh_index" ]
+    then
+        while $tools/gather; do true; done
+    fi
+    if [ ! -d data/tests -o ! -d old-data ]
     then
         mkdir -p data/tests old-data
-        $tools/build-index
-        $tools/build-errors
+        refresh_index=1
+        refresh_errors=1
     fi
+    [ -n "$refresh_index" ] && $tools/build-index
+    [ -n "$refresh_errors" ] && $tools/build-errors
 
     # archive old results
     (




More information about the wine-cvs mailing list