Bug 1252908 - [beetmover] refresh AV database on every run r=rail a=testing DONTBUILD

MozReview-Commit-ID: Ceo1dF3tyVS
This commit is contained in:
Kim Moir 2016-03-02 16:36:31 -05:00
parent 4107b6c7ba
commit 8c4e89160d
3 changed files with 10 additions and 0 deletions

View File

@ -16,4 +16,6 @@ RUN apt-get -q update \
wget \
&& apt-get clean
COPY requirements.txt /tmp/
RUN pip install -r /tmp/requirements.txt
RUN freshclam --verbose

View File

@ -0,0 +1,2 @@
sh
redo

View File

@ -15,6 +15,8 @@ import pprint
import re
from os import listdir
from os.path import isfile, join
import sh
import redo
sys.path.insert(1, os.path.dirname(os.path.dirname(sys.path[0])))
from mozharness.base.log import FATAL
@ -309,6 +311,10 @@ class BeetMover(BaseScript, VirtualenvMixin, object):
def _scan_files(self):
"""Scan the files we've collected. We do the download and scan concurrently to make
it easier to have a coherent log afterwards. Uses the venv python."""
self.info("Refreshing clamav db...")
redo.retry(lambda:
sh.freshclam("--stdout", "--verbose", _timeout=300, _err_to_out=True))
self.info("Done.")
external_tools_path = os.path.join(
os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__))), 'external_tools')
self.run_command([self.query_python_path(), os.path.join(external_tools_path,'extract_and_run_command.py'),