Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • coverity
  • master
  • sminskyprimu/blake3
  • sotk/consolidate-leases-and-jobs/p2-write-only-leases
  • sotk/consolidate-leases-and-jobs/p3-drop-leases-table
  • sotk/features/lease-audit-table
  • sotk/logstream-testing
  • zchen723/skip-scheduler-metrics
  • 0.0.10
  • 0.0.11
  • 0.0.12
  • 0.0.13
  • 0.0.14
  • 0.0.16
  • 0.0.17
  • 0.0.19
  • 0.0.2
  • 0.0.20
  • 0.0.21
  • 0.0.23
  • 0.0.25
  • 0.0.26
  • 0.0.27
  • 0.0.28
  • 0.0.29
  • 0.0.3
  • 0.0.30
  • 0.0.31
  • 0.0.32
  • 0.0.33
  • 0.0.34
  • 0.0.35
  • 0.0.36
  • 0.0.37
  • 0.0.38
  • 0.0.39
  • 0.0.4
  • 0.0.40
  • 0.0.41
  • 0.0.42
  • 0.0.43
  • 0.0.44
  • 0.0.45
  • 0.0.46
  • 0.0.47
  • 0.0.48
  • 0.0.49
  • 0.0.5
  • 0.0.50
  • 0.0.51
  • 0.0.52
  • 0.0.53
  • 0.0.54
  • 0.0.55
  • 0.0.56
  • 0.0.57
  • 0.0.58
  • 0.0.59
  • 0.0.6
  • 0.0.60
  • 0.0.61
  • 0.0.62
  • 0.0.63
  • 0.0.64
  • 0.0.65
  • 0.0.66
  • 0.0.67
  • 0.0.68
  • 0.0.69
  • 0.0.7
  • 0.0.70
  • 0.0.71
  • 0.0.72
  • 0.0.73
  • 0.0.74
  • 0.0.75
  • 0.0.76
  • 0.0.78
  • 0.0.79
  • 0.0.8
  • 0.0.80
  • 0.0.81
  • 0.0.82
  • 0.0.83
  • 0.0.84
  • 0.0.85
  • 0.0.86
  • 0.0.87
  • 0.0.88
  • 0.0.89
  • 0.0.9
  • 0.0.90
  • 0.0.91
  • 0.0.92
  • 0.0.93
  • 0.0.94
  • 0.0.95
  • 0.0.96
  • 0.0.97
  • 0.0.98
  • 0.1.0
  • 0.1.1
  • 0.1.10
  • 0.1.11
  • 0.1.12
  • 0.1.13
  • 0.1.14
  • 0.1.15
108 results

Target

Select target project
  • edbaunton/buildgrid
  • BuildGrid/buildgrid
  • bloomberg/buildgrid
  • devcurmudgeon/buildgrid
  • mhadjimichael/buildgrid
  • jmacarthur/buildgrid
  • rkothur/buildgrid
  • valentindavid/buildgrid
  • jjardon/buildgrid
  • RichKen/buildgrid
  • jbonney/buildgrid
  • onsha_alexander/buildgrid
  • santigl/buildgrid
  • mostynb/buildgrid
  • hoffbrinkle/buildgrid
  • Malinskiy/buildgrid
  • coldtom/buildgrid
  • azeemb_a/buildgrid
  • pointswaves/buildgrid
  • BenjaminSchubert/buildgrid
  • michaellee8/buildgrid
  • anil-anil/buildgrid
  • seanborg/buildgrid
  • jdelong12/buildgrid
  • jclay/buildgrid
  • bweston92/buildgrid
  • zchen723/buildgrid
  • cpratt34/buildgrid
  • armbiant/apache-buildgrid
  • armbiant/android-buildgrid
  • itsme300/buildgrid
  • sbairoliya/buildgrid
