Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1229)

Side by Side Diff: Makefile

Issue 8580046: Make tests more reliable
Patch Set: Make tests more reliable Created 11 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | [revision details] » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Makefile debugging hack: uncomment the two lines below and make will tell you 1 # Makefile debugging hack: uncomment the two lines below and make will tell you
2 # more about what is happening. The output generated is of the form 2 # more about what is happening. The output generated is of the form
3 # "FILE:LINE [TARGET (DEPENDENCIES) (NEWER)]" where DEPENDENCIES are all the 3 # "FILE:LINE [TARGET (DEPENDENCIES) (NEWER)]" where DEPENDENCIES are all the
4 # things TARGET depends on and NEWER are all the files that are newer than 4 # things TARGET depends on and NEWER are all the files that are newer than
5 # TARGET. DEPENDENCIES will be colored green and NEWER will be blue. 5 # TARGET. DEPENDENCIES will be colored green and NEWER will be blue.
6 # 6 #
7 #OLD_SHELL := $(SHELL) 7 #OLD_SHELL := $(SHELL)
8 #SHELL = $(warning [$@ ($^) ($?) ])$(OLD_SHELL) 8 #SHELL = $(warning [$@ ($^) ($?) ])$(OLD_SHELL)
9 9
10 # Build a target for JavaScript files. The find command excludes directories 10 # Build a target for JavaScript files. The find command excludes directories
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 endif 115 endif
116 endif 116 endif
117 endif 117 endif
118 ### End of release-specific variables ### 118 ### End of release-specific variables ###
119 TEMPLATE_TARGETS=$(shell find app/templates -type f ! -name '.*' ! -name '*.swp' ! -name '*~' ! -name '\#*' -print) 119 TEMPLATE_TARGETS=$(shell find app/templates -type f ! -name '.*' ! -name '*.swp' ! -name '*~' ! -name '\#*' -print)
120 120
121 SPRITE_SOURCE_FILES=$(shell find app/assets/images -type f ! -name '.*' ! -name '*.swp' ! -name '*~' ! -name '\#*' -print) 121 SPRITE_SOURCE_FILES=$(shell find app/assets/images -type f ! -name '.*' ! -name '*.swp' ! -name '*~' ! -name '\#*' -print)
122 SPRITE_GENERATED_FILES=build-shared/juju-ui/assets/sprite.css \ 122 SPRITE_GENERATED_FILES=build-shared/juju-ui/assets/sprite.css \
123 build-shared/juju-ui/assets/sprite.png 123 build-shared/juju-ui/assets/sprite.png
124 NON_SPRITE_IMAGES=build-shared/juju-ui/assets/images 124 NON_SPRITE_IMAGES=build-shared/juju-ui/assets/images
125 BUILD_FILES=build-shared/juju-ui/assets/app.js \ 125 BUILD_FILES=build-shared/juju-ui/assets/modules.js \
126 build-shared/juju-ui/assets/all-yui.js \ 126 build-shared/juju-ui/assets/all-yui.js \
127 build-shared/juju-ui/assets/combined-css/all-static.css 127 build-shared/juju-ui/assets/combined-css/all-static.css
128 JAVASCRIPT_LIBRARIES=app/assets/javascripts/d3.v2.js \ 128 JAVASCRIPT_LIBRARIES=app/assets/javascripts/d3.v2.js \
129 app/assets/javascripts/d3.v2.min.js app/assets/javascripts/yui 129 app/assets/javascripts/d3.v2.min.js app/assets/javascripts/yui
130 DATE=$(shell date -u) 130 DATE=$(shell date -u)
131 APPCACHE=build-shared/juju-ui/assets/manifest.appcache 131 APPCACHE=build-shared/juju-ui/assets/manifest.appcache
132 132
133 # Some environments, notably sudo, do not populate the default PWD environment 133 # Some environments, notably sudo, do not populate the default PWD environment
134 # variable, which is used to set $(PWD). Worse, in some situations, such as 134 # variable, which is used to set $(PWD). Worse, in some situations, such as
135 # using make -C [directory], $(PWD) is set to a value we don't want: the 135 # using make -C [directory], $(PWD) is set to a value we don't want: the
(...skipping 11 matching lines...) Expand all
147 @echo "[no target] or build: build the debug and production environments " 147 @echo "[no target] or build: build the debug and production environments "
148 @echo "devel: run the development environment (dynamic templates/CSS)" 148 @echo "devel: run the development environment (dynamic templates/CSS)"
149 @echo "debug: run the debugging environment (static templates/CSS)" 149 @echo "debug: run the debugging environment (static templates/CSS)"
150 @echo "prod: run the production environment (aggregated, compressed file s)" 150 @echo "prod: run the production environment (aggregated, compressed file s)"
151 @echo "clean: remove the generated build directories" 151 @echo "clean: remove the generated build directories"
152 @echo "clean-all: remove build, deps and doc directories" 152 @echo "clean-all: remove build, deps and doc directories"
153 @echo "test-debug: run tests on the cli from the debug environment" 153 @echo "test-debug: run tests on the cli from the debug environment"
154 @echo "test-prod: run tests on the cli from the production environment" 154 @echo "test-prod: run tests on the cli from the production environment"
155 @echo "test-misc: run tests of project infrastructure bits" 155 @echo "test-misc: run tests of project infrastructure bits"
156 @echo "test-server: run tests in the browser from the debug environment" 156 @echo "test-server: run tests in the browser from the debug environment"
157 @echo "test-prod-server: run tests in the browser from the prod environm ent"
157 @echo "prep: beautify and lint the source" 158 @echo "prep: beautify and lint the source"
158 @echo "docs: generate project and code documentation" 159 @echo "docs: generate project and code documentation"
159 @echo "view-docs: generate both doc sets and view them in the browser" 160 @echo "view-docs: generate both doc sets and view them in the browser"
160 @echo "help: this description" 161 @echo "help: this description"
161 @echo "Other targets are available, see the Makefile." 162 @echo "Other targets are available, see the Makefile."
162 163
163 build-shared/juju-ui/templates.js: $(TEMPLATE_TARGETS) bin/generateTemplates 164 build-shared/juju-ui/templates.js: $(TEMPLATE_TARGETS) bin/generateTemplates
164 mkdir -p build-shared/juju-ui/assets 165 mkdir -p build-shared/juju-ui/assets
165 bin/generateTemplates 166 bin/generateTemplates
166 167
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 ln -sf "$(PWD)/node_modules/yui/slider-base/assets/skins/sam/rail-x.png" \ 284 ln -sf "$(PWD)/node_modules/yui/slider-base/assets/skins/sam/rail-x.png" \
284 build-shared/juju-ui/assets/combined-css/rail-x.png 285 build-shared/juju-ui/assets/combined-css/rail-x.png
285 bin/merge-files 286 bin/merge-files
286 mv *.js.map build-shared/juju-ui/assets/ 287 mv *.js.map build-shared/juju-ui/assets/
287 288
288 build-files: $(BUILD_FILES) 289 build-files: $(BUILD_FILES)
289 290
290 # This leaves out all of the individual YUI assets, because we can't have them 291 # This leaves out all of the individual YUI assets, because we can't have them
291 # the first time the Makefile is run in a clean tree. 292 # the first time the Makefile is run in a clean tree.
292 shared-link-files-list=build-$(1)/juju-ui/assets/combined-css \ 293 shared-link-files-list=build-$(1)/juju-ui/assets/combined-css \
293 » build-$(1)/favicon.ico build-$(1)/index.html \ 294 » build-$(1)/favicon.ico \
294 » build-$(1)/juju-ui/assets/config.js build-$(1)/juju-ui/assets/modules.js \ 295 » build-$(1)/index.html \
295 » build-$(1)/juju-ui/assets/images build-$(1)/juju-ui/assets/svgs \ 296 » build-$(1)/juju-ui/assets/config.js \
296 » build-$(1)/juju-ui/assets/app.js build-$(1)/juju-ui/version.js \ 297 » build-$(1)/juju-ui/assets/modules.js \
298 » build-$(1)/juju-ui/assets/images \
299 » build-$(1)/juju-ui/assets/svgs \
300 » build-$(1)/juju-ui/version.js \
297 build-$(1)/juju-ui/assets/manifest.appcache \ 301 build-$(1)/juju-ui/assets/manifest.appcache \
298 build-$(1)/juju-ui/assets/combined-css/all-static.css \ 302 build-$(1)/juju-ui/assets/combined-css/all-static.css \
299 build-$(1)/juju-ui/assets/juju-gui.css \ 303 build-$(1)/juju-ui/assets/juju-gui.css \
300 build-$(1)/juju-ui/assets/sprite.css \ 304 build-$(1)/juju-ui/assets/sprite.css \
301 build-$(1)/juju-ui/assets/sprite.png \ 305 build-$(1)/juju-ui/assets/sprite.png \
302 build-$(1)/juju-ui/assets/combined-css/rail-x.png \ 306 build-$(1)/juju-ui/assets/combined-css/rail-x.png \
303 build-$(1)/juju-ui/assets/all-yui.js 307 build-$(1)/juju-ui/assets/all-yui.js
304 308
305 LINK_DEBUG_FILES=$(call shared-link-files-list,debug) \ 309 LINK_DEBUG_FILES=$(call shared-link-files-list,debug) \
306 » build-debug/juju-ui/app.js build-debug/juju-ui/models \ 310 » build-debug/juju-ui/app.js \
307 » build-debug/juju-ui/store build-debug/juju-ui/subapps \ 311 » build-debug/juju-ui/models \
312 » build-debug/juju-ui/store \
313 » build-debug/juju-ui/subapps \
308 build-debug/juju-ui/views \ 314 build-debug/juju-ui/views \
309 » build-debug/juju-ui/widgets build-debug/juju-ui/assets/javascripts \ 315 » build-debug/juju-ui/widgets \
316 » build-debug/juju-ui/assets/javascripts \
310 build-debug/juju-ui/templates.js 317 build-debug/juju-ui/templates.js
311 318
312 LINK_PROD_FILES=$(call shared-link-files-list,prod) 319 LINK_PROD_FILES=$(call shared-link-files-list,prod)
313 320
314 # These are shared instructions between link-debug-files and link-prod-files. 321 # These are shared instructions between link-debug-files and link-prod-files.
315 define link-files 322 define link-files
316 mkdir -p build-$(1)/juju-ui/assets/combined-css 323 mkdir -p build-$(1)/juju-ui/assets/combined-css
317 ln -sf "$(PWD)/app/favicon.ico" build-$(1)/ 324 ln -sf "$(PWD)/app/favicon.ico" build-$(1)/
318 ln -sf "$(PWD)/app/index.html" build-$(1)/ 325 ln -sf "$(PWD)/app/index.html" build-$(1)/
319 ln -sf "$(PWD)/app/config-$(1).js" build-$(1)/juju-ui/assets/config.js 326 ln -sf "$(PWD)/app/config-$(1).js" build-$(1)/juju-ui/assets/config.js
320 ln -sf "$(PWD)/app/modules-$(1).js" build-$(1)/juju-ui/assets/modules.js
321 ln -sf "$(PWD)/app/assets/images" build-$(1)/juju-ui/assets/ 327 ln -sf "$(PWD)/app/assets/images" build-$(1)/juju-ui/assets/
322 ln -sf "$(PWD)/app/assets/svgs" build-$(1)/juju-ui/assets/ 328 ln -sf "$(PWD)/app/assets/svgs" build-$(1)/juju-ui/assets/
323 ln -sf "$(PWD)/app/assets/javascripts" build-$(1)/juju-ui/assets/ 329 ln -sf "$(PWD)/app/assets/javascripts" build-$(1)/juju-ui/assets/
324 ln -sf "$(PWD)/build-shared/juju-ui/version.js" build-$(1)/juju-ui/ 330 ln -sf "$(PWD)/build-shared/juju-ui/version.js" build-$(1)/juju-ui/
325 ln -sf "$(PWD)/build-shared/juju-ui/assets/app.js" build-$(1)/juju-ui/as sets/
326 ln -sf "$(PWD)/build-shared/juju-ui/assets/manifest.appcache" \ 331 ln -sf "$(PWD)/build-shared/juju-ui/assets/manifest.appcache" \
327 build-$(1)/juju-ui/assets/ 332 build-$(1)/juju-ui/assets/
328 ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/all-static.css" \ 333 ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/all-static.css" \
329 build-$(1)/juju-ui/assets/combined-css/ 334 build-$(1)/juju-ui/assets/combined-css/
330 ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/rail-x.png" \ 335 ln -sf "$(PWD)/build-shared/juju-ui/assets/combined-css/rail-x.png" \
331 build-$(1)/juju-ui/assets/combined-css/ 336 build-$(1)/juju-ui/assets/combined-css/
332 ln -sf "$(PWD)/build-shared/juju-ui/assets/juju-gui.css" build-$(1)/juju -ui/assets/ 337 ln -sf "$(PWD)/build-shared/juju-ui/assets/juju-gui.css" build-$(1)/juju -ui/assets/
333 ln -sf "$(PWD)/build-shared/juju-ui/assets/sprite.css" build-$(1)/juju-u i/assets/ 338 ln -sf "$(PWD)/build-shared/juju-ui/assets/sprite.css" build-$(1)/juju-u i/assets/
334 ln -sf "$(PWD)/build-shared/juju-ui/assets/sprite.png" build-$(1)/juju-u i/assets/ 339 ln -sf "$(PWD)/build-shared/juju-ui/assets/sprite.png" build-$(1)/juju-u i/assets/
335 ln -sf "$(PWD)/node_modules/yui/event-simulate/event-simulate.js" \ 340 ln -sf "$(PWD)/node_modules/yui/event-simulate/event-simulate.js" \
(...skipping 16 matching lines...) Expand all
352 $(call link-files,debug) 357 $(call link-files,debug)
353 ln -sf "$(PWD)/app/app.js" build-debug/juju-ui/ 358 ln -sf "$(PWD)/app/app.js" build-debug/juju-ui/
354 ln -sf "$(PWD)/app/models" build-debug/juju-ui/ 359 ln -sf "$(PWD)/app/models" build-debug/juju-ui/
355 ln -sf "$(PWD)/app/store" build-debug/juju-ui/ 360 ln -sf "$(PWD)/app/store" build-debug/juju-ui/
356 ln -sf "$(PWD)/app/subapps" build-debug/juju-ui/ 361 ln -sf "$(PWD)/app/subapps" build-debug/juju-ui/
357 ln -sf "$(PWD)/app/views" build-debug/juju-ui/ 362 ln -sf "$(PWD)/app/views" build-debug/juju-ui/
358 ln -sf "$(PWD)/app/widgets" build-debug/juju-ui/ 363 ln -sf "$(PWD)/app/widgets" build-debug/juju-ui/
359 ln -sf "$(PWD)/app/assets/javascripts/yui/yui/yui-debug.js" \ 364 ln -sf "$(PWD)/app/assets/javascripts/yui/yui/yui-debug.js" \
360 build-debug/juju-ui/assets/all-yui.js 365 build-debug/juju-ui/assets/all-yui.js
361 ln -sf "$(PWD)/build-shared/juju-ui/templates.js" build-debug/juju-ui/ 366 ln -sf "$(PWD)/build-shared/juju-ui/templates.js" build-debug/juju-ui/
367 ln -sf "$(PWD)/app/modules-debug.js" build-debug/juju-ui/assets/modules. js
362 368
363 $(LINK_PROD_FILES): 369 $(LINK_PROD_FILES):
364 $(call link-files,prod) 370 $(call link-files,prod)
365 ln -sf "$(PWD)/build-shared/juju-ui/assets/all-yui.js" build-prod/juju-u i/assets/ 371 ln -sf "$(PWD)/build-shared/juju-ui/assets/all-yui.js" build-prod/juju-u i/assets/
366 ln -sf "$(PWD)"/build-shared/juju-ui/assets/*.js.map build-prod/juju-ui/ assets/ 372 ln -sf "$(PWD)"/build-shared/juju-ui/assets/*.js.map build-prod/juju-ui/ assets/
367 # Link in the application source code so source maps work. 373 # Link in the application source code so source maps work.
368 mkdir -p $(PWD)/build-prod/juju-ui/assets/source 374 mkdir -p $(PWD)/build-prod/juju-ui/assets/source
369 ln -s $(PWD)/app $(PWD)/build-prod/juju-ui/assets/source 375 ln -s $(PWD)/app $(PWD)/build-prod/juju-ui/assets/source
370 ln -s $(PWD)/node_modules $(PWD)/build-prod/juju-ui/assets/source 376 ln -s $(PWD)/node_modules $(PWD)/build-prod/juju-ui/assets/source
377 ln -sf "$(PWD)/build-shared/juju-ui/assets/modules.js" build-prod/juju-u i/assets/modules.js
371 378
372 prep: beautify lint 379 prep: beautify lint
373 380
374 test/extracted_startup_code: app/index.html 381 test/extracted_startup_code: app/index.html
375 # Pull the JS out of the index so we can run tests against it. 382 # Pull the JS out of the index so we can run tests against it.
376 cat app/index.html | \ 383 cat app/index.html | \
377 sed -n '/<script id="app-startup">/,/<\/script>/p'| \ 384 sed -n '/<script id="app-startup">/,/<\/script>/p'| \
378 head -n-1 | tail -n+2 > test/extracted_startup_code 385 head -n-1 | tail -n+2 > test/extracted_startup_code
379 386
380 test/test_startup.js: test/test_startup.js.top test/test_startup.js.bottom \ 387 test/test_startup.js: test/test_startup.js.top test/test_startup.js.bottom \
(...skipping 12 matching lines...) Expand all
393 400
394 test-debug: build-debug test-prep 401 test-debug: build-debug test-prep
395 ./test-server.sh debug 402 ./test-server.sh debug
396 403
397 test-prod: build-prod test-prep 404 test-prod: build-prod test-prep
398 ./test-server.sh prod 405 ./test-server.sh prod
399 406
400 test-server: build-debug test-prep 407 test-server: build-debug test-prep
401 ./test-server.sh debug true 408 ./test-server.sh debug true
402 409
410 test-prod-server: build-prod test-prep
411 ./test-server.sh prod true
412
403 test-misc: 413 test-misc:
404 PYTHONPATH=lib python test/test_deploy_charm_for_testing.py 414 PYTHONPATH=lib python test/test_deploy_charm_for_testing.py
405 415
406 test: 416 test:
407 @echo "Deprecated. Please run either 'make test-prod' or 'make" 417 @echo "Deprecated. Please run either 'make test-prod' or 'make"
408 @echo "test-debug', to test the production or debug environments" 418 @echo "test-debug', to test the production or debug environments"
409 @echo "respectively. Run 'make help' to list the main available " 419 @echo "respectively. Run 'make help' to list the main available "
410 @echo "targets." 420 @echo "targets."
411 421
412 server: 422 server:
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 appcache-force: appcache-touch $(APPCACHE) 546 appcache-force: appcache-touch $(APPCACHE)
537 547
538 # targets are alphabetically sorted, they like it that way :-) 548 # targets are alphabetically sorted, they like it that way :-)
539 .PHONY: appcache-force appcache-touch beautify build build-files \ 549 .PHONY: appcache-force appcache-touch beautify build build-files \
540 build-devel clean clean-all clean-deps clean-docs code-doc debug \ 550 build-devel clean clean-all clean-deps clean-docs code-doc debug \
541 devel docs dist gjslint help jshint lint main-doc prep prod recess \ 551 devel docs dist gjslint help jshint lint main-doc prep prod recess \
542 server spritegen test test-debug test-prep test-prod undocumented \ 552 server spritegen test test-debug test-prep test-prod undocumented \
543 view-code-doc view-docs view-main-doc yuidoc-lint 553 view-code-doc view-docs view-main-doc yuidoc-lint
544 554
545 .DEFAULT_GOAL := all 555 .DEFAULT_GOAL := all
OLDNEW
« no previous file with comments | « no previous file | [revision details] » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b