Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # GYP Hacking | 1 # Hacking |
| 2 | 2 |
| 3 [TOC] | |
| 4 | |
| 3 Note that the instructions below assume that you have the Chromium | 5 Note that the instructions below assume that you have the Chromium |
| 4 [depot tools](http://dev.chromium.org/developers/how-tos/depottools) | 6 [depot tools](http://dev.chromium.org/developers/how-tos/depottools) |
| 5 installed and configured. | 7 installed and configured. |
| 6 If you don't, you do not pass go, and you cannot collect your $200. | 8 If you don't, you do not pass go, and you cannot collect your $200. |
| 7 | 9 |
| 8 ## Getting the sources | 10 ## Getting the sources |
| 9 | 11 |
| 10 Best is to use git to hack on anything, you can set up a git clone of GYP | 12 Git is required to hack on anything, you can set up a git clone of GYP |
| 11 as follows: | 13 as follows (assuming depot\_tools is in your path): |
| 12 | 14 |
| 13 ``` | 15 ``` |
| 14 git clone https://chromium.googlesource.com/external/gyp.git | 16 mkdir foo |
| 17 cd foo | |
| 18 fetch gyp | |
| 15 cd gyp | 19 cd gyp |
| 16 ``` | 20 ``` |
| 17 | 21 |
| 22 (this will create foo/.gclient and clone gyp underneath it into foo/gyp. | |
| 23 `foo` can be any directory name you want. Once you've done that, | |
| 24 you can use the repo like anything other Git repo. | |
| 25 | |
| 26 (Technically you can skip fetch and just do `git clone https://chromium.googleso urce.com/external/gyp.git`, | |
| 27 but `fetch gyp` is shorter). | |
| 28 | |
| 18 ## Testing your change | 29 ## Testing your change |
| 19 | 30 |
| 20 GYP has a suite of tests which you can run with the provided test driver | 31 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. | 32 to make sure your changes aren't breaking anything important. |
| 22 | 33 |
| 23 You run the test driver with e.g. | 34 You run the test driver with e.g. |
| 24 | 35 |
| 25 ``` | 36 ``` |
| 26 python gyptest.py | 37 python gyptest.py |
| 27 python gyptest.py test/win # Only run Windows-related tests. | 38 python gyptest.py test/win # Only run Windows-related tests. |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 43 ## Reviewing your change | 54 ## Reviewing your change |
| 44 | 55 |
| 45 All changes to GYP must be code reviewed before submission, GYP uses rietveld. | 56 All changes to GYP must be code reviewed before submission, GYP uses rietveld. |
| 46 | 57 |
| 47 Upload your change with: | 58 Upload your change with: |
| 48 | 59 |
| 49 ``` | 60 ``` |
| 50 git cl upload | 61 git cl upload |
| 51 ``` | 62 ``` |
| 52 | 63 |
| 53 ## Submitting | 64 ## Try jobs |
| 54 | 65 |
| 55 Once you're ready to submit, you can use the GYP try bots to test your change | 66 Once you're ready to submit, you can use the GYP try bots to test your change |
| 56 with e.g. | 67 with e.g. |
| 57 | 68 |
| 58 ``` | 69 ``` |
| 59 git try | 70 git cl try -use-buildbucket |
|
scottmg
2015/08/13 23:06:41
is this not `--use-buildbucket`? (2 leading, not
| |
| 60 ``` | 71 ``` |
| 61 | 72 |
| 73 *Trying to use the Rietveld UI to run try jobs is currently broken*. | |
| 74 | |
| 75 | |
| 76 ## Submitting | |
| 77 | |
| 62 Once the change has been approved (LGTMed) and passes trybots, you can submit | 78 Once the change has been approved (LGTMed) and passes trybots, you can submit |
| 63 it with: | 79 it with: |
| 64 | 80 |
| 65 ``` | 81 ``` |
| 66 git cl land | 82 git cl land |
| 67 ``` | 83 ``` |
| 68 | 84 |
| 69 To be allowed to submit, you will need committer rights in the project. You | 85 To be allowed to submit, you will need committer rights in the project. You |
| 70 need to do the new password dance at | 86 need to do the new password dance at |
| 71 https://chromium.googlesource.com/new-password . | 87 https://chromium.googlesource.com/new-password . |
| 72 | 88 |
| 73 ## Migrating from an old with-svn checkout | 89 *There currently is no commit queue for GYP, so the commit queue boxes in |
| 90 the Rietveld UI don't work either.* | |
| 74 | 91 |
| 75 Remove the [svn] entry from .git/config, and the .git/svn subdirs to avoid | 92 ## Watch the tree! |
| 76 having `git cl land` complain that it looks like the repo is a SVN one. It might | 93 |
| 77 be easier to just repull instead. | 94 Gyp's Buildbot status page can be found here: |
| 95 http://build.chromium.org/p/client.gyp/ | |
| 96 | |
| 97 On that page you can view both the try job results from builds and the | |
| 98 continuous results from landed commits. | |
| OLD | NEW |