[Pkg-javascript-commits] [uglifyjs] 424/491: run `test/ufuzz.js` when Travis CI is idle (#2784)

Jonas Smedegaard dr at jones.dk
Wed Feb 14 19:52:00 UTC 2018


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

js pushed a commit to annotated tag debian/3.3.10-1
in repository uglifyjs.

commit 2b6657e96749989b55f0d98b00683016a1fccea1
Author: Alex Lam S.L <alexlamsl at gmail.com>
Date:   Mon Jan 15 04:56:06 2018 +0800

    run `test/ufuzz.js` when Travis CI is idle (#2784)
---
 test/travis-ufuzz.js | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/test/travis-ufuzz.js b/test/travis-ufuzz.js
new file mode 100644
index 0000000..2fbe3b0
--- /dev/null
+++ b/test/travis-ufuzz.js
@@ -0,0 +1,45 @@
+"use strict";
+
+var period = 20 * 60 * 1000;
+if (process.argv.length > 2) {
+    var token = process.argv[2];
+    var branch = process.argv[3] || "v" + require("../package.json").version;
+    (function init() {
+        setTimeout(init, period);
+        var options = require("url").parse("https://api.travis-ci.org/repo/mishoo%2FUglifyJS2/requests");
+        options.method = "POST";
+        options.headers = {
+            "Content-Type": "application/json",
+            "Travis-API-Version": 3,
+            "Authorization": "token " + token
+        };
+        require("https").request(options, function(res) {
+            console.log("HTTP", res.statusCode);
+            console.log(JSON.stringify(res.headers, null, 2));
+            console.log();
+            res.setEncoding("utf8");
+            res.on("data", console.log);
+        }).on("error", console.error).end(JSON.stringify({
+            request: {
+                message: "ufuzz testing (when idle)",
+                branch: branch,
+                config: {
+                    merge_mode: "replace",
+                    language: "node_js",
+                    node_js: "9",
+                    sudo: false,
+                    script: "node test/travis-ufuzz"
+                }
+            }
+        }));
+    })();
+} else {
+    var child = require("child_process").spawn("node", [ "test/ufuzz" ], {
+        stdio: [ "ignore", "ignore", 1 ]
+    });
+    var keepAlive = setInterval(console.log, 5 * 60 * 1000);
+    setTimeout(function() {
+        clearInterval(keepAlive);
+        child.kill();
+    }, period);
+}

-- 
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