← Back to team overview

randgen team mailing list archive

Re: Add a variable to a combinations file

 

Hi Joel,

On 03/10/2014 05:43 PM, Joel Epstein wrote:
Hello,

I am trying to add a --basedir variable to a combinations (.cc) file
such that I can modify what build I am using and implement some
automation.  The cc file is ultimately evaluated by the combinations.pl
file, but I am not having much luck trying to figure out where I can get
this to work.  The first example shows how the location is explicitly
named.  The second shows what the scalar variable I am trying to introduce.


'--grammar=conf/percona_qa/tokudb/tokudb.yy
--gendata=conf/percona_qa/5.6/5.6.zz1 --threads=15 --no-mask
*--basedir=/Debug-Server-Build-Location*',

"--grammar=conf/percona_qa/tokudb/tokudb.yy
--gendata=conf/percona_qa/tokudb/tokudb.zz1 --threads=15 --no-mask
*--basedir=$tokudb_debug_dir*"

I am curious if anyone has attempted this or knows combinations.pl well
enough to make a suggestion or two regarding how I might elegantly
introduce this variable.

In what way does this not work for you?

The use of variables in cc files should work fine, as long as you don't accidentally name the variable the same as a variable in combinations.pl, in which case you may or may not get undefined behavior. Your variable name seems fine in that respect.

Also, as Saikumar indicated, specifying basedir in the cc file may cause some problems under certain circumstances. Especially if you are using two servers (basedirs) in one RQG command, or mixing single-server and dual-server commands in the same cc file. But it does not seem like that is what you are trying to do.


Regards,

--
John



References