~hjd/ubuntu/wily/gyp/debian-merged

« back to all changes in this revision

Viewing changes to docs/Hacking.md

  • Committer: Hans Joachim Desserud
  • Date: 2015-10-31 12:46:59 UTC
  • mfrom: (6.2.6 sid)
  • Revision ID: hans_joachim_desserud-20151031124659-lzxekr6woskh4k0b
Merge latest Debian version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# GYP Hacking
 
2
 
 
3
Note that the instructions below assume that you have the Chromium
 
4
[depot tools](http://dev.chromium.org/developers/how-tos/depottools)
 
5
installed and configured.
 
6
If you don't, you do not pass go, and you cannot collect your $200.
 
7
 
 
8
## Getting the sources
 
9
 
 
10
Best is to use git to hack on anything, you can set up a git clone of GYP
 
11
as follows:
 
12
 
 
13
```
 
14
git clone https://chromium.googlesource.com/external/gyp.git
 
15
cd gyp
 
16
```
 
17
 
 
18
## Testing your change
 
19
 
 
20
GYP has a suite of tests which you can run with the provided test driver
 
21
to make sure your changes aren't breaking anything important.
 
22
 
 
23
You run the test driver with e.g.
 
24
 
 
25
```
 
26
python gyptest.py
 
27
python gyptest.py test/win  # Only run Windows-related tests.
 
28
python gyptest.py -a -f ninja  # Only run ninja-related tests.
 
29
```
 
30
 
 
31
See [Testing](Testing) for more details on the test framework.
 
32
 
 
33
Note that it can be handy to look at the project files output by the tests
 
34
to diagnose problems. The easiest way to do that is by kindly asking the
 
35
test driver to leave the temporary directories it creates in-place.
 
36
This is done by setting the enviroment variable "PRESERVE", e.g.
 
37
 
 
38
```
 
39
set PRESERVE=all     # On Windows
 
40
export PRESERVE=all  # On saner platforms.
 
41
```
 
42
 
 
43
## Reviewing your change
 
44
 
 
45
All changes to GYP must be code reviewed before submission, GYP uses rietveld.
 
46
 
 
47
Upload your change with:
 
48
 
 
49
```
 
50
git cl upload
 
51
```
 
52
 
 
53
## Submitting
 
54
 
 
55
Once you're ready to submit, you can use the GYP try bots to test your change
 
56
with e.g.
 
57
 
 
58
```
 
59
git try
 
60
```
 
61
 
 
62
Once the change has been approved (LGTMed) and passes trybots, you can submit
 
63
it with:
 
64
 
 
65
```
 
66
git cl land
 
67
```
 
68
 
 
69
To be allowed to submit, you will need committer rights in the project. You
 
70
need to do the new password dance at
 
71
https://chromium.googlesource.com/new-password .
 
72
 
 
73
## Migrating from an old with-svn checkout
 
74
 
 
75
Remove the [svn] entry from .git/config, and the .git/svn subdirs to avoid
 
76
having `git cl land` complain that it looks like the repo is a SVN one. It might
 
77
be easier to just repull instead.