commit | 899f13f9936df9c3cd83e8452bea1be4989c62ff | [log] [tgz] |
---|---|---|
author | Paul Hobbs <phobbs@google.com> | Tue Nov 28 23:29:08 2017 |
committer | chrome-bot <chrome-bot@chromium.org> | Sat Jan 13 06:37:44 2018 |
tree | 3b21d470f6af0398276702674579705555bfabe5 | |
parent | 07f0089adebff56a993c89ee9900d46f179adda8 [diff] |
Add more imports required for tests Run pytest within the virtualenv with "pipenv run pytest". Also, ignore glint errors if the binary doesn't exist. External developers or Mac OS X developers don't have glint installed. TEST=Unit tests pass with the proper pytest binary now. BUG=chromium:789287 Change-Id: I06506811a60c3446f1d320ac83b7b77bdce1085e Reviewed-on: https://chromium-review.googlesource.com/794902 Commit-Ready: Paul Hobbs <phobbs@google.com> Tested-by: Paul Hobbs <phobbs@google.com> Reviewed-by: Xixuan Wu <xixuan@chromium.org>
https://chromium.googlesource.com/chromiumos/infra/bad_cl_detector
A system to detect if a given build failure is caused by bad CL.
The virtualenv for this project is managed with pipenv. If you don't already have pipenv installed, you can install it with “pip install pipenv”.
Then run:
deactivate # make sure you are not already in a virtualenv pipenv --two install protoc -I=lib/protos --python_out=lib/protos
You can fetch cidb credentials with “cros cidbcreds”. You will need to pass in the db credentials' path to the script.
Downloading training data, training a model and cross validating is done by one script:
pipenv run python lib/bad_cl_detector_driver.py --cred-dir=$CRED_DIR
Or, you can enter a virtualenv shell with “pipenv shell”, and then just run python lib/.
Currently this requires word2vec and word2int files to work. Making this self-contained is a work in progress.
Tests are run with pytest:
pipenv run pytest