cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8870) Medic should display test failures in build status
Date Wed, 29 Apr 2015 19:20:07 GMT

    [ https://issues.apache.org/jira/browse/CB-8870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520007#comment-14520007
] 

ASF GitHub Bot commented on CB-8870:
------------------------------------

Github user robpaveza commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/47#discussion_r29370556
  
    --- Diff: bin/medic.js ---
    @@ -39,9 +65,109 @@ var argv = optimist
         .argv;
     
     // helpers
    +function killTasks(taskNames) {
    +
    +    if (!taskNames || taskNames.length < 1) {
    +        console.warn("no tasks to kill");
    +        return;
    +    }
    +
    +    if (isWindows()) {
    +        var cli  = "taskkill /F";
    +        var args = taskNames.map(function (name) { return "/IM \"" + name + "\""; });
    +    } else {
    +        var cli  = "killall";
    +        var args = taskNames.map(function (name) { return "\"" + name + "\""; });
    +    }
    +
    +    var command = cli + " " + args.join(" ");
    +    medicLog("running the following command:");
    +    medicLog("    " + command);
    +
    +    shelljs.exec(command, {silent: false, async: true}, function (returnCode, output)
{
    +        if (returnCode !== 0) {
    +            console.warn("WARNING: kill command returned " + returnCode);
    +        }
    +    });
    +}
    +
     function fatal(message) {
    -    console.error("ERROR: " + message);
    -    process.exit(1);
    +    console.error("FATAL: " + message);
    +    process.exit(ERROR);
    +}
    +
    +function medicLog(message) {
    +    console.log("\033[32m[MEDIC LOG]\033[m " + message);
    --- End diff --
    
    Might be worth adding a comment so that people can parse out what your escaped characters
are.  They look like octal encodings instead of Unicode.  While valid, is uncommon because
translating to octal and then to Latin-1 is a two-step process.


> Medic should display test failures in build status
> --------------------------------------------------
>
>                 Key: CB-8870
>                 URL: https://issues.apache.org/jira/browse/CB-8870
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Medic
>    Affects Versions: Master
>            Reporter: Dmitry Blotsky
>              Labels: improvement, medic
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message