Add Infra-PerCommit-Race bot

Bug: skia:7206
Change-Id: I1c1128076046820670007990b34d950a6857142a
Reviewed-on: https://skia-review.googlesource.com/62104
Reviewed-by: Eric Boren <borenet@google.com>
13 files changed
tree: 173496abd17639f80f3589f89ee039d2a931cb1d
  1. .gitattributes
  2. .gitignore
  3. DATASTORE.md
  4. DEPS
  5. LICENSE
  6. Makefile
  7. PRESUBMIT.py
  8. README.md
  9. STYLEGUIDE.md
  10. android_ingest/
  11. android_stats/
  12. appengine_scripts/
  13. autoroll/
  14. bash/
  15. blamer/
  16. chromeextensions/
  17. client_secret_swarming.json
  18. codereview.settings
  19. comments/
  20. contest/
  21. cq_watcher/
  22. ct/
  23. ct_pixel_diff/
  24. datahopper/
  25. debugger/
  26. doc/
  27. ds/
  28. fiddle/
  29. flakiness/
  30. fuzzer/
  31. get_service_account/
  32. go/
  33. golden/
  34. grafana/
  35. infra/
  36. launch.md
  37. logmetrics/
  38. misc/
  39. monitoring/
  40. pdfium/
  41. perdiff/
  42. perf/
  43. power/
  44. prober/
  45. prometheus/
  46. proxy/
  47. pulld/
  48. push/
  49. res/
  50. run_unittests
  51. run_unittests.go
  52. scripts/
  53. skfe/
  54. skolo/
  55. status/
  56. statusv2/
  57. swarming_logger/
  58. task_scheduler/
  59. tools/
  60. tracedb/
  61. webtools/
  62. whitespace.txt
  63. whitespace2.txt
README.md

Skia-Buildbot Repository

This repo contains infrastructure code for Skia.

Getting the Source Code

The main source code repository is a Git repository hosted at https://skia.googlesource.com/buildbot. Although it is possible to check out this repository directly with git clone or using gclient fetch, it is preferred to use go get so that the code is arranged correctly for Go. If this is your first time working on Go code, read about the GOPATH environment variable. Make sure that $GOPATH/bin comes before /usr/bin in your PATH. If you have GOPATH set, run:

$ go get -u -t go.skia.org/infra/...

This fetches the repository into your $GOPATH directory along with all the Go dependencies. Note: go.skia.org is a custom import path and will only work if used like the examples here.

Install Node.js (not as root) and add the bin dir to your path. Optionally run npm install npm -g, as suggested by the npm getting started doc.

Install other dependencies:

$ sudo apt-get install python-django
$ go get github.com/kisielk/errcheck \
  golang.org/x/tools/cmd/goimports \
  go.chromium.org/luci/client/cmd/isolate
$ npm install -g polylint bower

Build from GOPATH:

$ cd $GOPATH/src/go.skia.org/infra/
$ make all

Database Setup for Testing

Tests which use the database package's testutils require you to have a MySQL instance running with a database named “sk_testing” and users called “readwrite” and “test_root” with appropriate permissions for sk_testing. The ‘setup_test_db’ script in ‘go/database’ is included for convenience in setting up this test database and user.

Go tests require a local installation of MySQL. For a Debian based distro:

$ sudo apt-get install mysql-client mysql-server

Leave the root password blank.

Then, to set up local versions of the production databases:

$ cd $GOPATH/src/go.skia.org/infra/go/database
$ ./setup_test_db

Running unit tests

Install Cloud SDK.

The installed python-django version must be >= 1.7. Run the following to update:

$ sudo pip install Django --upgrade

Use this command to run the presubmit tests:

$ ./run_unittests --small