[GenABEL-dev] Hardcoded paths in OmicABELnoMM's test.cpp
L.C. Karssen
lennart at karssen.org
Mon Oct 27 22:23:30 CET 2014
On 27-10-14 22:17, Frank, Alvaro Jesus wrote:
> Yea that is ok, that is not the program but the test program.
>
> That is make test.
I know, but because it uses hardcoded paths 'make distcheck' fails,
because of the way it attempts a VPATH build. When you run 'make
distcheck' two things are done: an environment variable is set to the
correct source location and a make variable is set. So that's why I
proposed to use this make variable to add the actual path used by 'make
distcheck' to the test.cpp file when compiling. I think that is the
cleanest/easiest solution.
Lennart.
>
> -Alvaro
> ________________________________________
> From: L.C. Karssen [lennart at karssen.org]
> Sent: Monday, October 27, 2014 10:16 PM
> To: Frank, Alvaro Jesus; GenABEL Development list
> Subject: Re: [GenABEL-dev] Hardcoded paths in OmicABELnoMM's test.cpp
>
> On 27-10-14 22:11, Frank, Alvaro Jesus wrote:
>> Which files? what do you mean hardcoded? the user already specifies the paths.
>
> in checks/test.cpp, for example on lines 188--201:
>
> params.fnameOutFiles = "examples/results/normal";
> params.fnameAL = "examples/interactions/XL";
> params.fnameAR = "examples/interactions/XR";
> params.fnameY = "examples/interactions/Y";
>
> params.use_interactions = true;
> params.r = 2;
> params.limit_t = 50;
> params.limit_m = params.limit_t * params.r;
> // params.limit_n = 1000;
> params.fname_excludelist = "examples/exclude_individuals.txt";
> string source_path = "examples/interactions/INT";
> string out_path[] = {"examples/results/single_inter_",
> "examples/results/multi_inter_"};
>
> The way I understand this is that the path examples/interactions,
> examples/results, etc. are fixed.
>
>
> Lennart.
>
>> ________________________________________
>> From: genabel-devel-bounces at lists.r-forge.r-project.org [genabel-devel-bounces at lists.r-forge.r-project.org] on behalf of L.C. Karssen [lennart at karssen.org]
>> Sent: Monday, October 27, 2014 9:42 PM
>> To: GenABEL Development list
>> Subject: [GenABEL-dev] Hardcoded paths in OmicABELnoMM's test.cpp
>>
>> Hi Alvaro,
>>
>> When I looked into the checks for OmicABELnoMM I noticed that the paths
>> to input and output files are hardcoded in the cpp file. While this is
>> (probably) OK for the file names, the fact that directories are
>> hardcoded also results in problems when running 'make distcheck'.
>>
>> What would be the easiest way to enable the user to specify a path for
>> input and output files?
>> 'make distcheck' sets an environment variable [1], so we could check for
>> that. But since it also sets the path as a make variable, I guess it's
>> easiest to add this path to the source code when compiling.
>> Or, maybe a bit nicer: add a command line option and wrap the check in a
>> shell script that provides the path.
>>
>>
>> What do you think?
>>
>> Lennart.
>>
>> [1]
>> http://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
>>
>> --
>> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>> L.C. Karssen
>> Utrecht
>> The Netherlands
>>
>> lennart at karssen.org
>> http://blog.karssen.org
>> GPG key ID: A88F554A
>> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>>
>
> --
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> L.C. Karssen
> Utrecht
> The Netherlands
>
> lennart at karssen.org
> http://blog.karssen.org
> GPG key ID: A88F554A
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>
--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands
lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20141027/ebdae5aa/attachment.sig>
More information about the genabel-devel
mailing list