suite.TestRunCmd shows script failure

Bug #1471936 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Invalid
Undecided
Unassigned
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is an example

FAIL: plugin_test.go:158: suite.TestRunCmd

plugin_test.go:168:
    c.Assert(strings.TrimSpace(string(out)), gc.DeepEquals, m.stdout)
... obtained string = "" +
... "c:\\users\\admini~1\\appdata\\local\\temp\\tmpddmpf8\\gogo\\src\\github.com\\juju\\juju\\process\\plugin>echo ! (int=0) 1>&2 \r\n" +
... "\r\n" +
... "c:\\users\\admini~1\\appdata\\local\\temp\\tmpddmpf8\\gogo\\src\\github.com\\juju\\juju\\process\\plugin>echo \"!s(MISSING)\" \r\n" +
... "\"!s(MISSING)\"\r\n" +
... "\r\n" +
... "c:\\users\\admini~1\\appdata\\local\\temp\\tmpddmpf8\\gogo\\src\\github.com\\juju\\juju\\process\\plugin>exit !d(MISSING)"
... expected string = "foo!"

----------------------------------------------------------------------
FAIL: plugin_test.go:173: suite.TestRunCmdErr

plugin_test.go:183:
    c.Assert(err, gc.ErrorMatches, "exit status 1: foo!")
... value = nil
... regex string = "exit status 1: foo!"
... Error value is nil

Changed in juju-core:
status: New → Incomplete
Revision history for this message
Nate Finch (natefinch) wrote :

This is because I was doing stupid scripting tricks to try to have a usable executable to test. I've swapped out that code with much more reliable code that uses the testing executable as the executable to run, which means all the code is written in Go and cross platform compatible.

PR for this bug here: https://github.com/juju/juju/pull/2795
Review here: http://reviews.vapour.ws/r/2174/

Revision history for this message
Curtis Hovey (sinzui) wrote :

CI will fail the Feature Proc management
    http://reports.vapour.ws/releases/2919
 soon because of

----------------------------------------------------------------------
FAIL: plugin_test.go:163: suite.TestRunCmd

plugin_test.go:172:
    c.Assert(err, jc.ErrorIsNil)
... value *errors.Err = &errors.Err{message:"", cause:(*exec.ExitError)(0xc0840a8d30), previous:(*exec.ExitError)(0xc0840a8d30), file:"github.com/juju/juju/process/plugin/plugin.go", line:152} ("exit status 2")
... error stack:
 exit status 2
 github.com/juju/juju/process/plugin/plugin.go:152:

----------------------------------------------------------------------
FAIL: plugin_test.go:178: suite.TestRunCmdErr

plugin_test.go:187:
    c.Assert(err, gc.ErrorMatches, "exit status 1: foo!")
... error string = "exit status 2"
... regex string = "exit status 1: foo!"

OOPS: 9 passed, 2 FAILED
--- FAIL: Test (0.08 seconds)
FAIL
FAIL github.com/juju/juju/process/plugin 0.388s

The predicted location of the log is:
    http://reports.vapour.ws/releases/2919/job/run-unit-tests-win2012-amd64/attempt/976

tags: added: blocker ci regression
tags: removed: blocker ci intermittent-failure
tags: added: ci
Curtis Hovey (sinzui)
Changed in juju-core:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.