| 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 |
| 27 `git clone https://chromium.googlesource.com/external/gyp.git`, |
| 28 but `fetch gyp` is shorter). |
| 29 |
| 18 ## Testing your change | 30 ## Testing your change |
| 19 | 31 |
| 20 GYP has a suite of tests which you can run with the provided test driver | 32 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. | 33 to make sure your changes aren't breaking anything important. |
| 22 | 34 |
| 23 You run the test driver with e.g. | 35 You run the test driver with e.g. |
| 24 | 36 |
| 25 ``` | 37 ``` |
| 26 python gyptest.py | 38 python gyptest.py |
| 27 python gyptest.py test/win # Only run Windows-related tests. | 39 python gyptest.py test/win # Only run Windows-related tests. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 43 ## Reviewing your change | 55 ## Reviewing your change |
| 44 | 56 |
| 45 All changes to GYP must be code reviewed before submission, GYP uses rietveld. | 57 All changes to GYP must be code reviewed before submission, GYP uses rietveld. |
| 46 | 58 |
| 47 Upload your change with: | 59 Upload your change with: |
| 48 | 60 |
| 49 ``` | 61 ``` |
| 50 git cl upload | 62 git cl upload |
| 51 ``` | 63 ``` |
| 52 | 64 |
| 53 ## Submitting | 65 ## Try jobs |
| 54 | 66 |
| 55 Once you're ready to submit, you can use the GYP try bots to test your change | 67 Once you're ready to submit, you can use the GYP try bots to test your change |
| 56 with e.g. | 68 with e.g. |
| 57 | 69 |
| 58 ``` | 70 ``` |
| 59 git try | 71 git cl try --use-buildbucket |
| 60 ``` | 72 ``` |
| 61 | 73 |
| 74 *Trying to use the Rietveld UI to run try jobs is currently broken*. |
| 75 |
| 76 |
| 77 ## Submitting |
| 78 |
| 62 Once the change has been approved (LGTMed) and passes trybots, you can submit | 79 Once the change has been approved (LGTMed) and passes trybots, you can submit |
| 63 it with: | 80 it with: |
| 64 | 81 |
| 65 ``` | 82 ``` |
| 66 git cl land | 83 git cl land |
| 67 ``` | 84 ``` |
| 68 | 85 |
| 69 To be allowed to submit, you will need committer rights in the project. You | 86 To be allowed to submit, you will need committer rights in the project. You |
| 70 need to do the new password dance at | 87 need to do the new password dance at |
| 71 https://chromium.googlesource.com/new-password . | 88 https://chromium.googlesource.com/new-password . |
| 72 | 89 |
| 73 ## Migrating from an old with-svn checkout | 90 *There currently is no commit queue for GYP, so the commit queue boxes in |
| 91 the Rietveld UI don't work either.* |
| 74 | 92 |
| 75 Remove the [svn] entry from .git/config, and the .git/svn subdirs to avoid | 93 ## Watch the tree! |
| 76 having `git cl land` complain that it looks like the repo is a SVN one. It might | 94 |
| 77 be easier to just repull instead. | 95 Gyp's Buildbot status page can be found here: |
| 96 http://build.chromium.org/p/client.gyp/ |
| 97 |
| 98 On that page you can view both the try job results from builds and the |
| 99 continuous results from landed commits. |
| OLD | NEW |