How to just run subset of ICG tests in GPDB - greenplum

Usually, the installcheck-good is executed like:
make installcheck-good
However, if I only want to run a single test, how to do it?

Just figure it out. It's actually doable:
cd src/test/regress
./pg_regress <test1> <test2>

Related

Script for running multiple Make Commands

I would like to get insight on how to get started or what general direction to look in when trying to make a script or makefile that will run 3 make commands at once that take in the same input. These three commands all ask for the same input but just output different excel files due to it manipulating the pulled data in different ways. Therefore If I were able to create a script or makefile that ran all three commands at once when giving the input one time it would SAVE ME A TON OF TIME.
This is all being done in putty pretty much (in terms of the commands)
Thanks,
NP
You want to use a shell script.
For instance, you can create run.sh with:
#!/bin/bash
make FLAG1=ON $*
make FLAG2=ON $*
make FLAG3=ON $*
Make it executable and do `./run.sh MYCOMMOFLAG1=ON MYCOMMONFLAG2=OFF...

Accessing parameters passed in make command

My first day with makefile and gulp and here i need to pass couple of parameters in my make command from the terminal and use those params later on elsewhere.
Presently my make command would be "make xyz". Need it to be something like "make xyz --paramOne=abc" and use this "abc" elsewhere in the framework.
Completely at loss here! I have been using grunt and aware of how grunt works. Any help or leads would be of immense help.
Thanks!
Use environment variables.
paramOne=abc make xyz
You can access the inherited environment variables in your code. For example, in Node.js,
console.log(process.env.paramOne);
// => abc

Calling Rspec with syntax like ruby -I

I am trying to use https://github.com/rifraf/Vendorize which is run using a command like
D:\projects\SomeLibrary\lib>ruby -I..\..\Vendorize\lib -rvendorize some_lib.rb
It does something clever where it intercepts required files and logs them, but only the ones that get executed in your command line. On it's documentation pages it says
You can run the program several times with different options if the
required files depend on the options.
Or just run your tests…
I want to run all the tests with the -I function from the command line above, so that all the different avenues of code are run, and the libraries loaded (and logged). Given that I can run them like:
D:\projects\SomeLibrary\lib>rspec ..\spec\some_spec.rb
How do I do this? Thanks!
NB: I am a/ a ruby newbie and b/ running windows
I would try writing something like this at the top of some_spec.rb:
require_relative '..\..\Vendorize\lib\vendorize'
You might need to change that a bit depending on what your working directory is.
Then just runs your specs with rspec as you normally do without any extra commands.
If that doesn't work, then locate the rspec.rb executable and run:
ruby -I..\..\Vendorize\lib -rvendorize path/to/rspec.rb ..\spec\some_spec.rb

invoke make from build

I'd like to simplify the workflow so that rather than issuing these commands
$ make program_unittest
... output of $MAKE ...
$ ./program_unittest args
I could have my program automatically attempt to compile itself (if the source has been updated) when it is run, so that I do not have to go back and run make myself.
Here's what I'm thinking: My unit test build should first check if there is a makefile in the directory it's in, and if so, fork and exec make with the target corresponding to itself. If make determines "nothing to be done", it will continue on its way (running the unit-tests). However, if make actually performs a compilation, one of two things may happen. gcc (invoked by make) might be able to overwrite the build (an older version of which is already running) during compilation, in which case I can then perhaps exec it. If my system does not permit gcc to overwrite the program which is in use, then I have to quit the program before running make.
So this has become quite involved already. Are there perhaps more elegant solutions? Maybe I could use a bash script? How do I ascertain if make issued compilation commands or not?
Why not have make run the unit tests?

how to correctly call unix command from other dirs

I have a relatively simple question that I cant figure out and I cant figure out the right search query to find the info I need on google so I thought I would ask the collective.
In short:
cd /var/www/config
./deploy.sh - works!
but
./var/www/config/deploy.sh
doesnt :(
deploy.sh calls another bash script and it seems that the called script cant find the libs it needs because it searches relative to where it was called from which in this case would be / instead of /var/www as it expects.
I'm trying to call this from a capistrano script therefore need to find a way to call it without having to cd first. Does anyone know a simple way to achieve this?
EDIT: Thanks for your quick suggestions, its still playing up. deploy.sh calls another bash file called sake. I have uploaded a copy here http://tinypaste.com/25fc8
Cheers guys!
Don't put a . (period) in front of your command. Just use:
$ /var/www/config/deploy.sh
You can also wrap it too so you can return to existing dir, sometimes proggies like to pick up the PWD in which to work so might be worth setting it explicitly:
( cd /var/www/config/ && ./deploy.sh )
If you want to remain where you are after the command is done:
(cd /var/www/config; ./deploy.sh)

Resources