]> git.pld-linux.org Git - packages/chromium-browser.git/blob - clean-source.sh
move test cleanup to remove_tests(), cleanup unittest files
[packages/chromium-browser.git] / clean-source.sh
1 #!/bin/sh
2 set -xe
3
4 # import options
5 # remove everything unless it's remove has been disabled with "0"
6 # "v8=0" means "do not remove v8"
7 eval "$@"
8
9 # Strip tarball from some big directories not needed on the linux platform
10 # https://code.google.com/p/chromium/wiki/LinuxPackaging
11 # initial list from src/tools/export_tarball/export_tarball.py
12 # also removed non-linux files: find -name win -o -name mac -o name android
13 # find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
14 # suffix with _ those that we can't remove (just yet) because of the gclient
15 # hooks (see build/all.gyp) or of some unneeded deps/includes
16 remove_nonessential_dirs() {
17         local dir
18         for dir in \
19         android_webview \
20         ash/resources/default_100_percent/cros_ \
21         ash/resources/default_200_percent/cros_ \
22         ash/system/chromeos \
23         base/android \
24         base/chromeos \
25         base/mac_ \
26         base/win_ \
27         breakpad/src/client/mac \
28         breakpad/src/common/android \
29         breakpad/src/common/mac \
30         breakpad/src/tools/mac \
31         build/android \
32         build/mac \
33         build/win \
34         chrome/android \
35         chrome/app/android \
36         chrome/app/resources/terms/chromeos \
37         chrome/app/theme/default_100_percent/cros_ \
38         chrome/app/theme/default_100_percent/mac \
39         chrome/app/theme/default_100_percent/win \
40         chrome/app/theme/default_200_percent/cros_ \
41         chrome/app/theme/default_200_percent/mac \
42         chrome/app/theme/default_200_percent/win \
43         chrome/app/theme/touch_100_percent/win \
44         chrome/app/theme/touch_140_percent/win \
45         chrome/app/theme/touch_180_percent/win \
46         chrome/browser/android \
47         chrome/browser/chromeos/cros \
48         chrome/browser/chromeos_ \
49         chrome/browser/component/web_contents_delegate_android_ \
50         chrome/browser/history/android \
51         chrome/browser/mac \
52         chrome/browser/resources/about_welcome_android \
53         chrome/browser/resources/chromeos_ \
54         chrome/browser/resources/ntp_android \
55         chrome/browser/resources/options/chromeos_ \
56         chrome/browser/resources/shared/css/chromeos \
57         chrome/browser/resources/shared/js/chromeos_ \
58         chrome/browser/ui/android \
59         chrome/browser/ui/webui/chromeos \
60         chrome/browser/ui/webui/ntp/android \
61         chrome/browser/ui/webui/options/chromeos \
62         chrome/common/extensions/docs \
63         chrome/common/mac \
64         chrome/installer/mac \
65         chrome/installer/mac/third_party/xz/config/mac \
66         chrome/third_party/wtl/ \
67         chrome/tools/build/chromeos \
68         chrome/tools/build/mac \
69         chrome/tools/build/win \
70         chrome_frame \
71         chromeos \
72         cloud_print/service/win \
73         cloud_print/virtual_driver/win \
74         content/app/android \
75         content/browser/android \
76         content/common/android \
77         content/common/mac_ \
78         content/public/android \
79         content/public/browser/android \
80         content/renderer/android \
81         content/shell/android \
82         content/shell/mac \
83         data \
84         gears \
85         google_update \
86         gpu/demos \
87         media/audio/android \
88         media/audio/mac \
89         media/audio/win \
90         media/base/android \
91         media/video/capture/mac \
92         media/video/capture/win \
93         media/webm/chromeos \
94         native_client/build/mac \
95         native_client/src/include/win_ \
96         native_client/src/shared/imc/win \
97         native_client/src/shared/platform/win \
98         native_client/src/trusted/debug_stub/win \
99         native_client/src/trusted/desc/win \
100         native_client/src/trusted/nonnacl_util/win \
101         native_client/src/trusted/platform_qualify/win \
102         native_client/src/trusted/service_runtime/win_ \
103         native_client/tools/trusted_cross_toolchains \
104         native_client_sdk \
105         native_client_sdk/src/libraries/win \
106         net/android \
107         o3d \
108         o3d/documentation \
109         o3d/samples \
110         ppapi/native_client/src/trusted/plugin/win \
111         remoting/host/installer/mac \
112         remoting/host/installer/win \
113         remoting/host/mac \
114         remoting/host/setup/win \
115         remoting/host/win \
116         rlz/mac \
117         rlz/win \
118         sandbox/win_ \
119         sdch/mac \
120         skia/config/win \
121         third_party/WebKit/Source/Platform/chromium/public/android \
122         third_party/WebKit/Source/Platform/chromium/public/mac \
123         third_party/WebKit/Source/Platform/chromium/public/win \
124         third_party/WebKit/Source/WTF/wtf/mac \
125         third_party/WebKit/Source/WTF/wtf/threads/win \
126         third_party/WebKit/Source/WTF/wtf/win \
127         third_party/WebKit/Source/WebCore/WebCore.gyp/mac \
128         third_party/WebKit/Source/WebCore/accessibility/mac \
129         third_party/WebKit/Source/WebCore/accessibility/win \
130         third_party/WebKit/Source/WebCore/editing/android \
131         third_party/WebKit/Source/WebCore/editing/mac \
132         third_party/WebKit/Source/WebCore/history/android \
133         third_party/WebKit/Source/WebCore/history/mac \
134         third_party/WebKit/Source/WebCore/loader/mac \
135         third_party/WebKit/Source/WebCore/loader/win \
136         third_party/WebKit/Source/WebCore/page/android \
137         third_party/WebKit/Source/WebCore/page/mac \
138         third_party/WebKit/Source/WebCore/page/scrolling/mac \
139         third_party/WebKit/Source/WebCore/page/win \
140         third_party/WebKit/Source/WebCore/platform/android \
141         third_party/WebKit/Source/WebCore/platform/audio/mac \
142         third_party/WebKit/Source/WebCore/platform/cf/win \
143         third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
144         third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
145         third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
146         third_party/WebKit/Source/WebCore/platform/graphics/mac \
147         third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
148         third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
149         third_party/WebKit/Source/WebCore/platform/graphics/win \
150         third_party/WebKit/Source/WebCore/platform/mac \
151         third_party/WebKit/Source/WebCore/platform/network/android \
152         third_party/WebKit/Source/WebCore/platform/network/mac \
153         third_party/WebKit/Source/WebCore/platform/network/win \
154         third_party/WebKit/Source/WebCore/platform/text/android \
155         third_party/WebKit/Source/WebCore/platform/text/mac \
156         third_party/WebKit/Source/WebCore/platform/text/win \
157         third_party/WebKit/Source/WebCore/platform/win \
158         third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \
159         third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \
160         third_party/WebKit/Source/WebCore/plugins/mac \
161         third_party/WebKit/Source/WebCore/plugins/win \
162         third_party/WebKit/Source/WebKit/chromium/public/android \
163         third_party/WebKit/Source/WebKit/chromium/public/mac_ \
164         third_party/WebKit/Source/WebKit/chromium/public/platform/android \
165         third_party/WebKit/Source/WebKit/chromium/public/platform/mac \
166         third_party/WebKit/Source/WebKit/chromium/public/platform/win \
167         third_party/WebKit/Source/WebKit/chromium/public/win \
168         third_party/WebKit/Source/WebKit/chromium/src/android \
169         third_party/WebKit/Source/WebKit/chromium/src/mac \
170         third_party/WebKit/Source/WebKit/chromium/src/win \
171         third_party/WebKit/Source/WebKit/mac \
172         third_party/WebKit/Source/WebKit/win \
173         third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \
174         third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \
175         third_party/WebKit/Source/WebKit2/Platform/mac \
176         third_party/WebKit/Source/WebKit2/Platform/win \
177         third_party/WebKit/Source/WebKit2/PluginProcess/mac \
178         third_party/WebKit/Source/WebKit2/Shared/API/c/mac \
179         third_party/WebKit/Source/WebKit2/Shared/API/c/win \
180         third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \
181         third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \
182         third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \
183         third_party/WebKit/Source/WebKit2/Shared/cg/win \
184         third_party/WebKit/Source/WebKit2/Shared/mac \
185         third_party/WebKit/Source/WebKit2/Shared/win \
186         third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \
187         third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \
188         third_party/WebKit/Source/WebKit2/UIProcess/API/mac \
189         third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \
190         third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \
191         third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \
192         third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \
193         third_party/WebKit/Source/WebKit2/UIProcess/mac \
194         third_party/WebKit/Source/WebKit2/UIProcess/win \
195         third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \
196         third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \
197         third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \
198         third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \
199         third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \
200         third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \
201         third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \
202         third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \
203         third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \
204         third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \
205         third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \
206         third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \
207         third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \
208         third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \
209         third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \
210         third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \
211         third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \
212         third_party/WebKit/Source/WebKit2/WebProcess/mac \
213         third_party/WebKit/Source/WebKit2/WebProcess/win \
214         third_party/WebKit/Source/WebKit2/mac \
215         third_party/WebKit/Source/WebKit2/win \
216         third_party/WebKit/Tools/DumpRenderTree/mac \
217         third_party/WebKit/Tools/DumpRenderTree/win \
218         third_party/angle/samples/gles2_book \
219         third_party/boost \
220         third_party/bsdiff \
221         third_party/bspatch \
222         third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
223         third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
224         third_party/cld/encodings/compact_lang_det/win_ \
225         third_party/cros_system_api_ \
226         third_party/ffmpeg/binaries \
227         third_party/ffmpeg/chromium/binaries/Chromium/win \
228         third_party/ffmpeg/chromium/config/Chrome/mac \
229         third_party/ffmpeg/chromium/config/Chrome/win \
230         third_party/ffmpeg/chromium/config/Chromium/mac \
231         third_party/ffmpeg/chromium/config/Chromium/win \
232         third_party/ffmpeg/chromium/include/win \
233         third_party/fuzzymatch \
234         third_party/gles2_book \
235         third_party/gles_book_examples \
236         third_party/gold \
237         third_party/hunspell/dictionaries \
238         third_party/hunspell_dictionaries \
239         third_party/icu/android \
240         third_party/icu/mac \
241         third_party/lcov \
242         third_party/leveldatabase/src/port/win \
243         third_party/libjpeg_turbo/mac \
244         third_party/libjpeg_turbo/win \
245         third_party/libva/va/android \
246         third_party/libvpx/source/config/mac \
247         third_party/libvpx/source/config/win \
248         third_party/libxml/mac \
249         third_party/lighttpd \
250         third_party/mozc/chrome/chromeos_ \
251         third_party/nspr \
252         third_party/nss \
253         third_party/ocmock \
254         third_party/openssl/config/android \
255         third_party/pthread \
256         third_party/pyftpdlib \
257         third_party/scons \
258         third_party/simplejson \
259         third_party/skia/include/utils/android \
260         third_party/skia/include/utils/mac \
261         third_party/skia/include/utils/win \
262         third_party/skia/include/views/android \
263         third_party/skia/src/gpu/gl/android \
264         third_party/skia/src/gpu/gl/mac \
265         third_party/skia/src/gpu/gl/win \
266         third_party/skia/src/utils/mac \
267         third_party/skia/src/utils/win \
268         third_party/skia/src/views/mac \
269         third_party/skia/src/views/win \
270         third_party/snappy/mac \
271         third_party/tcmalloc_ \
272         third_party/vc_80 \
273         third_party/webrtc/modules/audio_device/android \
274         third_party/webrtc/modules/audio_device/main/source/mac \
275         third_party/webrtc/modules/audio_device/main/source/win \
276         third_party/webrtc/modules/audio_device/win \
277         third_party/webrtc/modules/video_capture/main/source/android \
278         third_party/webrtc/modules/video_render/main/source/android \
279         third_party/webrtc/modules/video_render/main/source/mac \
280         third_party/webrtc/system_wrappers/source/android \
281         third_party/yasm/source/config/android \
282         third_party/yasm/source/config/mac \
283         third_party/yasm/source/config/win \
284         tools/android \
285         tools/mac \
286         tools/site_compare \
287         tools/stats_viewer \
288         tools/symsrc \
289         tools/valgrind \
290         tools/win \
291         tools/wine_valgrind \
292         ui/android \
293         ui/base/ime/win \
294         ui/base/win_ \
295         ui/gfx/android \
296         ui/gfx/mac \
297         ui/resources/default_100_percent/cros_ \
298         ui/resources/default_200_percent/cros_ \
299         ui/views/win \
300         webkit/chromeos \
301         webkit/media/android \
302         win8 \
303         ; do
304                 rm -vfr "$dir"
305         done
306 }
307
308 # There are directories we want to strip, but that are unnecessarily required by the build-system
309 # So we drop everything but the gyp/gypi files
310 almost_strip_dirs() {
311         local dir
312         for dir in \
313                 breakpad \
314                 courgette \
315                 third_party/cros_dbus_cplusplus \
316                 ; do
317                 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' \) -print -delete || :
318         done
319
320         find tools -type f \
321                 '!' -iname '*.gyp*' \
322                 '!' -path 'tools/build/*' \
323                 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
324                 '!' -path 'tools/generate_stubs/*' \
325                 '!' -path 'tools/grit/*' \
326                 '!' -path 'tools/gritsettings/*' \
327                 '!' -path 'tools/gyp/*' \
328                 '!' -path 'tools/json_comment_eater.py' \
329                 '!' -path 'tools/json_schema_compiler/*' \
330                 '!' -path 'tools/protoc_wrapper/*' \
331                 '!' -path 'tools/uuidgen.py' \
332                 '!' -path 'tools/zip2msi.py' \
333                 -print -delete
334 }
335
336 # clean third party
337 # list based from archlinux PKGBUILD
338 # https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
339 clean_third_party() {
340         find third_party -type f \! -iname '*.gyp*' \
341                 \! -path 'third_party/WebKit/*' \
342                 \! -path 'third_party/adobe/flash/*' \
343                 \! -path 'third_party/angle/*' \
344                 \! -path 'third_party/cacheinvalidation/*' \
345                 \! -path 'third_party/cld/*' \
346                 \! -path 'third_party/cros_system_api/*' \
347                 \! -path 'third_party/ffmpeg/*' \
348                 \! -path 'third_party/flac/flac.h' \
349                 \! -path 'third_party/flot/*' \
350                 \! -path 'third_party/gpsd/*' \
351                 \! -path 'third_party/harfbuzz-ng/*' \
352                 \! -path 'third_party/harfbuzz/*' \
353                 \! -path 'third_party/hunspell/*' \
354                 \! -path 'third_party/hyphen/*' \
355                 \! -path 'third_party/iccjpeg/*' \
356                 \! -path 'third_party/jsoncpp/*' \
357                 \! -path 'third_party/khronos/*' \
358                 \! -path 'third_party/leveldatabase/*' \
359                 \! -path 'third_party/libXNVCtrl/*' \
360                 \! -path 'third_party/libjingle/*' \
361                 \! -path 'third_party/libphonenumber/*' \
362                 \! -path 'third_party/libsrtp/*' \
363                 \! -path 'third_party/libusb/libusb.h' \
364                 \! -path 'third_party/libva/*' \
365                 \! -path 'third_party/libvpx/libvpx.h' \
366                 \! -path 'third_party/libxml/chromium/*' \
367                 \! -path 'third_party/libyuv/*' \
368                 \! -path 'third_party/lss/*' \
369                 \! -path 'third_party/mesa/*' \
370                 \! -path 'third_party/modp_b64/*' \
371                 \! -path 'third_party/mongoose/*' \
372                 \! -path 'third_party/mt19937ar/*' \
373                 \! -path 'third_party/npapi/*' \
374                 \! -path 'third_party/openmax/*' \
375                 \! -path 'third_party/opus/opus.h*' \
376                 \! -path 'third_party/ots/*' \
377                 \! -path 'third_party/protobuf/*' \
378                 \! -path 'third_party/pywebsocket/*' \
379                 \! -path 'third_party/qcms/*' \
380                 \! -path 'third_party/re2/*' \
381                 \! -path 'third_party/scons-2.0.1/*' \
382                 \! -path 'third_party/sfntly/*' \
383                 \! -path 'third_party/skia/*' \
384                 \! -path 'third_party/smhasher/*' \
385                 \! -path 'third_party/speex/speex.h' \
386                 \! -path 'third_party/sqlite/*' \
387                 \! -path 'third_party/tcmalloc/*' \
388                 \! -path 'third_party/tlslite/*' \
389                 \! -path 'third_party/trace-viewer/*' \
390                 \! -path 'third_party/undoview/*' \
391                 \! -path 'third_party/v8-i18n/*' \
392                 \! -path 'third_party/v8/*' \
393                 \! -path 'third_party/webdriver/*' \
394                 \! -path 'third_party/webrtc/*' \
395                 \! -path 'third_party/widevine/*' \
396                 -print -delete
397
398         rm -vf third_party/expat/files/lib/expat.h
399 }
400
401 # parts based on ubuntu debian/rules
402 # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
403 remove_bin_only() {
404         find -type f \( \
405                 -iname \*.exe -o \
406                 -iname \*.dll -o \
407                 -iname \*.pdb -o \
408                 -name \*.o -o \
409                 -name \*.a -o \
410                 -name \*.dylib \
411         \) -exec rm -fv {} \;
412 }
413
414 # removes dir, if the bcond is not turned off
415 strip_system_dirs() {
416         local dir lib bcond
417         for dir in "$@"; do
418                 lib=${dir##*/}
419                 bcond=$(eval echo \$$lib)
420                 [ "${bcond:-1}" = 0 ] && continue
421
422                 # skip already removed dirs
423                 test -d $dir || continue
424
425                 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h \) -print -delete
426         done
427 }
428
429 # remove test data and files
430 # some scanned with find -name tests -o -name test -o -name test_data
431 # and find -iname *test*
432 remove_tests() {
433         local dir
434
435         # full remove
436         for dir in \
437         ash/test \
438         base/test \
439         breakpad/src/client/windows/tests \
440         breakpad/src/common/linux/tests \
441         breakpad/src/common/tests \
442         chrome/browser/chromeos/bluetooth/test \
443         chrome/browser/component_updater/test \
444         chrome/browser/printing/cloud_print/test \
445         chrome/browser/resources/gaia_auth/test \
446         chrome/browser/resources/tracing/tests \
447         chrome/browser/sync/test \
448         chrome/browser/ui/tests \
449         chrome/installer/test \
450         chrome/test/chromeos \
451         chrome/test/data/firefox2_nss_mac \
452         chrome/test/data/safe_browsing/old \
453         chrome/test/logging/win \
454         chrome/test/pyautolib/chromeos \
455         chrome/test/webdriver/test \
456         chrome/tools/test \
457         chrome_frame/test \
458         chrome_frame/tools/test \
459         content/browser/worker_host/test \
460         content/public/test \
461         content/test \
462         courgette/testdata \
463         gpu/command_buffer/tests \
464         media/test \
465         media/tools/layout_tests/test_data \
466         native_client/src/trusted/service_runtime/testdata \
467         native_client/src/trusted/validator/x86/testing \
468         native_client/tests \
469         native_client/tools/tests \
470         native_client_sdk/src/build_tools/tests \
471         native_client_sdk/src/libraries/c_salt/test \
472         net/test \
473         o3d/tests \
474         ppapi/native_client/tests \
475         ppapi/tests \
476         printing/test \
477         rlz/test \
478         sandbox/linux/seccomp-legacy/tests \
479         sandbox/linux/tests \
480         sandbox/tests \
481         sandbox/win/tests \
482         seccompsandbox/tests \
483         sync/internal_api/public/test \
484         sync/internal_api/test \
485         sync/test \
486         testing/android \
487         testing/gmock/scripts/test \
488         testing/gmock/test \
489         testing/gtest/scripts/test \
490         testing/gtest/test \
491         third_party/WebKit/LayoutTests \
492         third_party/WebKit/Source/JavaScriptCore/API/tests \
493         third_party/WebKit/Source/JavaScriptCore/qt/tests \
494         third_party/WebKit/Source/JavaScriptCore/tests \
495         third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
496         third_party/WebKit/Source/ThirdParty/gtest/test \
497         third_party/WebKit/Source/ThirdParty/gyp/test \
498         third_party/WebKit/Source/ThirdParty/qunit/test \
499         third_party/WebKit/Source/WebCore/bindings/scripts/test \
500         third_party/WebKit/Source/WebCore/testing_ \
501         third_party/WebKit/Source/WebKit/chromium/tests \
502         third_party/WebKit/Source/WebKit/efl/tests \
503         third_party/WebKit/Source/WebKit/gtk/tests \
504         third_party/WebKit/Source/WebKit/qt/tests \
505         third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
506         third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
507         third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
508         third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
509         third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
510         third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
511         third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
512         third_party/WebKit/Tools/Scripts/webkitpy/test \
513         third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
514         third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
515         third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
516         third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
517         third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
518         third_party/WebKit/Tools/TestWebKitAPI/mac \
519         third_party/WebKit/Tools/TestWebKitAPI/win \
520         third_party/angle/tests \
521         third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
522         third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
523         third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
524         third_party/ffmpeg/tests \
525         third_party/harfbuzz/tests \
526         third_party/hunspell/tests \
527         third_party/hyphen/tests \
528         third_party/libexif/sources/test \
529         third_party/libjingle/source/talk/app/webrtc/test \
530         third_party/libphonenumber/src/resources/test \
531         third_party/libphonenumber/src/test \
532         third_party/libsrtp/srtp/crypto/test \
533         third_party/libsrtp/srtp/test \
534         third_party/mesa/MesaLib/src/gallium/tests \
535         third_party/openssl/openssl/crypto/des/t/test \
536         third_party/openssl/openssl/test \
537         third_party/ots/test \
538         third_party/protobuf/src/google/protobuf/testing \
539         third_party/re2/re2/testing \
540         third_party/safe_browsing/testing \
541         third_party/sfntly/cpp/src/test \
542         third_party/sqlite/src/test \
543         third_party/sqlite/test \
544         third_party/talloc/libreplace/test \
545         third_party/tcmalloc/chromium/src/tests \
546         third_party/tcmalloc/vendor/src/tests \
547         third_party/tlslite/test \
548         third_party/trace-viewer/test_data \
549         third_party/v8-i18n/tests \
550         third_party/webdriver/pylib/test \
551         third_party/webdriver/test_data \
552         third_party/webrtc/modules/audio_device/test/android \
553         third_party/webrtc/modules/audio_processing/test/android \
554         third_party/webrtc/modules/video_capture/main/test/android \
555         third_party/webrtc/test/testsupport/mac \
556         third_party/webrtc/video_engine/test/android \
557         third_party/webrtc/video_engine/test/auto_test/android \
558         third_party/webrtc/voice_engine/test/android \
559         third_party/xdg-utils/tests \
560         third_party/yasm/source/patched-yasm/libyasm/tests \
561         third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
562         third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
563         third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
564         third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
565         third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
566         third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
567         third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
568         third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
569         third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
570         third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
571         third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
572         third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
573         third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
574         third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
575         third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
576         third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
577         third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
578         third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
579         tools/clang/plugins/tests \
580         tools/gyp/test \
581         tools/page_cycler/webpagereplay/tests \
582         tools/perf_expectations/tests \
583         ui/app_list/test \
584         ui/aura/test \
585         ui/base/test \
586         ui/compositor/test \
587         ui/gfx/test \
588         ui/test \
589         ui/views/test \
590         v8/test \
591         webkit/data/layout_tests \
592         webkit/plugins/npapi/test \
593         webkit/tools/test/reference_build \
594         webkit/tools/test_shell/mac \
595         ; do
596                 rm -vfr "$dir"
597         done
598
599         # partial remove (keep .gyp)
600         for dir in \
601                 chrome/test/data \
602                 testing \
603                 ; do
604                 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete
605         done
606
607         # link headers from system dir. too many files to patch, we don't even build tests
608         install -d testing/gtest/include
609         ln -s /usr/include/gtest testing/gtest/include/gtest
610
611         # delete unittest files
612         find -name '*_unittest.*' \
613                 -print -delete
614 }
615
616 remove_nonessential_dirs | tee -a REMOVED-nonessential_dirs.txt
617 almost_strip_dirs | tee -a REMOVED-stripped.txt
618 remove_bin_only | tee -a REMOVED-bin_only.txt
619 remove_tests | tee -a REMOVED-tests.txt
620
621 strip_system_dirs \
622         native_client/src/third_party_mod/jsoncpp \
623         third_party/bzip2 \
624         third_party/flac \
625         third_party/icu \
626         third_party/jsoncpp \
627         third_party/libevent \
628         third_party/libexif \
629         third_party/libjpeg \
630         third_party/libmtp \
631         third_party/libpng \
632         third_party/libsrtp \
633         third_party/libusb \
634         third_party/libvpx \
635         third_party/libwebp \
636         third_party/libxml_ \
637         third_party/libxslt \
638         third_party/opus \
639         third_party/speex \
640         third_party/yasm \
641         third_party/zlib \
642         v8 \
643 | tee -a REMOVED-system_dirs.txt
644
645 clean_third_party | tee -a REMOVED-third_party.txt
646
647 if [ "${v8:-1}" != "0" ]; then
648         # The implementation files include v8 headers with full path,
649         # like #include "v8/include/v8.h". Make sure the system headers
650         # will be used.
651         rm -rf v8/include
652         ln -s /usr/include v8/include
653 fi
654
655 if [ "${nacl:-1}" != "0" ]; then
656         # NOTE: here is always x86_64
657         rm -rf native_client/toolchain/linux_x86_newlib
658 fi
659
660 # cleanup empty dirs
661 find -type d -print0 | sort -zr | xargs -0 rmdir -v 2>/dev/null | tee -a REMOVED-dirs.txt
This page took 0.069991 seconds and 4 git commands to generate.