Merge lp:~stephen-stewart/snapweb/nobody-puts-baby-in-the-corner into lp:~snappy-dev/snapweb/trunk

Proposed by Stephen Stewart
Status: Merged
Approved by: John Lenton
Approved revision: 128
Merged at revision: 123
Proposed branch: lp:~stephen-stewart/snapweb/nobody-puts-baby-in-the-corner
Merge into: lp:~snappy-dev/snapweb/trunk
Diff against target: 181 lines (+29/-21)
6 files modified
README.md (+0/-1)
build.sh (+1/-1)
gulpfile.js (+13/-13)
karma.conf.js (+3/-3)
package.json (+2/-2)
run-checks (+10/-1)
To merge this branch: bzr merge lp:~stephen-stewart/snapweb/nobody-puts-baby-in-the-corner
Reviewer Review Type Date Requested Status
John Lenton (community) Approve
Review via email: mp+258466@code.launchpad.net

Commit message

move npm to project root, run js tests in run-checks, use phantomjs by default

Description of the change

based on this lp:~chipaca/webdm/www-tests
but bzr complained about criss cross merges

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

I can ignore those warnings.

review: Approve
Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :
Download full text (4.1 KiB)

The attempt to merge lp:~stephen-stewart/webdm/nobody-puts-baby-in-the-corner into lp:webdm failed. Below is the output from the failed tests.

Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.com/gorilla/mux failed; trying to fetch newer version
update github.com/juju/loggo failed; trying to fetch newer version
github.com/gorilla/mux now at e444e69cbd2e2e3e0749a2f3c717cec491552bbf
update github.com/mvo5/goconfigparser failed; trying to fetch newer version
github.com/juju/loggo now at 4c7cbce140ca070eeb59a28f4bf9507e511711f9
update github.com/blakesmith/ar failed; trying to fetch newer version
github.com/mvo5/goconfigparser now at 26426272dda20cc76aa1fa44286dc743d2972fe8
update github.com/cheggaaa/pb failed; trying to fetch newer version
github.com/blakesmith/ar now at c9a977dd0cc1392b023382c7bfa5a22af8d3b730
update github.com/gorilla/context failed; trying to fetch newer version
github.com/cheggaaa/pb now at e8c7cc515bfde3e267957a3b110080ceed51354e
update gopkg.in/check.v1 failed; trying to fetch newer version
github.com/gorilla/context now at 50c25fb3b2b3b3cc724e9b6ac75fb44b3bccd0da
update gopkg.in/yaml.v2 failed; trying to fetch newer version
gopkg.in/check.v1 now at 64131543e7896d5bcc6bd5a76287eb75ea96c673
update launchpad.net/snappy failed; trying to fetch newer version
gopkg.in/yaml.v2 now at 49c95bdc21843256fb6c4e0d370a05f24a0bf213
launchpad.net/snappy now at snappy_tarmac-20150506140221-gy35a67lv7tmc0nl
Building
Obtaining npm dependencies
Running tests from /tmp/tmp.AoOqxvSfIg/src/launchpad.net/webdm
? launchpad.net/webdm/cmd/snappyd [no test files]
? launchpad.net/webdm/oem [no test files]
=== RUN Test
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
2015/05/07 06:01:53 Icon path for installed package cannot be set the icon does not exist
WARNING: cannot create /tmp/check-7854551822259482610/1/badDataPath/icons
OK: 15 passed
--- PASS: Test (0.01 seconds)
PASS
coverage: 38.8% of statements
ok launchpad.net/webdm/snappy 0.014s coverage: 38.8% of statements
? launchpad.net/webdm/webprogress [no test files]
Running vet
Running lint
Running js unit tests (set JS_TESTER to over...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== renamed file 'www/.jscsrc' => '.jscsrc'
=== modified file 'README.md'
--- README.md 2015-05-06 15:54:38 +0000
+++ README.md 2015-05-07 10:34:41 +0000
@@ -32,7 +32,6 @@
32Install:32Install:
3333
34 npm install -g --prefix=$(npm config get prefix) gulp34 npm install -g --prefix=$(npm config get prefix) gulp
35 cd ./www
36 npm install35 npm install
3736
38## Building37## Building
3938
=== modified file 'build.sh'
--- build.sh 2015-05-01 10:01:09 +0000
+++ build.sh 2015-05-07 10:34:41 +0000
@@ -39,7 +39,7 @@
39}39}
4040
41echo "Building web assets with gulp..."41echo "Building web assets with gulp..."
42gulp --gulpfile www/gulpfile.js42gulp
4343
44orig_pwd=$(pwd)44orig_pwd=$(pwd)
4545
4646
=== renamed file 'www/gulpfile.js' => 'gulpfile.js'
--- www/gulpfile.js 2015-04-30 14:44:46 +0000
+++ gulpfile.js 2015-05-07 10:34:41 +0000
@@ -24,11 +24,11 @@
24});24});
2525
26gulp.task('js:clean', function(cb) {26gulp.task('js:clean', function(cb) {
27 del(['public/js'], cb);27 del(['www/public/js'], cb);
28});28});
2929
30function createBundler(watch) {30function createBundler(watch) {
31 var bundler = browserify('./src/js/app.js', {31 var bundler = browserify('./www/src/js/app.js', {
32 cache: {},32 cache: {},
33 packageCache: {}33 packageCache: {}
34 });34 });
@@ -55,11 +55,11 @@
55 .pipe(sourcemaps.init({loadMaps: true})) // loads map from browserify file55 .pipe(sourcemaps.init({loadMaps: true})) // loads map from browserify file
56 .pipe(uglify())56 .pipe(uglify())
57 .pipe(sourcemaps.write('./')) // writes .map file57 .pipe(sourcemaps.write('./')) // writes .map file
58 .pipe(gulp.dest('./public/js/'));58 .pipe(gulp.dest('www/public/js/'));
59}59}
6060
61gulp.task('js:lint', function() {61gulp.task('js:lint', function() {
62 return gulp.src(['src/js/**/*.js'])62 return gulp.src(['www/src/js/**/*.js'])
63 .pipe(jscs())63 .pipe(jscs())
64 .on('error', function(err) {64 .on('error', function(err) {
65 gutil.log(gutil.colors.green(err));65 gutil.log(gutil.colors.green(err));
@@ -71,33 +71,33 @@
71// Styles71// Styles
7272
73gulp.task('styles', ['styles:clean'], function() {73gulp.task('styles', ['styles:clean'], function() {
74 return gulp.src(['node_modules/normalize.css/normalize.css', 'src/css/**/*.css'])74 return gulp.src(['node_modules/normalize.css/normalize.css', 'www/src/css/**/*.css'])
75 .pipe(csso())75 .pipe(csso())
76 .pipe(autoprefixer())76 .pipe(autoprefixer())
77 .pipe(concat('webdm.css'))77 .pipe(concat('webdm.css'))
78 .pipe(gulp.dest('public/css'));78 .pipe(gulp.dest('www/public/css'));
79});79});
8080
81gulp.task('styles:clean', function(cb) {81gulp.task('styles:clean', function(cb) {
82 del(['public/css'], cb);82 del(['www/public/css'], cb);
83});83});
8484
85// Images85// Images
8686
87gulp.task('images', ['images:clean'], function() {87gulp.task('images', ['images:clean'], function() {
88 gulp.src(['src/images/**/*'])88 gulp.src(['www/src/images/**/*'])
89 .pipe(imagemin())89 .pipe(imagemin())
90 .pipe(gulp.dest('public/images'));90 .pipe(gulp.dest('www/public/images'));
91});91});
9292
93gulp.task('images:clean', function(cb) {93gulp.task('images:clean', function(cb) {
94 del(['public/images'], cb);94 del(['www/public/images'], cb);
95});95});
9696
97gulp.task('watch', ['js:watch', 'styles', 'images'], function() {97gulp.task('watch', ['js:watch', 'styles', 'images'], function() {
98 gulp.watch('src/images/**/*.{svg,png,jpg,jpeg}', ['images']);98 gulp.watch('www/src/images/**/*.{svg,png,jpg,jpeg}', ['images']);
99 gulp.watch('src/css/**/*.css', ['styles']);99 gulp.watch('www/src/css/**/*.css', ['styles']);
100 gulp.watch('src/js/**/*.js', ['js:lint']);100 gulp.watch('www/src/js/**/*.js', ['js:lint']);
101});101});
102102
103gulp.task('default', ['js:build', 'styles', 'images']);103gulp.task('default', ['js:build', 'styles', 'images']);
104104
=== renamed file 'www/karma.conf.js' => 'karma.conf.js'
--- www/karma.conf.js 2015-04-21 08:29:53 +0000
+++ karma.conf.js 2015-05-07 10:34:41 +0000
@@ -21,7 +21,7 @@
21 served: true21 served: true
22 },22 },
23 **/23 **/
24 'tests/**/*Spec.js'24 'www/tests/**/*Spec.js'
25 ],25 ],
2626
27 // list of files to exclude27 // list of files to exclude
@@ -31,7 +31,7 @@
31 // preprocess matching files before serving them to the browser31 // preprocess matching files before serving them to the browser
32 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor32 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
33 preprocessors: {33 preprocessors: {
34 'tests/**/*.js': ['browserify']34 'www/tests/**/*.js': ['browserify']
35 },35 },
3636
37 // test results reporter to use37 // test results reporter to use
@@ -54,7 +54,7 @@
5454
55 // start these browsers55 // start these browsers
56 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher56 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
57 browsers: ['Chrome'],57 browsers: ['PhantomJS'],
5858
59 // Continuous Integration mode59 // Continuous Integration mode
60 // if true, Karma captures browsers, runs the tests and exits60 // if true, Karma captures browsers, runs the tests and exits
6161
=== renamed file 'www/package.json' => 'package.json'
--- www/package.json 2015-04-23 16:31:31 +0000
+++ package.json 2015-05-07 10:34:41 +0000
@@ -34,9 +34,9 @@
34 "karma-jasmine-ajax": "^0.1.12",34 "karma-jasmine-ajax": "^0.1.12",
35 "karma-phantomjs-launcher": "~0.1.4",35 "karma-phantomjs-launcher": "~0.1.4",
36 "lodash": "~3.3.1",36 "lodash": "~3.3.1",
37 "normalize.css": "^3.0.3",
37 "vinyl-buffer": "~1.0.0",38 "vinyl-buffer": "~1.0.0",
38 "vinyl-source-stream": "~1.1.0",39 "vinyl-source-stream": "~1.1.0",
39 "watchify": "~3.1.2",40 "watchify": "~3.1.2"
40 "normalize.css": "^3.0.3"
41 }41 }
42}42}
4343
=== modified file 'run-checks'
--- run-checks 2015-05-03 20:46:35 +0000
+++ run-checks 2015-05-07 10:34:41 +0000
@@ -33,6 +33,10 @@
33echo Building33echo Building
34go build -v launchpad.net/webdm/...34go build -v launchpad.net/webdm/...
3535
36# www
37echo Obtaining npm dependencies
38npm install && npm update
39
3640
37# tests41# tests
38echo Running tests from $(pwd)42echo Running tests from $(pwd)
@@ -43,7 +47,7 @@
43echo Running vet47echo Running vet
44go vet ./...48go vet ./...
4549
46 golint50# golint
47echo Running lint51echo Running lint
48lint=$(golint ./...)52lint=$(golint ./...)
49if [ -n "$lint" ]; then53if [ -n "$lint" ]; then
@@ -52,4 +56,9 @@
52 exit 156 exit 1
53fi57fi
5458
59# js unit tests
60echo "Running js unit tests (set JS_TESTER to override)"
61${JS_TESTER:- ./node_modules/karma/bin/karma start --single-run}
62
63
55echo "All good, what could possibly go wrong"64echo "All good, what could possibly go wrong"

Subscribers

People subscribed via source and target branches