Tag Archives: Webkit

Checking out webkit without test cases

So you want to check out webkit to do some hacking. If you already tried this, you know that the test cases folder is enormous.

Not enormous solely by its size (which may be somewhat tolerable), but by amount of files in there. That’s absolutely preposterous. I think that the ratio when I last canceled the checkout was something like 15mb of content versus 75mb of disk space usage. I think I used FAT back then. That means 60mb went just to store information about files. (These sizes of course do not ignore the duplicates in the .svn folders.)

It’s completely irresponsible that someone put those in the project root, where nearly all the subfolders are essential except those test cases.

So if we just want to try out stuff and play around without running test cases ourselves, we don’t want to check out this enormous folder and get stuck on this for half an hour, an hour, two or even more. Here comes svn’s –depth parameter. UPDATE: Note! You will want to double-check that when you copy paste the command line from this site, there is actually two dashes before “depth”. I’ve noticed that during copy-paste, they were replaced by a single line.

$ svn co http://svn.webkit.org/repository/webkit/trunk webkit --depth immediates
$ cd webkit
$ for i in `ls -d */ | sed 's/\///g' | grep -v Tests`; do cd "$i" ; svn update --set-depth infinity; cd .. ; done

  1. So, we checkout only immediate children-files for webkit and put them in webkit subdirectory. 
  2. Then we list only directories, (ls -d */) and remove all the appended slashes (sed ‘s/\///g’). We have one directory per line now. Finally we get only lines that do NOT include word Tests (grep -v Tests).
  3. Finally, we enter each directory, and tell svn to update, but now with infinite depth.
That’s it! You should now have a Webkit working copy.
Tested on Mac OS X 10.6 Snow Leopard, with Webkit revision 52487. YMMV, but I think this should work on any Unix including GNU/Linux. You can probably pull this off on Windows using Cygwin or even msys.

Updated on Aug 22 2012, primarily to update formatting.