[Pkg-javascript-commits] [uglifyjs] 01/02: Add patch 1002 to avoid hardcoding timeout in tests. Closes: Bug#851318. Thanks to Santiago Vila.

Jonas Smedegaard dr at jones.dk
Wed Feb 8 11:36:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository uglifyjs.

commit 9c382fcefcdd16256fa20436e7069e672a81d3b7
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Wed Feb 8 11:20:31 2017 +0100

    Add patch 1002 to avoid hardcoding timeout in tests. Closes: Bug#851318. Thanks to Santiago Vila.
---
 debian/patches/1002_avoid_timeout_in_tests.patch | 50 ++++++++++++++++++++++++
 debian/patches/series                            |  1 +
 2 files changed, 51 insertions(+)

diff --git a/debian/patches/1002_avoid_timeout_in_tests.patch b/debian/patches/1002_avoid_timeout_in_tests.patch
new file mode 100644
index 0000000..29ed2d5
--- /dev/null
+++ b/debian/patches/1002_avoid_timeout_in_tests.patch
@@ -0,0 +1,50 @@
+Description: Avoid hardcoded timeout in tests
+ Some tests fail on slow hardware.
+ .
+ Better to leave it to the test environment to deal with tests hanging.
+Forwarded: no
+Author: Jonas Smedegaard <dr at jones.dk>
+Bug-Debian: https://bugs.debian.org/851318
+Last-Update: 2017-02-08
+
+--- a/test/mocha/cli.js
++++ b/test/mocha/cli.js
+@@ -4,7 +4,6 @@
+ describe("bin/uglifyjs", function () {
+     var uglifyjscmd = '"' + process.argv[0] + '" bin/uglifyjs';
+     it("should produce a functional build when using --self", function (done) {
+-        this.timeout(5000);
+ 
+         var command = uglifyjscmd + ' --self -cm --wrap WrappedUglifyJS';
+ 
+--- a/test/mocha/let.js
++++ b/test/mocha/let.js
+@@ -3,7 +3,6 @@
+ 
+ describe("let", function() {
+     it("Should not produce `let` as a variable name in mangle", function(done) {
+-        this.timeout(10000);
+ 
+         // Produce a lot of variables in a function and run it through mangle.
+         var s = '"use strict"; function foo() {';
+--- a/test/mocha/spidermonkey.js
++++ b/test/mocha/spidermonkey.js
+@@ -4,7 +4,6 @@
+ 
+ describe("spidermonkey export/import sanity test", function() {
+     it("should produce a functional build when using --self with spidermonkey", function (done) {
+-        this.timeout(20000);
+ 
+         var uglifyjs = '"' + process.argv[0] + '" bin/uglifyjs';
+         var command = uglifyjs + " --self -cm --wrap SpiderUglify --dump-spidermonkey-ast | " +
+--- a/test/mocha.js
++++ b/test/mocha.js
+@@ -3,7 +3,7 @@
+     path = require('path');
+ 
+ // Instantiate a Mocha instance.
+-var mocha = new Mocha({});
++var mocha = new Mocha({ timeout: 0 });
+ 
+ var testDir = __dirname + '/mocha/';
+ 
diff --git a/debian/patches/series b/debian/patches/series
index bc69ea9..5140308 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 1001_break_dep_loop.patch
+1002_avoid_timeout_in_tests.patch
 2002_node_conflict.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list