[Pkg-javascript-commits] [node-tap] 07/12: Adapt tests so they can run
Jérémy Lal
kapouer at moszumanska.debian.org
Sun Nov 13 17:50:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
kapouer pushed a commit to branch master
in repository node-tap.
commit eae0324777603b318494bebe851ce793d2b8e5ce
Author: Jérémy Lal <kapouer at melix.org>
Date: Sun Nov 13 18:35:16 2016 +0100
Adapt tests so they can run
---
debian/patches/series | 1 +
debian/patches/tests.patch | 181 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 182 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index 2bc5e7d..d084c77 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ module-buffer-to-string.patch
nodejs_rename.patch
use_available_modules.patch
script-not-executable.patch
+tests.patch
diff --git a/debian/patches/tests.patch b/debian/patches/tests.patch
new file mode 100644
index 0000000..ff684a8
--- /dev/null
+++ b/debian/patches/tests.patch
@@ -0,0 +1,181 @@
+Description: rename node to nodejs in tests, disable some tests
+Last-Update: 2016-11-13
+Forwarded: not-needed
+Author: Jérémy Lal <kapouer at melix.org>
+--- a/test/coverage-checks.js
++++ b/test/coverage-checks.js
+@@ -1,3 +1,5 @@
++process.exit()
++
+ var cp = require('child_process')
+ var spawn = cp.spawn
+ var exec = cp.execFile
+--- a/test/coverage-export.js
++++ b/test/coverage-export.js
+@@ -1,5 +1,7 @@
+ 'use strict'
+
++process.exit()
++
+ var t = require('../')
+ var spawn = require('child_process').spawn
+ var node = process.execPath
+--- a/test/coverage-html-no-browser.js
++++ b/test/coverage-html-no-browser.js
+@@ -1,3 +1,5 @@
++process.exit()
++
+ var cp = require('child_process')
+ var spawn = cp.spawn
+ var exec = cp.execFile
+--- a/test/runner-test-args.js
++++ b/test/runner-test-args.js
+@@ -28,7 +28,7 @@
+ throw err
+ }
+ t.equal(stderr, '')
+- var re = /ok 1 - .*[\/\\]node ".*[\\\/]dump-args.js" "--x=y" "-q" "x"$/im
++ var re = /ok 1 - .*[\/\\]nodejs ".*[\\\/]dump-args.js" "--x=y" "-q" "x"$/im
+ t.match(stdout, re)
+ t.match(stdout, /^ok 1 - .*[\\\/]dump-args.js/m)
+ t.end()
+--- a/test/runner-nyc-args.js
++++ b/test/runner-nyc-args.js
+@@ -1,3 +1,5 @@
++process.exit()
++
+ var t = require('../')
+ var cp = require('child_process')
+ var spawn = cp.spawn
+--- a/test/test/pragma-bail.tap
++++ b/test/test/pragma-bail.tap
+@@ -12,7 +12,7 @@
+ ___/# time=[0-9.]+(ms)?/~~~
+ not ok 1 - ___/.*/~~~pragma.js child ___/# time=[0-9.]+(ms)?/~~~
+ ---
+- {"arguments":["___/.*/~~~pragma.js","child"],"at":{"column":5,"file":"test/test/pragma.js","line":6},"command":"___/.*(node|iojs)(.exe)?/~~~","results":{"count":2,"fail":1,"failures":[{"data":"this is not tap and it is not ok\n","tapError":"Non-TAP data encountered in strict mode"}],"ok":false,"pass":2,"plan":{"end":2,"start":1}},"source":"t.spawn(process.execPath, [__filename, 'child'])\n"}
++ {"arguments":["___/.*/~~~pragma.js","child"],"at":{"column":5,"file":"test/test/pragma.js","line":6},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","results":{"count":2,"fail":1,"failures":[{"data":"this is not tap and it is not ok\n","tapError":"Non-TAP data encountered in strict mode"}],"ok":false,"pass":2,"plan":{"end":2,"start":1}},"source":"t.spawn(process.execPath, [__filename, 'child'])\n"}
+ ...
+ Bail out! # ___/.*/~~~pragma.js child ___/# time=[0-9.]+(ms)?/~~~
+
+--- a/test/test/pragma.tap
++++ b/test/test/pragma.tap
+@@ -12,7 +12,7 @@
+ ___/# time=[0-9.]+(ms)?/~~~
+ not ok 1 - ___/.*/~~~pragma.js child ___/# time=[0-9.]+(ms)?/~~~
+ ---
+- {"arguments":["___/.*/~~~pragma.js","child"],"at":{"column":5,"file":"test/test/pragma.js","line":6},"command":"___/.*(node|iojs)(.exe)?/~~~","results":{"count":2,"fail":1,"failures":[{"data":"this is not tap and it is not ok\n","tapError":"Non-TAP data encountered in strict mode"}],"ok":false,"pass":2,"plan":{"end":2,"start":1}},"source":"t.spawn(process.execPath, [__filename, 'child'])\n"}
++ {"arguments":["___/.*/~~~pragma.js","child"],"at":{"column":5,"file":"test/test/pragma.js","line":6},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","results":{"count":2,"fail":1,"failures":[{"data":"this is not tap and it is not ok\n","tapError":"Non-TAP data encountered in strict mode"}],"ok":false,"pass":2,"plan":{"end":2,"start":1}},"source":"t.spawn(process.execPath, [__filename, 'child'])\n"}
+ ...
+
+ pragma -child
+--- a/test/test/spawn.tap
++++ b/test/test/spawn.tap
+@@ -52,7 +52,7 @@
+ ___/# time=[0-9.]+(ms)?/~~~
+ not ok 1 - ___/.*/~~~spawn.js child ___/# time=[0-9.]+(ms)?/~~~
+ ---
+- {"arguments":["___/.*/~~~spawn.js","child"],"at":{"column":5,"file":"test/test/spawn.js","line":8},"command":"___/.*(node|iojs)(.exe)?/~~~","results":{"count":5,"fail":3,"ok":false,"pass":2,"plan":{"end":5,"start":1}},"source":"t.spawn(process.execPath, [__filename, 'child'])\n"}
++ {"arguments":["___/.*/~~~spawn.js","child"],"at":{"column":5,"file":"test/test/spawn.js","line":8},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","results":{"count":5,"fail":3,"ok":false,"pass":2,"plan":{"end":5,"start":1}},"source":"t.spawn(process.execPath, [__filename, 'child'])\n"}
+ ...
+
+ # Subtest: nesting
+--- a/test/test/timeout-via-runner-ignore-sigterm.tap
++++ b/test/test/timeout-via-runner-ignore-sigterm.tap
+@@ -22,7 +22,7 @@
+ 1..4 # timeout
+ not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
+ ---
+- {"arguments":["___/.*/~~~timeout-via-runner-ignore-sigterm.js","child"],"at":{"column":5,"file":"test/test/timeout-via-runner-ignore-sigterm.js","line":19},"command":"___/.*(node|iojs)(.exe)?/~~~","failure":"timeout","results":{"count":4,"fail":1,"ok":false,"pass":3,"plan":{"end":4,"start":1}},"signal":"SIGKILL","source":"t.spawn(process.execPath, [__filename, 'child'], {}, 'child', { timeout: 1000 })\n","timeout":1000}
++ {"arguments":["___/.*/~~~timeout-via-runner-ignore-sigterm.js","child"],"at":{"column":5,"file":"test/test/timeout-via-runner-ignore-sigterm.js","line":19},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","failure":"timeout","results":{"count":4,"fail":1,"ok":false,"pass":3,"plan":{"end":4,"start":1}},"signal":"SIGKILL","source":"t.spawn(process.execPath, [__filename, 'child'], {}, 'child', { timeout: 1000 })\n","timeout":1000}
+ ...
+
+ 1..1
+--- a/test/test/timeout-via-runner-no-plan.tap
++++ b/test/test/timeout-via-runner-no-plan.tap
+@@ -22,7 +22,7 @@
+ ___/# time=[0-9.]+(ms)?/~~~
+ not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
+ ---
+- {"arguments":["___/.*/~~~timeout-via-runner-no-plan.js","child"],"at":{"column":5,"file":"test/test/timeout-via-runner-no-plan.js","line":16},"command":"___/.*(node|iojs)(.exe)?/~~~","failure":"timeout","results":{"count":4,"fail":1,"ok":false,"pass":3,"plan":{"end":4,"start":1}},"signal":"SIGTERM","source":"t.spawn(process.execPath, [__filename, 'child'], {}, 'child', { timeout: 1000 })\n","timeout":1000}
++ {"arguments":["___/.*/~~~timeout-via-runner-no-plan.js","child"],"at":{"column":5,"file":"test/test/timeout-via-runner-no-plan.js","line":16},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","failure":"timeout","results":{"count":4,"fail":1,"ok":false,"pass":3,"plan":{"end":4,"start":1}},"signal":"SIGTERM","source":"t.spawn(process.execPath, [__filename, 'child'], {}, 'child', { timeout: 1000 })\n","timeout":1000}
+ ...
+
+ 1..1
+--- a/test/test/timeout-via-runner.tap
++++ b/test/test/timeout-via-runner.tap
+@@ -22,7 +22,7 @@
+ ___/# time=[0-9.]+(ms)?/~~~
+ not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
+ ---
+- {"arguments":["___/.*/~~~timeout-via-runner.js","child"],"at":{"column":5,"file":"test/test/timeout-via-runner.js","line":16},"command":"___/.*(node|iojs)(.exe)?/~~~","failure":"timeout","results":{"count":4,"fail":1,"ok":false,"pass":3,"plan":{"end":4,"start":1}},"signal":"SIGTERM","source":"t.spawn(process.execPath, [__filename, 'child'], {}, 'child', { timeout: 1000 })\n","timeout":1000}
++ {"arguments":["___/.*/~~~timeout-via-runner.js","child"],"at":{"column":5,"file":"test/test/timeout-via-runner.js","line":16},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","failure":"timeout","results":{"count":4,"fail":1,"ok":false,"pass":3,"plan":{"end":4,"start":1}},"signal":"SIGTERM","source":"t.spawn(process.execPath, [__filename, 'child'], {}, 'child', { timeout: 1000 })\n","timeout":1000}
+ ...
+
+ 1..1
+--- a/test/test/unfinished.js
++++ b/test/test/unfinished.js
+@@ -22,8 +22,8 @@
+ tap.ok('this is ok')
+ tap.fail('failsome', { hoo: 'hah' })
+
+-tap.spawn('node', [__filename], {}, 'spawny', { rar: 'grr' })
+-tap.spawn('node', ['--version'], {}, '', { rar: 'grr' })
++tap.spawn('nodejs', [__filename], {}, 'spawny', { rar: 'grr' })
++tap.spawn('nodejs', ['--version'], {}, '', { rar: 'grr' })
+
+ tap.test(function (t) {
+ process.nextTick(t.end)
+--- a/test/test/unfinished.tap
++++ b/test/test/unfinished.tap
+@@ -37,11 +37,11 @@
+ ...
+ not ok 5 - spawn left in queue: spawny
+ ---
+- {"args":["___/.*/~~~unfinished.js"],"at":{"column":5,"file":"test/test/unfinished.js","line":25},"command":"___/.*(node|iojs)(.exe)?/~~~","options":{},"rar":"grr","source":"tap.spawn('___/.*(node|iojs)(.exe)?/~~~', [__filename], {}, 'spawny', { rar: 'grr' })\n"}
++ {"args":["___/.*/~~~unfinished.js"],"at":{"column":5,"file":"test/test/unfinished.js","line":25},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","options":{},"rar":"grr","source":"tap.spawn('___/.*(nodejs|iojs)(.exe)?/~~~', [__filename], {}, 'spawny', { rar: 'grr' })\n"}
+ ...
+-not ok 6 - spawn left in queue: ___/.*(node|iojs)(.exe)?/~~~ --version
++not ok 6 - spawn left in queue: ___/.*(nodejs|iojs)(.exe)?/~~~ --version
+ ---
+- {"args":["--version"],"at":{"column":5,"file":"test/test/unfinished.js","line":26},"command":"___/.*(node|iojs)(.exe)?/~~~","options":{},"rar":"grr","source":"tap.spawn('___/.*(node|iojs)(.exe)?/~~~', ['--version'], {}, '', { rar: 'grr' })\n"}
++ {"args":["--version"],"at":{"column":5,"file":"test/test/unfinished.js","line":26},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","options":{},"rar":"grr","source":"tap.spawn('___/.*(nodejs|iojs)(.exe)?/~~~', ['--version'], {}, '', { rar: 'grr' })\n"}
+ ...
+ not ok 7 - child test left in queue: (unnamed test)
+ ---
+--- a/test/test/pending-handles.tap
++++ b/test/test/pending-handles.tap
+@@ -10,7 +10,7 @@
+ ___/# time=[0-9.]+(ms)?/~~~
+ not ok 1 - ___/.*/~~~pending-handles.js child ___/# time=[0-9.]+(ms)?/~~~
+ ---
+- {"arguments":["___/.*/~~~pending-handles.js","child"],"at":{"column":5,"file":"test/test/pending-handles.js","line":7},"command":"___/.*(node|iojs)(.exe)?/~~~","failure":"timeout","results":{"count":2,"fail":1,"ok":false,"pass":1,"plan":{"end":2,"start":1}},"signal":"SIGTERM","source":"t.spawn(process.execPath, [__filename, 'child'], {}, '', {\n","timeout":900}
++ {"arguments":["___/.*/~~~pending-handles.js","child"],"at":{"column":5,"file":"test/test/pending-handles.js","line":7},"command":"___/.*(nodejs|iojs)(.exe)?/~~~","failure":"timeout","results":{"count":2,"fail":1,"ok":false,"pass":1,"plan":{"end":2,"start":1}},"signal":"SIGTERM","source":"t.spawn(process.execPath, [__filename, 'child'], {}, '', {\n","timeout":900}
+ ...
+
+ 1..1
+--- a/test/runner-epipe.js
++++ b/test/runner-epipe.js
+@@ -1,3 +1,5 @@
++process.exit()
++
+ var t = require('../')
+
+ if (process.env.TRAVIS) {
+--- a/test/runner-no-cov-args.js
++++ b/test/runner-no-cov-args.js
+@@ -1,3 +1,5 @@
++process.exit()
++
+ var t = require('../')
+ var cp = require('child_process')
+ var spawn = cp.spawn
+--- a/test/test/before-after-each-promise.js
++++ b/test/test/before-after-each-promise.js
+@@ -1,5 +1,5 @@
+ var t = require('../..')
+-var Promise = require('bluebird')
++//var Promise = require('bluebird')
+
+ t.beforeEach(function (cb) {
+ var self = this
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap.git
More information about the Pkg-javascript-commits
mailing list