MDL-69273 travis: Move exttests check to after_script
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 14 Jul 2020 23:36:02 +0000 (07:36 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 17 Aug 2020 23:40:15 +0000 (07:40 +0800)
The result of the final command `script` phase determines the build
result.

The cleanup belongs in the `after_script` phase.

.travis.yml

index d751251..bf4ed4c 100644 (file)
@@ -254,8 +254,6 @@ script:
       if [ "$TASK" = 'PHPUNIT' ];
       then
         vendor/bin/phpunit --fail-on-risky --disallow-test-output --verbose;
-        EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
-        echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
       fi
 
     - >
@@ -292,3 +290,11 @@ script:
           exit 1 ;
         fi
       fi
+
+after_script:
+    - >
+      if [ "$TASK" = 'PHPUNIT' ];
+      then
+        EXTTESTS_HITS=$(docker logs exttests 2>&1 | grep -Fv -e 'AH00558' -e '[pid 1]' | wc -l)
+        echo -e "\nTest local resources number of hits: ${EXTTESTS_HITS}.\n"
+      fi