32 results
Select Git revision
Show changes
Commits on Source (2)
......@@ -142,13 +142,67 @@ their containing *package*, as such; modules which are entirely private to
BuildGrid are named as such, e.g. ``_roy.py``.
.. _codebase-testing:
Testing
-------
BuildGrid is using ``pytest``_ for regression and newly added code testing. The
test suite contains a serie of unit-tests and also run linting tools in order to
detect coding-style_ breakage. The full test suite is automatically executed by
GitLab CI system for every push to the server. Passing all the tests is a
mandatory requirement for any merge request to the trunk.
.. _pytest: https://docs.pytest.org
Running tests
~~~~~~~~~~~~~
In order to run the entire test suite, simply run:
.. code-block:: sh
python3 setup.py test
You can use the ``--addopt`` function to feed arguments to pytest. For example,
if you want to see the ``stdout`` and ``stderr`` generated y the test, run:
.. code-block:: sh
python3 setup.py test --addopts -s
If you want run a specific test instead of the entire suite use:
.. code-block:: sh
python3 setup.py test --addopts tests/cas/test_client
pyest's `usage documentation section`_ details the different command line
options that can be used when invoking the test runner.
.. _usage documentation section: https://docs.pytest.org/en/latest/usage.html
Test coverage
~~~~~~~~~~~~~
We are doing our best at keeping BuildGrid's test coverage score as high as
possible. Doing so, we ask for any merge request to include necessary test
additions and/or modifications in order to maintain that coverage level. A
detailed `coverage report`_ is produced and publish for any change merged to the
trunk.
.. _coverage report: https://buildgrid.gitlab.io/buildgrid/coverage/
.. _committer-access:
Committer access
----------------
We'll hand out commit access to anyone who has successfully landed a single
patch to the code base. Please request this via irc or the mailing list.
patch to the code base. Please request this via Slack or the mailing list.
This of course relies on contributors being responsive and show willingness to
address problems after landing branches there should not be any problems here.
......
......@@ -9,5 +9,6 @@ This section covers how to run an use the BuildGrid build service.
.. toctree::
:maxdepth: 2
using_dummy_build.rst
using_simple_build.rst
using_internal.rst
using_bazel.rst
using_buildstream.rst
.. _bazel-builds:
Bazel builds
============
`Bazel`_ is a *“fast, scalable, multi-language and extensible build system”*
that supports remote build execution using the remote execution API (REAPI) v2
since its `0.17 release`_.
.. _Bazel: https://bazel.build
.. _0.17 release: https://blog.bazel.build/2018/09/14/bazel-0.17.html
.. _bazel-configuration:
Configuration
-------------
Bazel accepts many options that can either be specified as command line
arguments when involking the ``bazel`` tool or stored in a `.bazelrc`_
configuration file.
In order to activate remote execution, Bazel's ``build`` subcommand needs to be
given specific `build options`_. Most important ones include:
- ``--remote_executor``: remote execution endpoint's location, ``{host}:{port}``.
- ``--remote_instance_name``: remote execution instance's name.
- ``--spawn_strategy``: action execution method.
- ``--genrule_strategy``: `genrules`_ execution method.
Spawn and genrule strategies need to be set to ``remote`` for remote execution.
As an example, in order to activate remote execution on the ``main`` instance of
the remote execution server available at ``controller.grid.build`` on port
``50051`` you should amend your ``.bazelrc`` with:
.. code-block:: sh
build --spawn_strategy=remote --genrule_strategy=remote --remote_executor=controller.grid.build:50051 --remote_instance_name=main
.. _.bazelrc: https://docs.bazel.build/versions/master/user-manual.html#bazelrc
.. _build options: https://docs.bazel.build/versions/master/command-line-reference.html#build-options
.. _genrules: https://docs.bazel.build/versions/master/be/general.html#genrule
.. _bazel-example:
Example build
-------------
.. _bazel-build:
Complete build
--------------
.. _buildstream-builds:
BuildStream builds
==================
.. _dummy-build:
Dummy build
===========
In one terminal, start a server:
.. code-block:: sh
bgd server start buildgrid/_app/settings/default.yml
In another terminal, send a request for work:
.. code-block:: sh
bgd execute request-dummy
The stage should show as ``QUEUED`` as it awaits a bot to pick up the work:
.. code-block:: sh
bgd execute list
Create a bot session:
.. code-block:: sh
bgd bot dummy
Show the work as completed:
.. code-block:: sh
bgd execute list
.. _internal-builds:
Internal builds
===============
.. _dummy-test:
Dummy test
----------
In one terminal, start a server:
.. code-block:: sh
bgd server start buildgrid/_app/settings/default.yml
In another terminal, send a request for work:
.. code-block:: sh
bgd execute request-dummy
The stage should show as ``QUEUED`` as it awaits a bot to pick up the work:
.. code-block:: sh
bgd execute list
Create a bot session:
.. code-block:: sh
bgd bot dummy
Show the work as completed:
.. code-block:: sh
bgd execute list
.. _simple-build:
Simple build
============
------------
This example covers a simple build. The user will upload a directory containing
a C file and a command to the CAS. The bot will then fetch the uploaded
......