7 # remove everything unless it's remove has been disabled with "0"
8 # "v8=0" means "do not remove v8"
11 # Strip tarball from some big directories not needed on the linux platform
12 # https://code.google.com/p/chromium/wiki/LinuxPackaging
13 # initial list from src/tools/export_tarball/export_tarball.py
14 # also removed non-linux files: find -name win -o -name mac -o name android
15 # find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
16 # find -type d -name *doc*
17 # find -type d -name *example*
18 # find -type d -name java
19 # find -type d -name tools
20 # suffix with _ those that we can't remove (just yet) because of the gclient
21 # hooks (see build/all.gyp) or of some unneeded deps/includes
22 remove_nonessential_dirs() {
26 ash/resources/default_100_percent/cros_ \
27 ash/resources/default_200_percent/cros_ \
35 breakpad/src/client/mac \
36 breakpad/src/common/android \
37 breakpad/src/common/mac \
38 breakpad/src/tools/mac \
44 chrome/app/resources/terms/chromeos \
45 chrome/app/theme/default_100_percent/cros_ \
46 chrome/app/theme/default_100_percent/mac \
47 chrome/app/theme/default_100_percent/win \
48 chrome/app/theme/default_200_percent/cros_ \
49 chrome/app/theme/default_200_percent/mac \
50 chrome/app/theme/default_200_percent/win \
51 chrome/app/theme/touch_100_percent/win \
52 chrome/app/theme/touch_140_percent/win \
53 chrome/app/theme/touch_180_percent/win \
54 chrome/browser/android \
55 chrome/browser/chromeos/cros \
56 chrome/browser/chromeos_ \
57 chrome/browser/component/web_contents_delegate_android_ \
58 chrome/browser/extensions/docs \
59 chrome/browser/history/android \
61 chrome/browser/resources/about_welcome_android \
62 chrome/browser/resources/chromeos_ \
63 chrome/browser/resources/ntp_android \
64 chrome/browser/resources/options/chromeos_ \
65 chrome/browser/resources/shared/css/chromeos \
66 chrome/browser/resources/shared/js/chromeos_ \
67 chrome/browser/ui/android \
68 chrome/browser/ui/cocoa \
69 chrome/browser/ui/webui/chromeos \
70 chrome/browser/ui/webui/ntp/android \
71 chrome/browser/ui/webui/options/chromeos \
72 chrome/common/extensions/docs \
74 chrome/installer/mac \
75 chrome/installer/mac/third_party/xz/config/mac \
76 chrome/installer/tools \
77 chrome/third_party/jstemplate/tutorial_examples \
78 chrome/third_party/mock4js/examples \
79 chrome/third_party/wtl/ \
80 chrome/tools/build/chromeos \
81 chrome/tools/build/mac \
82 chrome/tools/build/win \
86 cloud_print/service/win \
87 cloud_print/virtual_driver/win \
89 content/browser/android \
90 content/browser/renderer_host/java_ \
91 content/common/android \
93 content/components/navigation_interception/java \
94 content/components/web_contents_delegate_android/java \
95 content/public/android \
96 content/public/browser/android \
97 content/renderer/android \
98 content/renderer/java_ \
99 content/shell/android \
104 gpu/command_buffer/docs \
107 media/audio/android \
113 media/video/capture/mac \
114 media/video/capture/win \
115 media/webm/chromeos \
116 native_client/build/mac \
117 native_client/documentation \
118 native_client/src/include/win_ \
119 native_client/src/shared/imc/win \
120 native_client/src/shared/platform/win \
121 native_client/src/tools \
122 native_client/src/trusted/debug_stub/win \
123 native_client/src/trusted/desc/win \
124 native_client/src/trusted/nonnacl_util/win \
125 native_client/src/trusted/platform_qualify/win \
126 native_client/src/trusted/service_runtime/win_ \
127 native_client/tools \
128 native_client/tools/trusted_cross_toolchains \
130 native_client_sdk/src/libraries/win \
133 net/tools/testserver \
137 ppapi/c/documentation \
138 ppapi/cpp/documentation \
139 ppapi/native_client/src/tools \
140 ppapi/native_client/src/trusted/plugin/win \
141 ppapi/native_client/tools \
142 remoting/host/installer/mac \
143 remoting/host/installer/win \
145 remoting/host/setup/win \
157 third_party/WebKit/Source/JavaScriptCore/docs \
158 third_party/WebKit/Source/JavaScriptCore/tools \
159 third_party/WebKit/Source/Platform/chromium/public/android \
160 third_party/WebKit/Source/Platform/chromium/public/mac \
161 third_party/WebKit/Source/Platform/chromium/public/win \
162 third_party/WebKit/Source/ThirdParty/gyp/tools \
163 third_party/WebKit/Source/WTF/wtf/mac \
164 third_party/WebKit/Source/WTF/wtf/qt \
165 third_party/WebKit/Source/WTF/wtf/threads/win \
166 third_party/WebKit/Source/WTF/wtf/win \
167 third_party/WebKit/Source/WebCore/WebCore.gyp/mac \
168 third_party/WebKit/Source/WebCore/accessibility/mac \
169 third_party/WebKit/Source/WebCore/accessibility/qt \
170 third_party/WebKit/Source/WebCore/accessibility/win \
171 third_party/WebKit/Source/WebCore/bridge/qt \
172 third_party/WebKit/Source/WebCore/editing/android \
173 third_party/WebKit/Source/WebCore/editing/mac \
174 third_party/WebKit/Source/WebCore/editing/qt \
175 third_party/WebKit/Source/WebCore/history/android \
176 third_party/WebKit/Source/WebCore/history/mac \
177 third_party/WebKit/Source/WebCore/history/qt \
178 third_party/WebKit/Source/WebCore/loader/mac \
179 third_party/WebKit/Source/WebCore/loader/win \
180 third_party/WebKit/Source/WebCore/page/android \
181 third_party/WebKit/Source/WebCore/page/mac \
182 third_party/WebKit/Source/WebCore/page/qt \
183 third_party/WebKit/Source/WebCore/page/scrolling/mac \
184 third_party/WebKit/Source/WebCore/page/win \
185 third_party/WebKit/Source/WebCore/platform/android \
186 third_party/WebKit/Source/WebCore/platform/audio/mac \
187 third_party/WebKit/Source/WebCore/platform/audio/qt \
188 third_party/WebKit/Source/WebCore/platform/cf/win \
189 third_party/WebKit/Source/WebCore/platform/cocoa \
190 third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
191 third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
192 third_party/WebKit/Source/WebCore/platform/graphics/cocoa \
193 third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
194 third_party/WebKit/Source/WebCore/platform/graphics/gpu/qt \
195 third_party/WebKit/Source/WebCore/platform/graphics/mac \
196 third_party/WebKit/Source/WebCore/platform/graphics/qt \
197 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
198 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/qt \
199 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
200 third_party/WebKit/Source/WebCore/platform/graphics/win \
201 third_party/WebKit/Source/WebCore/platform/ios \
202 third_party/WebKit/Source/WebCore/platform/mac \
203 third_party/WebKit/Source/WebCore/platform/network/android \
204 third_party/WebKit/Source/WebCore/platform/network/mac \
205 third_party/WebKit/Source/WebCore/platform/network/qt \
206 third_party/WebKit/Source/WebCore/platform/network/win \
207 third_party/WebKit/Source/WebCore/platform/qt \
208 third_party/WebKit/Source/WebCore/platform/text/android \
209 third_party/WebKit/Source/WebCore/platform/text/mac \
210 third_party/WebKit/Source/WebCore/platform/text/qt \
211 third_party/WebKit/Source/WebCore/platform/text/win \
212 third_party/WebKit/Source/WebCore/platform/win \
213 third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \
214 third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \
215 third_party/WebKit/Source/WebCore/plugins/mac \
216 third_party/WebKit/Source/WebCore/plugins/qt \
217 third_party/WebKit/Source/WebCore/plugins/win \
218 third_party/WebKit/Source/WebKit/chromium/public/android \
219 third_party/WebKit/Source/WebKit/chromium/public/mac_ \
220 third_party/WebKit/Source/WebKit/chromium/public/platform/android \
221 third_party/WebKit/Source/WebKit/chromium/public/platform/mac \
222 third_party/WebKit/Source/WebKit/chromium/public/platform/win \
223 third_party/WebKit/Source/WebKit/chromium/public/win \
224 third_party/WebKit/Source/WebKit/chromium/src/android \
225 third_party/WebKit/Source/WebKit/chromium/src/mac \
226 third_party/WebKit/Source/WebKit/chromium/src/win \
227 third_party/WebKit/Source/WebKit/gtk/docs \
228 third_party/WebKit/Source/WebKit/mac \
229 third_party/WebKit/Source/WebKit/qt \
230 third_party/WebKit/Source/WebKit/qt/docs \
231 third_party/WebKit/Source/WebKit/qt/examples \
232 third_party/WebKit/Source/WebKit/win \
233 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \
234 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \
235 third_party/WebKit/Source/WebKit2/Platform/mac \
236 third_party/WebKit/Source/WebKit2/Platform/win \
237 third_party/WebKit/Source/WebKit2/PluginProcess/mac \
238 third_party/WebKit/Source/WebKit2/Shared/API/c/mac \
239 third_party/WebKit/Source/WebKit2/Shared/API/c/win \
240 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \
241 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \
242 third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \
243 third_party/WebKit/Source/WebKit2/Shared/cg/win \
244 third_party/WebKit/Source/WebKit2/Shared/mac \
245 third_party/WebKit/Source/WebKit2/Shared/win \
246 third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \
247 third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \
248 third_party/WebKit/Source/WebKit2/UIProcess/API/mac \
249 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \
250 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \
251 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \
252 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \
253 third_party/WebKit/Source/WebKit2/UIProcess/mac \
254 third_party/WebKit/Source/WebKit2/UIProcess/win \
255 third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \
256 third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \
257 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \
258 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \
259 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \
260 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \
261 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \
262 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \
263 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \
264 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \
265 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \
266 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \
267 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \
268 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \
269 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \
270 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \
271 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \
272 third_party/WebKit/Source/WebKit2/WebProcess/mac \
273 third_party/WebKit/Source/WebKit2/WebProcess/win \
274 third_party/WebKit/Source/WebKit2/mac \
275 third_party/WebKit/Source/WebKit2/win \
276 third_party/WebKit/Tools_ \
277 third_party/WebKit/Tools/DumpRenderTree/mac \
278 third_party/WebKit/Tools/DumpRenderTree/qt \
279 third_party/WebKit/Tools/DumpRenderTree/win \
280 third_party/angle/samples/gles2_book \
283 third_party/bspatch \
284 third_party/cacheinvalidation/src/example-app-build \
285 third_party/cacheinvalidation/src/java \
286 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
287 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
288 third_party/cld/encodings/compact_lang_det/win_ \
289 third_party/cros_system_api_ \
290 third_party/ffmpeg/binaries \
291 third_party/ffmpeg/chromium/binaries/Chromium/win \
292 third_party/ffmpeg/chromium/config/Chrome/mac \
293 third_party/ffmpeg/chromium/config/Chrome/win \
294 third_party/ffmpeg/chromium/config/Chromium/mac \
295 third_party/ffmpeg/chromium/config/Chromium/win \
296 third_party/ffmpeg/chromium/include/win \
297 third_party/ffmpeg/doc \
298 third_party/ffmpeg/tools \
299 third_party/fuzzymatch \
300 third_party/gles2_book \
301 third_party/gles_book_examples \
303 third_party/hunspell/dictionaries \
304 third_party/hunspell_dictionaries \
305 third_party/hyphen/doc \
306 third_party/icu/android \
307 third_party/icu/mac \
309 third_party/leveldatabase/src/doc \
310 third_party/leveldatabase/src/port/win \
311 third_party/libjingle/source/talk/examples \
312 third_party/libjpeg_turbo/mac \
313 third_party/libjpeg_turbo/win \
314 third_party/libva/va/android \
315 third_party/libvpx/source/config/mac \
316 third_party/libvpx/source/config/win \
317 third_party/libxml/mac \
318 third_party/lighttpd \
319 third_party/mesa/MesaLib/docs \
320 third_party/mesa/MesaLib/src/gallium/docs \
321 third_party/mozc/chrome/chromeos_ \
322 third_party/npapi/npspy/extern/java \
326 third_party/openssl/config/android \
327 third_party/ots/tools \
328 third_party/pthread \
329 third_party/pyftpdlib \
330 third_party/re2/doc \
332 third_party/sfntly/cpp/src/sfntly/tools \
333 third_party/simplejson \
334 third_party/skia/include/utils/android \
335 third_party/skia/include/utils/ios \
336 third_party/skia/include/utils/mac \
337 third_party/skia/include/utils/win \
338 third_party/skia/include/views/android \
339 third_party/skia/src/gpu/gl/android \
340 third_party/skia/src/gpu/gl/mac \
341 third_party/skia/src/gpu/gl/win \
342 third_party/skia/src/utils/ios \
343 third_party/skia/src/utils/mac \
344 third_party/skia/src/utils/win \
345 third_party/skia/src/views/ios \
346 third_party/skia/src/views/mac \
347 third_party/skia/src/views/win \
348 third_party/snappy/mac \
349 third_party/sqlite/src/doc \
350 third_party/tcmalloc/vendor/doc \
351 third_party/tcmalloc_ \
352 third_party/trace-viewer/examples \
353 third_party/trace-viewer/third_party/pywebsocket/src/example \
354 third_party/v8-i18n/tools_ \
356 third_party/webdriver/pylib/docs \
357 third_party/webrtc/modules/audio_device/android \
358 third_party/webrtc/modules/audio_device/ios \
359 third_party/webrtc/modules/audio_device/main/source/mac \
360 third_party/webrtc/modules/audio_device/main/source/win \
361 third_party/webrtc/modules/audio_device/win \
362 third_party/webrtc/modules/video_capture/android/java \
363 third_party/webrtc/modules/video_capture/main/source/android \
364 third_party/webrtc/modules/video_coding/codecs/tools_ \
365 third_party/webrtc/modules/video_render/android/java \
366 third_party/webrtc/modules/video_render/main/source/android \
367 third_party/webrtc/modules/video_render/main/source/mac \
368 third_party/webrtc/system_wrappers/source/android \
369 third_party/webrtc/tools_ \
370 third_party/yasm/source/config/android \
371 third_party/yasm/source/config/mac \
372 third_party/yasm/source/config/win \
381 tools/wine_valgrind \
388 ui/resources/default_100_percent/cros_ \
389 ui/resources/default_200_percent/cros_ \
394 webkit/media/android \
402 # There are directories we want to strip, but that are unnecessarily required by the build-system
403 # So we drop everything but the gyp/gypi files
404 almost_strip_dirs() {
410 third_party/cros_dbus_cplusplus \
412 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' \) -print -delete || :
416 '!' -iname '*.gyp*' \
417 '!' -path 'tools/build/*' \
418 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
419 '!' -path 'tools/generate_library_loader/*' \
420 '!' -path 'tools/generate_shim_headers/generate_shim_headers.py' \
421 '!' -path 'tools/generate_stubs/*' \
422 '!' -path 'tools/grit/*' \
423 '!' -path 'tools/gritsettings/*' \
424 '!' -path 'tools/gyp/*' \
425 '!' -path 'tools/json_comment_eater.py' \
426 '!' -path 'tools/json_schema_compiler/*' \
427 '!' -path 'tools/json_to_struct/*' \
428 '!' -path 'tools/protoc_wrapper/*' \
429 '!' -path 'tools/uuidgen.py' \
430 '!' -path 'tools/zip2msi.py' \
431 '!' -path 'tools/usb_ids/*' \
436 # list based from archlinux PKGBUILD
437 # https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
438 clean_third_party() {
439 find third_party -type f \! -iname '*.gyp*' \
440 \! -path 'third_party/WebKit/*' \
441 \! -path 'third_party/adobe/flash/*' \
442 \! -path 'third_party/angle/*' \
443 \! -path 'third_party/cacheinvalidation/*' \
444 \! -path 'third_party/cld/*' \
445 \! -path 'third_party/cros_system_api/*' \
446 \! -path 'third_party/ffmpeg/*' \
447 \! -path 'third_party/flac/flac.h' \
448 \! -path 'third_party/flot/*' \
449 \! -path 'third_party/harfbuzz-ng/*' \
450 \! -path 'third_party/harfbuzz/*' \
451 \! -path 'third_party/hunspell/*' \
452 \! -path 'third_party/hyphen/*' \
453 \! -path 'third_party/iccjpeg/*' \
454 \! -path 'third_party/khronos/*' \
455 \! -path 'third_party/leveldatabase/*' \
456 \! -path 'third_party/libXNVCtrl/*' \
457 \! -path 'third_party/libjingle/*' \
458 \! -path 'third_party/libphonenumber/*' \
459 \! -path 'third_party/libusb/libusb.h' \
460 \! -path 'third_party/libva/*' \
461 \! -path 'third_party/libvpx/libvpx.h' \
462 \! -path 'third_party/libxml/chromium/*' \
463 \! -path 'third_party/libyuv/*' \
464 \! -path 'third_party/lss/*' \
465 \! -path 'third_party/mesa/*' \
466 \! -path 'third_party/modp_b64/*' \
467 \! -path 'third_party/mt19937ar/*' \
468 \! -path 'third_party/npapi/*' \
469 \! -path 'third_party/opus/opus.h*' \
470 \! -path 'third_party/ots/*' \
471 \! -path 'third_party/protobuf/*' \
472 \! -path 'third_party/qcms/*' \
473 \! -path 'third_party/re2/*' \
474 \! -path 'third_party/sfntly/*' \
475 \! -path 'third_party/skia/*' \
476 \! -path 'third_party/smhasher/*' \
477 \! -path 'third_party/speex/speex.h' \
478 \! -path 'third_party/sqlite/*' \
479 \! -path 'third_party/tcmalloc/*' \
480 \! -path 'third_party/trace-viewer/*' \
481 \! -path 'third_party/undoview/*' \
482 \! -path 'third_party/v8-i18n/*' \
483 \! -path 'third_party/v8/*' \
484 \! -path 'third_party/webrtc/*' \
485 \! -path 'third_party/widevine/*' \
486 \! -path 'third_party/usb_ids/*' \
489 rm -vf third_party/expat/files/lib/expat.h
492 # parts based on ubuntu debian/rules
493 # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
505 \) -exec rm -fv {} \;
508 # removes dir, if the bcond is not turned off
509 strip_system_dirs() {
513 bcond=$(eval echo \$$lib)
514 [ "${bcond:-1}" = 0 ] && continue
516 # skip already removed dirs
517 test -d $dir || continue
519 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h \) -print -delete
523 # remove test data and files
524 # some scanned with find -name tests -o -name test -o -name test_data -o name testdata
525 # and find -iname *test*
533 breakpad/src/client/windows/tests \
534 breakpad/src/common/linux/tests \
535 breakpad/src/common/tests \
537 chrome/browser/chromeos/bluetooth/test \
538 chrome/browser/component_updater/test \
539 chrome/browser/extensions/api/test_ \
540 chrome/browser/printing/cloud_print/test \
541 chrome/browser/resources/gaia_auth/test \
542 chrome/browser/resources/tracing/tests \
543 chrome/browser/sync/test \
544 chrome/browser/ui/cocoa/test \
545 chrome/browser/ui/gtk/test \
546 chrome/browser/ui/tests \
547 chrome/browser/ui/views/test \
548 chrome/installer/test \
549 chrome/test/chromeos \
550 chrome/test/data/firefox2_nss_mac \
551 chrome/test/data/safe_browsing/old \
552 chrome/test/logging/win \
553 chrome/test/pyautolib/chromeos \
554 chrome/test/webdriver/test \
558 chrome_frame/tools/test \
559 content/browser/worker_host/test \
560 content/common/gpu/testdata \
561 content/public/test \
564 device/bluetooth/test \
566 gpu/command_buffer/tests \
568 media/tools/layout_tests/test_data \
569 native_client/buildbot \
570 native_client/src/shared/platform/testdata \
571 native_client/src/trusted/gio/testdata \
572 native_client/src/trusted/interval_multiset/testdata \
573 native_client/src/trusted/service_runtime/testdata \
574 native_client/src/trusted/validator/x86/decoder/generator/testdata \
575 native_client/src/trusted/validator/x86/testing \
576 native_client/src/trusted/validator_arm/testdata \
577 native_client/src/trusted/validator_mips/testdata \
578 native_client/src/trusted/validator_x86/testdata \
579 native_client/tests \
580 native_client/tools/testdata \
581 native_client/tools/tests \
582 native_client_sdk/src/build_tools/tests \
583 native_client_sdk/src/libraries/c_salt/test \
586 ppapi/native_client/tests \
590 sandbox/linux/seccomp-legacy/tests \
591 sandbox/linux/tests \
594 sdch/open-vcdiff/testdata \
595 seccompsandbox/tests \
596 sync/internal_api/public/test \
597 sync/internal_api/test \
600 testing/gmock/scripts/test \
602 testing/gtest/scripts/test \
604 third_party/WebKit/LayoutTests \
605 third_party/WebKit/Source/JavaScriptCore/API/tests \
606 third_party/WebKit/Source/JavaScriptCore/qt/tests \
607 third_party/WebKit/Source/JavaScriptCore/tests \
608 third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
609 third_party/WebKit/Source/ThirdParty/gtest/test \
610 third_party/WebKit/Source/ThirdParty/gyp/test \
611 third_party/WebKit/Source/ThirdParty/qunit/test \
612 third_party/WebKit/Source/WebCore/bindings/scripts/test \
613 third_party/WebKit/Source/WebCore/testing_ \
614 third_party/WebKit/Source/WebKit/chromium/tests \
615 third_party/WebKit/Source/WebKit/efl/tests \
616 third_party/WebKit/Source/WebKit/gtk/tests \
617 third_party/WebKit/Source/WebKit/qt/tests \
618 third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
619 third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
620 third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
621 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
622 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
623 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
624 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
625 third_party/WebKit/Tools/Scripts/webkitpy/test \
626 third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
627 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
628 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
629 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
630 third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
631 third_party/WebKit/Tools/TestWebKitAPI/mac \
632 third_party/WebKit/Tools/TestWebKitAPI/win \
633 third_party/angle/tests \
634 third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
635 third_party/cacheinvalidation/src/google/cacheinvalidation/test \
636 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
637 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
638 third_party/ffmpeg/tests \
639 third_party/harfbuzz/tests \
640 third_party/hunspell/tests \
641 third_party/hyphen/tests \
642 third_party/libexif/sources/test \
643 third_party/libjingle/source/talk/app/webrtc/test \
644 third_party/libjingle/source/talk/media/testdata \
645 third_party/libphonenumber/src/resources/test \
646 third_party/libphonenumber/src/test \
647 third_party/libsrtp/srtp/crypto/test \
648 third_party/libsrtp/srtp/test \
649 third_party/libyuv/unit_test/testdata \
650 third_party/mesa/MesaLib/src/gallium/tests \
651 third_party/openssl/openssl/crypto/des/t/test \
652 third_party/openssl/openssl/test \
653 third_party/ots/test \
654 third_party/protobuf/src/google/protobuf/testdata \
655 third_party/protobuf/src/google/protobuf/testing \
656 third_party/re2/re2/testing \
657 third_party/safe_browsing/testing \
658 third_party/sfntly/cpp/src/test \
659 third_party/sqlite/src/test \
660 third_party/sqlite/test \
661 third_party/talloc/libreplace/test \
662 third_party/tcmalloc/chromium/src/tests \
663 third_party/tcmalloc/vendor/src/tests \
664 third_party/tlslite/test \
665 third_party/trace-viewer/test_data \
666 third_party/trace-viewer/third_party/pywebsocket/src/test \
667 third_party/trace-viewer/third_party/pywebsocket/src/test/testdata \
668 third_party/v8-i18n/tests \
669 third_party/webdriver/pylib/test \
670 third_party/webdriver/test_data \
671 third_party/webrtc/modules/audio_device/test/android \
672 third_party/webrtc/modules/audio_processing/test/android \
673 third_party/webrtc/modules/utility/test \
674 third_party/webrtc/modules/video_capture/main/test/android \
675 third_party/webrtc/system_wrappers/test \
676 third_party/webrtc/test \
677 third_party/webrtc/test/testsupport/mac \
678 third_party/webrtc/video_engine/test/android \
679 third_party/webrtc/video_engine/test/auto_test/android \
680 third_party/webrtc/voice_engine/test/android \
681 third_party/xdg-utils/tests \
682 third_party/yasm/source/patched-yasm/libyasm/tests \
683 third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
684 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
685 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
686 third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
687 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
688 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
689 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
690 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
691 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
692 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
693 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
694 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
695 third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
696 third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
697 third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
698 third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
699 third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
700 third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
701 tools/clang/plugins/tests \
702 tools/grit/grit/testdata \
704 tools/gyp/tools/emacs/testdata \
705 tools/page_cycler/webpagereplay/tests \
706 tools/perf_expectations/tests \
707 tools/swarm_client/tests \
716 webkit/compositor_bindings/test \
717 webkit/data/layout_tests \
718 webkit/plugins/npapi/test \
719 webkit/tools/test/reference_build \
720 webkit/tools/test_shell/mac \
725 # partial remove (keep .gyp)
727 chrome/browser/nacl_host/test \
730 third_party/webrtc/modules/audio_coding/codecs/cng/test \
731 third_party/webrtc/modules/audio_coding/codecs/g711/test \
732 third_party/webrtc/modules/audio_coding/codecs/g722/test \
733 third_party/webrtc/modules/audio_coding/codecs/ilbc/test \
734 third_party/webrtc/modules/audio_coding/codecs/isac/fix/test \
735 third_party/webrtc/modules/audio_coding/codecs/isac/main/test \
736 third_party/webrtc/modules/audio_coding/main/test \
737 third_party/webrtc/modules/audio_coding/neteq/test \
738 third_party/webrtc/modules/audio_conference_mixer/test \
739 third_party/webrtc/modules/audio_device/test \
740 third_party/webrtc/modules/audio_processing/test \
741 third_party/webrtc/modules/rtp_rtcp/test \
742 third_party/webrtc/modules/udp_transport/test \
743 third_party/webrtc/modules/video_capture/main/test \
744 third_party/webrtc/modules/video_coding/codecs/test \
745 third_party/webrtc/modules/video_coding/codecs/vp8/test \
746 third_party/webrtc/modules/video_coding/main/test \
747 third_party/webrtc/modules/video_processing/main/test \
748 third_party/webrtc/modules/video_render/main/test \
749 third_party/webrtc/video_engine/test \
750 third_party/webrtc/voice_engine/test \
751 tools/json_schema_compiler/test \
753 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
756 # link headers from system dir. too many files to patch, we don't even build tests
757 install -d testing/gtest/include
758 ln -s /usr/include/gtest testing/gtest/include/gtest
760 # delete unittest files
762 -name '*_unittest*.*' \
763 -name '*_unittest.*' \
765 -o -name '*_test.*' \
766 ')' '!' -name '*.gyp*' \
767 '!' -path './native_client/src/trusted/service_runtime/env_cleanser_test.h' \
768 '!' -path './chrome/browser/diagnostics/diagnostics_test.*' \
769 '!' -path './chrome/test/perf/perf_test.*' \
770 '!' -path './chrome/test/perf/browser_perf_test.*' \
771 '!' -path './remoting/base/resources_unittest.*' \
775 remove_nonessential_dirs > REMOVED-nonessential_dirs.txt
776 almost_strip_dirs > REMOVED-stripped.txt
777 remove_bin_only > REMOVED-bin_only.txt
778 remove_tests > REMOVED-tests.txt
781 native_client/src/third_party_mod/jsoncpp \
785 third_party/jsoncpp \
786 third_party/libXNVCtrl \
787 third_party/libevent \
788 third_party/libexif \
789 third_party/libjpeg \
792 third_party/libsrtp \
795 third_party/libwebp \
796 third_party/libxml_ \
797 third_party/libxslt \
799 third_party/protobuf \
804 > REMOVED-system_dirs.txt
806 clean_third_party > REMOVED-third_party.txt
808 if [ "${v8:-1}" != "0" ]; then
809 # The implementation files include v8 headers with full path,
810 # like #include "v8/include/v8.h". Make sure the system headers
813 ln -s /usr/include v8/include
816 if [ "${nacl:-1}" != "0" ]; then
817 # NOTE: here is always x86_64
818 rm -rf native_client/toolchain/linux_x86_newlib
821 if [ "${emptydirs:-0}" != "0" ]; then
823 find -type d '!' -name '.' -print0 | sort -zr | xargs -0 rmdir --ignore-fail-on-non-empty > REMOVED-dirs.txt
826 # report what's in them
827 for a in REMOVED-*.txt; do