importance of do_build function in bitbake - bitbake

I am new to bitbake and i am trying to learn it.
I am going through below link for getting a basic understanding
https://a4z.gitlab.io/docs/BitBake/guide.html
Here either through inheritance or directly i see a do_build is always executed.
this might seem a basic question but your answer would really help me.
I read a line like this "build is the task BitBake runs per default if no other task is specified".
Does it mean build is mandatory in bitbake.Is it like main function in c and c+= codes?
Thanks

When no task is specified on the commandline to bitbake, "build" is assumed. This can be overridden with the BB_DEFAULT_TASK variable to some other task. If a task isn't defined and you try and run it, an error will occur that the task can't be found. As such, a build task isn't absolutely required but you will likely run into errors without it in most common usages.

Related

How to configure the alfresco to run a script-task

I am trying to run a script task in alfresco process services, while compiling the script there were some error throw out in the console as like:
the console couldn't run 'javascript'
var x=5;
var y=5;
var xy=x*y;
document.write("The result is"+xy);
I expect the result as 25 that could be print in the console after the compilation of the script. Can anyone help me to resolve the issue?
Where/how are you running that code? Do you have a concrete error?
Most probably the "document" gets recognized as a root object, so the "write" method fails. If my theory is true, simply commenting that line out or replacing it with "logger" (another root object) will solve the issue.
https://docs.alfresco.com/4.1/references/API-JS-rootscoped.html
EDIT:
Now I realize you specified a Script Task.
I believe my theory is still relevant, however, root objects available are not the same.
https://docs.alfresco.com/5.1/references/API-JS-WorkflowService.html

Trying to get Protractor's location strategies in Node script (protractor.By)

I'm trying to setup protractor in a node script and I would like to get access to the location strategies. However, because I'm doing something stupid I am not seeing them on the protractor object:
var protractor = require('protractor');
//... Wrapping selenium driver
var by = protractor.By;
//console.log(by) returns '{}'
//and protractor.getInstance(); is returning undefined:
How might I get access to the selection strategies (by element, model etc). (I'm writing the script in this manner to work with CucumberJS, so, given the current setup I have I cannot simply run the protractor executable directly).
For anyone who cares to integrate Protractor and CucumberJS, the heuristic should be to execute protractor and have protractor execute cucumber, not the other way around.
My approach was completely wrong: Both protractor and CucumberJS are capable of integrating and executing the other's executable, however, using cucumberJS first would appear to be wrong. Rather I suggest using protractor to Drive the tests. Documentation for protractor integration with CucumberJS is extremely poor and difficult to find. Moreover there are a number of misleading pieces of information.
Right approach
See these example files in the protractor repo which, while not documented to my knowledge (or even acknowledged) provide what would appear to be an adequate means to integrate both tools. To execute it is necessary to have a protractor config setup appropriately
Wrong approach
Problems: Protractor Location strategies don't appear to work. protractor.getInstace() is undefined. protractor.By == {}
Following examples such as this, the implied setup in cucumberJS and similar examples with selenium results in protractor not fully initialising. The effect is that the location strategies appear undefined. There may well be a means to make it work, but after digging through the source-code for days I cannot find it easily.

Bamboo Grunt 'dustc' task failing

I've moved my grunt job into Bamboo and everything works great except for the dust compiler. All of my other tasks in my gruntfile can be targeted from the bamboo task and they work. The dustc task gives this error when run: Fatal error: Error: not found: dustc.
I've manually run the dustc task on the build machine's command prompt every way I know how and it works. I even copied the command from the Bamboo build log - the one it uses to execute the grunt task - and it works just fine.
I just can't get it to work when I run the build from within Bamboo.
Any ideas would be greatly appreciated.
Thanks
This turned out to be a permissions/visibility issue.
Evidently system users (or at least the one which was running my build service) don't have access to the system environment variables in Windows. Learn something new every day!
I created a user to run the service (which I probably should have done in the first place) and that non-system user was able to see the correct PATH settings.
This took care of the problem.

Possible to test log warnings for unit tests in PHPUnit?

Is it possible to test for log warnings while running tests for PHPUnit? Basically I have a function that logs a warning in our log files and I was wondering if there is a way to test that in PHPUnit.
Kindly note that this is not a PHP warning and I only want to test this specific warning. The result that I get back for the function that I am writing unit tests for doesn't contain information that would allow me to test whether the warning was logged or not.
I would be much obliged if someone can direct me in the right direction for this if it's possible to do.
Thanks in advance! :)
I am not 100% sure what you are after from your question, but it sounds like you may be looking for a way to mock the file system.
PHPUnit can work with vfsstream to do this. The PHPUnit manual gives some guidance on this.

Geb: Moving on from a failed test rather than stopping the run

I'm (learning how to) writing and running Geb tests in Intellij. How do I configure Geb so that it runs all my tests rather than stop at the first fail and leaving the rest not run?
When using Spock's #Stepwise all feature methods are run in the order of their declaration in the spec and if one feature method fails then all the following feature methods are being skipped.
I created a #StepThrough annotation by subclassing #Stepwise and taking out the line of code that fails the entire testsuite after a single failure. You can grab the code here

Resources