I think you want to use the println function.
On Tue, Sep 16, 2014 at 2:07 PM, silver <[email protected]> wrote: > Hello. > > > > I’m trying to add some intelligence to my build-flow. I think, in the > end, I’m probably doing it all wrong, but that’s why I came here. > > > > My build-flow is currently this (some content removed for simplicity but > the gist of what I’m trying to do is there). Right now, I’m just trying to > see the “MY hostname” and “Current # of failed tests” printed to the > console but I’m not. I had this working at one point in time but am trying > to revive this test and have discovered that this flow isn’t functioning > how I had hoped. > > > > Can I print to the console when I have a build flow? > > Can I use logic as below to pass/fail a test? > > > > My goal is to run all of these test (ignoring failures so the test will > continue), then pass or fail the overall job. > > > > I can’t run any of these in parallel. > > > > Thanks for the suggestions. > > > > i = 0; > > System.out.println("MY hostname: "+params["HOSTNAME"]); > > System.out.println("Current # of failed tests: "+i); > > > > ignore(FAILURE) { > > build_result = build("050-RunThisTest", HOSTNAME:params["HOSTNAME"], > TARGET:params["TARGET"], VERSION_API:params["VERSION_API"], > VERSION_UI:params["VERSION_UI"]); > > } > > if ( build_result.build.result.toString() == FAILURE ) { i = i++; } > > ignore(FAILURE) { > > build_result = build("051-RunThisTest ", HOSTNAME:params["HOSTNAME"], > TARGET:params["TARGET"], VERSION_API:params["VERSION_API"], > VERSION_UI:params["VERSION_UI"]); > > } > > if ( build_result.build.result.toString() == FAILURE ) { i = i++; } > > ignore(FAILURE) { > > build_result = build("052-RunThisTest ", HOSTNAME:params["HOSTNAME"], > TARGET:params["TARGET"], VERSION_API:params["VERSION_API"], > VERSION_UI:params["VERSION_UI"]); > > } > > if ( build_result.build.result.toString() == FAILURE ) { i = i++; } > > > > if ( i>0 ) { > > throw new Exception("There were "+i+" failed tests! Please review test > output."); > > } else { > > System.out.println("There were "+i+" failed tests! SUCCESS!!"); > > } > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Website: http://earl-of-code.com -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
