libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Cwrapper should not eat -- arguments


From: Charles Wilson
Subject: Re: [PATCH] Cwrapper should not eat -- arguments
Date: Mon, 26 May 2008 10:17:08 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

Ralf Wildenhues wrote:

Of course, if $build != $host, and $build does not have a suitable emulation environment, everything in the whole test suite will fail/skip anyway, so that concern may not be an issue...

Again, I don't understand.

1. in a cross-compile case
2. where you do not have an emulation environment for $host

no application that you link will be runnable. So any test that depends on running a compiled executable will fail unless it is skipped. But it sure won't PASS.

Just because we don't use the cwrapper in
a test, doesn't mean that the test would now magically fail to pass "--"
on to the real program.

Okay, but now you have a wierd case. Suppose your test case relies on *running* the target executable, not just "I successfully linked it". There are several cases:

(1) native -- this should work everywhere. So you could have a target program that reports its args, and verify that it gets the passed-on '--' argument
   (a) on $host=cygwin|mingw, this will test the cwrapper
   (b) on all other $host, this will test the shell wrapper

(2) cross-to-mingw, $build has emulation environment -- this should work. Again, your target prog would act as above, and you could verify that '--' was passed on. [Aside: it could also report its env, so you could verify that the PATH was properly manipulated. But then the test would need to be different for different $host; in one case, it needs to verify LD_LIBRARY_PATH, on another, SHLIB_PATH, on another, PATH -- unless this particular testcase is going to be $host-specific] (a) ignoring the Aside, this will exercise/test the cwrapper in a cross environment

(3) cross-to-mingw, $build has no emulation environment. Will not work, because the cwrapper is a $host program (as is the target exe). You can't run it. You can't test it. All you can do is verify that it linked correctly.

(4) cross-to-cygwin, $build has emul env: currently won't work, because no support in cwrapper for this case. Coming soon.

(5) cross-to-cygwin, no emul env on $build: see (3).

(6) cross-to-[any but mingw|cygwin]: would exercise the shell wrapper, but the target executable will fail, because you can't run $host executables on $build. So how do you verify that the shell wrapper is passing on the correct arguments? Replace the target executable with a $build executable, after the fact?

This is a LOT of special casing.

It simply doesn't exercise the cwrapper, but
hey, what's the problem with that?  It may just help to avoid a bug in
the shell wrapper, too, given that it is exercised, and if neither, no
problem either.

See above.

--
Chuck




reply via email to

[Prev in Thread] Current Thread [Next in Thread]