var get = require("https").get; var parse = require("url").parse; var base, token, run_number, eldest = true; exports.init = function(url, auth, num) { base = url; token = auth; run_number = num; }; exports.should_stop = function(callback) { read(base + "/actions/runs?per_page=100", function(reply) { if (!reply || !Array.isArray(reply.workflow_runs)) return; var runs = reply.workflow_runs.filter(function(workflow) { return workflow.status != "completed"; }).sort(function(a, b) { return b.run_number - a.run_number; }); var found = false, remaining = 20; (function next() { if (!runs.length) return; var workflow = runs.pop(); if (workflow.event == "schedule" && workflow.run_number == run_number) found = true; read(workflow.jobs_url, function(reply) { if (!reply || !Array.isArray(reply.jobs)) return; if (!reply.jobs.every(function(job) { if (job.status == "completed") return true; remaining--; return found || workflow.event != "schedule"; })) return; if (remaining >= 0) { next(); } else { callback(); } }); })(); }); }; function read(url, callback) { var done = function(reply) { done = function() {}; callback(reply); }; var options = parse(url); options.headers = { "Authorization": "Token " + token, "User-Agent": "UglifyJS", }; get(options, function(response) { var chunks = []; response.setEncoding("utf8"); response.on("data", function(chunk) { chunks.push(chunk); }).on("end", function() { var reply; try { reply = JSON.parse(chunks.join("")) } catch (e) {} done(reply); }).on("error", function() { done(); }); }).on("error", function() { done(); }); } log/tests?id=a2397e0ecda6b07a05d911ee6a614c41c19d052f'>tests/guix-home.sh
AgeCommit message (Expand)Author
2022-04-19tests: Adjust 'guix home' test to 'home-files-service-type' changes....This is a followup to 5832d9fb601c7d4ec5380654db2b62b906bc658f. * tests/guix-home.sh: Change "config" to ".config" in 'home-files-service-type' extension. Ludovic Courtès
2022-03-19guix home: Add 'container' command....* guix/scripts/home.scm (show-help, %options): Add '--network', '--share', and '--expose'. (not-config?, user-shell, spawn-home-container): New procedures. (%default-system-profile): New variable. (perform-action): Add #:file-system-mappings, #:container-command, and #:network?; honor them. (process-action): Adjust accordingly. (guix-home)[parse-sub-command]: Add "container". [parse-args]: New procedure. Use it instead of 'parse-command-line'. * tests/guix-home.sh: Add tests. * doc/guix.texi (Declaring the Home Environment): Mention 'guix home container' as a way to test configuration. (Invoking guix home): Document it. Ludovic Courtès
2022-03-18guix home: Implement the 'extension-graph' and 'shepherd-graph' actions....Until now these two actions were silently ignored. * guix/scripts/home.scm (show-help, %options): Add "--graph-backend". (%default-options): Add 'graph-backend' key. (export-extension-graph, export-shepherd-graph): New procedures. (perform-action): Add #:graph-backend parameter. Add cases for the 'extension-graph' and 'shepherd-graph' actions. (process-action): Pass #:graph-backend to 'perform-action'. * guix/scripts/system.scm (service-node-type) (shepherd-service-node-type): Export * tests/guix-home.sh: Add tests. * doc/guix.texi (Invoking guix home): Document it. Ludovic Courtès
2022-03-10tests: Check 'guix home reconfigure' for a second generation....* tests/guix-home.sh: Invoke "guix home reconfigure" a second time with a modify config file and check the result. Ludovic Courtès
2022-03-10tests: Simplify use of 'local-file' in 'tests/guix-home.sh'....* tests/guix-home.sh: Remove 'current-filename' trickery since 'local-file' resolves file names relative to the containing file. Ludovic Courtès
2022-03-10tests: Make sure 'guix home reconfigure' backs up files....* tests/guix-home.sh: Create ~/.bashrc and ~/.config/test.conf prior to 'reconfigure' and check whether they were backed up. Ludovic Courtès
2021-10-09home: services: configuration: Support file-like objects....* gnu/home/services/configuration.scm (interpose): Operate only with file-like objects. (string-or-gexp?): Delete procedure. (serialize-string-or-gexp): Rename to 'serialize-file-like'. (text-config?): Call 'file-like' intead of 'string-or-gexp?'. * guix/scripts/home/import.scm: (generate-bash-module+configuration): Don't call slurp-file-gexp. * gnu/home/services/configuration.scm: Move content ... * gnu/services/configuration.scm: here. * gnu/home/services/shells.scm: Delete (gnu home services configuration). * gnu/home/services/xdg.scm: Same. * gnu/local.mk: Same. * tests/guix-home.sh: Test home-bash-service-type and extension with home-bash-extension. Oleg Pykhalov
2021-10-09tests: Add guix-home.sh....* tests/guix-home.sh: New file. * Makefile.am (SH_TESTS): Add this. Oleg Pykhalov