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

MozReview-Commit-ID: Ceo1dF3tyVS

--HG--
extra : source : 96983cc46be3cb0900b1e63551dcbf62eac5459f
This commit is contained in:
Kim Moir 2016-03-02 16:36:31 -05:00
Родитель 933e726105
Коммит 3005da2dd6
3 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -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

Просмотреть файл

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

Просмотреть файл

@ -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'),