{"action":"created","issue":{"url":"https://api.github.com/repos/cirruslabs/cirrus-ci-docs/issues/20","repository_url":"https://api.github.com/repos/cirruslabs/cirrus-ci-docs","labels_url":"https://api.github.com/repos/cirruslabs/cirrus-ci-docs/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/cirruslabs/cirrus-ci-docs/issues/20/comments","events_url":"https://api.github.com/repos/cirruslabs/cirrus-ci-docs/issues/20/events","html_url":"https://github.com/cirruslabs/cirrus-ci-docs/issues/20","id":344532797,"node_id":"MDU6SXNzdWUzNDQ1MzI3OTc=","number":20,"title":"Cirrus test succeeding when it should have failed.","user":{"login":"gspencergoog","id":8867023,"node_id":"MDQ6VXNlcjg4NjcwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/8867023?v=4","gravatar_id":"","url":"https://api.github.com/users/gspencergoog","html_url":"https://github.com/gspencergoog","followers_url":"https://api.github.com/users/gspencergoog/followers","following_url":"https://api.github.com/users/gspencergoog/following{/other_user}","gists_url":"https://api.github.com/users/gspencergoog/gists{/gist_id}","starred_url":"https://api.github.com/users/gspencergoog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gspencergoog/subscriptions","organizations_url":"https://api.github.com/users/gspencergoog/orgs","repos_url":"https://api.github.com/users/gspencergoog/repos","events_url":"https://api.github.com/users/gspencergoog/events{/privacy}","received_events_url":"https://api.github.com/users/gspencergoog/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-25T17:15:40Z","updated_at":"2018-07-25T19:36:33Z","closed_at":"2018-07-25T19:29:12Z","author_association":"NONE","body":"In [this Cirrus run](https://cirrus-ci.com/task/5397535736725504), the test failed, but the run succeeded.\r\n\r\nNow, there is a bug in this script (it has Bash line with the \"export\" when it should do the Windows equivalent), but even if that wasn't there, I think it might have done the same thing.\r\n\r\nI think the root of the problem is that Cirrus is prefixing a \"call \" for each line in the script, and in the `.cirrus.yml` file, an extra blank line is getting added to the test_all_script, so Cirrus does `call` on an empty line, which returns success, allowing the build to \"succeed\" when it didn't, really. I'm quite sure that test.dart is returning a 1 as an exit code.\r\n\r\n```yml\r\ntask:\r\n  name: tool_tests-windows\r\n  env:\r\n    SHARD: tool_tests\r\n  windows_container:\r\n    image: cirrusci/windowsservercore:2016\r\n    os_version: 2016\r\n    cpu: 4\r\n  env:\r\n    CIRRUS_WORKING_DIR: \"C:\\\\Windows\\\\Temp\\\\flutter sdk\"\r\n  git_fetch_script: git fetch origin\r\n  setup_script:\r\n    - bin\\flutter.bat config --no-analytics\r\n    - bin\\flutter.bat update-packages\r\n    - git fetch origin master\r\n  test_all_script: |\r\n    export TEST_COMMIT_RANGE=\"$(git merge-base --fork-point FETCH_HEAD HEAD || git merge-base FETCH_HEAD HEAD)..HEAD\"\r\n    bin\\cache\\dart-sdk\\bin\\dart.exe -c dev\\bots\\test.dart\r\n\r\n```\r\n\r\nCirrus should probably either not add \"call\" to each line, or it should strip blank lines from the script."},"comment":{"url":"https://api.github.com/repos/cirruslabs/cirrus-ci-docs/issues/comments/407870297","html_url":"https://github.com/cirruslabs/cirrus-ci-docs/issues/20#issuecomment-407870297","issue_url":"https://api.github.com/repos/cirruslabs/cirrus-ci-docs/issues/20","id":407870297,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzg3MDI5Nw==","user":{"login":"gspencergoog","id":8867023,"node_id":"MDQ6VXNlcjg4NjcwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/8867023?v=4","gravatar_id":"","url":"https://api.github.com/users/gspencergoog","html_url":"https://github.com/gspencergoog","followers_url":"https://api.github.com/users/gspencergoog/followers","following_url":"https://api.github.com/users/gspencergoog/following{/other_user}","gists_url":"https://api.github.com/users/gspencergoog/gists{/gist_id}","starred_url":"https://api.github.com/users/gspencergoog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gspencergoog/subscriptions","organizations_url":"https://api.github.com/users/gspencergoog/orgs","repos_url":"https://api.github.com/users/gspencergoog/repos","events_url":"https://api.github.com/users/gspencergoog/events{/privacy}","received_events_url":"https://api.github.com/users/gspencergoog/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T19:36:33Z","updated_at":"2018-07-25T19:36:33Z","author_association":"NONE","body":"Also, why didn't the script fail when it encountered the \"export\" line?  It clearly printed a \"command not found\" error, but happily went on to run the test."}}
{"actor":{"display_login":"gspencergoog"}}