It is possible to call an specific builder within a build step? - buildbot

I have a builder which execute a sequence of steps to install a package.
What I want to do is have another builder in which one of its steps execute all the steps of the previous builder. Is that possible? Execute a builder inside another one?

Check this out
http://docs.buildbot.net/latest/manual/cfg-schedulers.html#triggerable-scheduler
There is a nice little example there.
I would suggest writing a function that defines the package step, something like this:
def packageSteps():
steps=[]
steps.append(step1)
steps.append(step2)
return steps
and then add this in all the factories that require packaging
f=factory.BuildFactory()
f.addStep(buildstep1)
f.addSteps(packageSteps())

Related

Does register my custom cluster selection strategy need to compile source code?

I see the doc2.1.x describe the custom cluster selection strategy as follows:
that Register the implementation as a service. You can do this by creating a new file under META-INF/service. Use the filename com.orientechnologies.orient.core.metadata.schema.clusterselection.OClusterSelectionStrategy. For its contents, code your class with the full package.
Does it mean I must modify source code project, compile and publish?
Yes, you must modify the source code project and compile.
I have followed the docs http://orientdb.com/docs/2.1/Cluster-Selection.html#custom-cluster-selection-strategies
and it works.

Way to obtain the list of test methods from the excluded group

My setup is like below:
I run my TestNG test with excludedGroups Maven Surefire Plugin parameter set to failing. So, test methods which are known to be failing are excluded from the test suite.
I want to obtain the list of those test methods.
I did not find a straightforward solution for this.
Does anyone know how to do it? Whether it can be done using capabilities of Java, Annotations, TestNG or Maven...
Couple of ways : Implement Isuitelistener->onStart method. Use the suite.getExcludedMethods to get a list of all excluded methods calculated. You can implement ITestListener as well and use context.getExcludedMethods/Groups for the list too.

How to create logic hook in sugarcrm when we create a module through module builder

I create a module Acquisitions through module builder and now want to make some calculations for some fields.i have no clue how to create a logic hook and where to create this logic hook. please tell me the full path and procedure for this.
I have this very problem. Unfortunately it's not possible because when you you deploy the package in Module Builder, the custom folder gets overwritten and that's exactly where the logic_hook file needs to be.
Even the fact that there is a parameter called "logic_hooks" for that manifest.php install_def, it still doesn't seem to work when the logic_hook you want to add is part of package you are deploying (Yes, that's very annoying).
I posted about this on the sugar forum, you can see more details #: http://www.sugarcrm.com/forums/f6/module-builder-deploy-deletes-my-logic_hook-php-76402/
See question 4196257 for using logic hooks.
You can create a logic hook under Custom folder so it will be safe upgrade
/custom/modules//logic_hooks.php
For understanding the logic hook you can follow this link
Logic hook
I hope this Will help you
1­Custom/modules/\logic_hooks.php
logic_hooks.php
Descriptions­
1­ ­: Array Index
/Leads/logichooks_class.php ­­:Logic hooks Class File path
ogic_hooks_class­:Logic_hooks Class Name
before_save_method­­:Logic Hooks class Method Name
Logichooks_class.php
id."' ";
}
?>

How do I associate a CoffeeScript file with a view?

Just installed rails 3.1 rc1 and am trying to grok the best way to manage javascript with the new asset pipeline
By default all coffeescript is compiled into a single application.js file, this is a good thing.
Each seperate coffee script file is appended to the js file and wrapped in an anonymous function which is executed via the call method
A common scenario would be to use some jquery to turn various forms into ajax forms, update UI, etc...
Many of these scripts will be specific to a controller or action, I am trying to grok the 'conventional' way to handle this,
since everything is wrapped in an anonymous function how do I only execute just
the code for a particular controller / action, by default all of the anonymous functions are being executed
I did play around with some hacks where I load the controller and action name into js variables and then in
coffeescript check those to conditionally run code, I don't like that very much
my initial thought was that each coffee file would contain a js namespace/object and I would call the specific ones from the view,
going to spike this using the default_bare = true configuration
see How can I use option "--bare" in Rails 3.1 for CoffeeScript?
EDIT
Looking around some more: this looks like it might be the correct approach - "Can't find variable" error with Rails 3.1 and Coffeescript
There are two common approaches:
Make behavior conditional on the presence of a particular element. For instance, code to run a signup sheet should be prefaced with something like
if $('#signup').length > 0
Make behavior conditional on a class on the body element. You can set the body class using ERB. This is often desirable for stylesheets as well. The code would be something like
if $('body').hasClass 'user'
gistyle is a simple gem that helps you running action-specific javascript codes.
By following its setup, you set some data attributes in your body element, representing the current controller and action names. Then it will only call that action when the corresponding view is loaded.

nCover With many class libraries

So I have my project and it is set up like this:
MyProject
MyProject.Module1
MyProject.Module1.Tests
MyProject.Module2
MyProject.Module2.Tests
What I want is the code coverage number for the entire project.
I am using nCover... what is the best way to do this? For example would I have to rearrange the project and have everything put into MyProject.Tests?
It depends on how you're testing. Most test frameworks will let you run tests for multiple assemblies as separate arguments. If you can't run them all together, you can always use NCover's merge feature. Check out http://docs.ncover.com/ref/2-0/ncoverexplorer-console/merging-coverage-data/.