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
1=== renamed file 'www/.jscsrc' => '.jscsrc'
2=== modified file 'README.md'
3--- README.md 2015-05-06 15:54:38 +0000
4+++ README.md 2015-05-07 10:34:41 +0000
5@@ -32,7 +32,6 @@
6 Install:
7
8 npm install -g --prefix=$(npm config get prefix) gulp
9- cd ./www
10 npm install
11
12 ## Building
13
14=== modified file 'build.sh'
15--- build.sh 2015-05-01 10:01:09 +0000
16+++ build.sh 2015-05-07 10:34:41 +0000
17@@ -39,7 +39,7 @@
18 }
19
20 echo "Building web assets with gulp..."
21-gulp --gulpfile www/gulpfile.js
22+gulp
23
24 orig_pwd=$(pwd)
25
26
27=== renamed file 'www/gulpfile.js' => 'gulpfile.js'
28--- www/gulpfile.js 2015-04-30 14:44:46 +0000
29+++ gulpfile.js 2015-05-07 10:34:41 +0000
30@@ -24,11 +24,11 @@
31 });
32
33 gulp.task('js:clean', function(cb) {
34- del(['public/js'], cb);
35+ del(['www/public/js'], cb);
36 });
37
38 function createBundler(watch) {
39- var bundler = browserify('./src/js/app.js', {
40+ var bundler = browserify('./www/src/js/app.js', {
41 cache: {},
42 packageCache: {}
43 });
44@@ -55,11 +55,11 @@
45 .pipe(sourcemaps.init({loadMaps: true})) // loads map from browserify file
46 .pipe(uglify())
47 .pipe(sourcemaps.write('./')) // writes .map file
48- .pipe(gulp.dest('./public/js/'));
49+ .pipe(gulp.dest('www/public/js/'));
50 }
51
52 gulp.task('js:lint', function() {
53- return gulp.src(['src/js/**/*.js'])
54+ return gulp.src(['www/src/js/**/*.js'])
55 .pipe(jscs())
56 .on('error', function(err) {
57 gutil.log(gutil.colors.green(err));
58@@ -71,33 +71,33 @@
59 // Styles
60
61 gulp.task('styles', ['styles:clean'], function() {
62- return gulp.src(['node_modules/normalize.css/normalize.css', 'src/css/**/*.css'])
63+ return gulp.src(['node_modules/normalize.css/normalize.css', 'www/src/css/**/*.css'])
64 .pipe(csso())
65 .pipe(autoprefixer())
66 .pipe(concat('webdm.css'))
67- .pipe(gulp.dest('public/css'));
68+ .pipe(gulp.dest('www/public/css'));
69 });
70
71 gulp.task('styles:clean', function(cb) {
72- del(['public/css'], cb);
73+ del(['www/public/css'], cb);
74 });
75
76 // Images
77
78 gulp.task('images', ['images:clean'], function() {
79- gulp.src(['src/images/**/*'])
80+ gulp.src(['www/src/images/**/*'])
81 .pipe(imagemin())
82- .pipe(gulp.dest('public/images'));
83+ .pipe(gulp.dest('www/public/images'));
84 });
85
86 gulp.task('images:clean', function(cb) {
87- del(['public/images'], cb);
88+ del(['www/public/images'], cb);
89 });
90
91 gulp.task('watch', ['js:watch', 'styles', 'images'], function() {
92- gulp.watch('src/images/**/*.{svg,png,jpg,jpeg}', ['images']);
93- gulp.watch('src/css/**/*.css', ['styles']);
94- gulp.watch('src/js/**/*.js', ['js:lint']);
95+ gulp.watch('www/src/images/**/*.{svg,png,jpg,jpeg}', ['images']);
96+ gulp.watch('www/src/css/**/*.css', ['styles']);
97+ gulp.watch('www/src/js/**/*.js', ['js:lint']);
98 });
99
100 gulp.task('default', ['js:build', 'styles', 'images']);
101
102=== renamed file 'www/karma.conf.js' => 'karma.conf.js'
103--- www/karma.conf.js 2015-04-21 08:29:53 +0000
104+++ karma.conf.js 2015-05-07 10:34:41 +0000
105@@ -21,7 +21,7 @@
106 served: true
107 },
108 **/
109- 'tests/**/*Spec.js'
110+ 'www/tests/**/*Spec.js'
111 ],
112
113 // list of files to exclude
114@@ -31,7 +31,7 @@
115 // preprocess matching files before serving them to the browser
116 // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
117 preprocessors: {
118- 'tests/**/*.js': ['browserify']
119+ 'www/tests/**/*.js': ['browserify']
120 },
121
122 // test results reporter to use
123@@ -54,7 +54,7 @@
124
125 // start these browsers
126 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
127- browsers: ['Chrome'],
128+ browsers: ['PhantomJS'],
129
130 // Continuous Integration mode
131 // if true, Karma captures browsers, runs the tests and exits
132
133=== renamed file 'www/package.json' => 'package.json'
134--- www/package.json 2015-04-23 16:31:31 +0000
135+++ package.json 2015-05-07 10:34:41 +0000
136@@ -34,9 +34,9 @@
137 "karma-jasmine-ajax": "^0.1.12",
138 "karma-phantomjs-launcher": "~0.1.4",
139 "lodash": "~3.3.1",
140+ "normalize.css": "^3.0.3",
141 "vinyl-buffer": "~1.0.0",
142 "vinyl-source-stream": "~1.1.0",
143- "watchify": "~3.1.2",
144- "normalize.css": "^3.0.3"
145+ "watchify": "~3.1.2"
146 }
147 }
148
149=== modified file 'run-checks'
150--- run-checks 2015-05-03 20:46:35 +0000
151+++ run-checks 2015-05-07 10:34:41 +0000
152@@ -33,6 +33,10 @@
153 echo Building
154 go build -v launchpad.net/webdm/...
155
156+# www
157+echo Obtaining npm dependencies
158+npm install && npm update
159+
160
161 # tests
162 echo Running tests from $(pwd)
163@@ -43,7 +47,7 @@
164 echo Running vet
165 go vet ./...
166
167- golint
168+# golint
169 echo Running lint
170 lint=$(golint ./...)
171 if [ -n "$lint" ]; then
172@@ -52,4 +56,9 @@
173 exit 1
174 fi
175
176+# js unit tests
177+echo "Running js unit tests (set JS_TESTER to override)"
178+${JS_TESTER:- ./node_modules/karma/bin/karma start --single-run}
179+
180+
181 echo "All good, what could possibly go wrong"

Subscribers

People subscribed via source and target branches