Re: [PATCH] tests: skip with-pic test when no real pic flag is used.
On 2012-10-07 11:59, Roumen Petrov wrote: Peter Rosin wrote: On 2012-09-19 23:02, Roumen Petrov wrote: What about to skip test only if DLL_EXPORT is in pic_flag ? Since the patch has already been pushed and it is only a test that may be skipped on some other platforms, I'm going to wait for a bit until someone can confirm if this change has in fact caused skips where the test used to pass. So, not rushing this one... I can not understand why you expect someone to confirm. a) how many users use platform with PIC default ? b) how many users build with libtool instead that vendor (proprietary) build system ? c) how many users test libtool ? d) how many users report skipped tests if no one of the tests fail ? e) how many users run unreleased libtools? I wasn't *expecting* a *user* to confirm. I was *hoping* a fellow *developer* could provide feedback. Anyway, the change is simple if needed: So push it. Right. Pushed, with fixed quoting. Cheers, Peter
Re: [PATCH] tests: skip with-pic test when no real pic flag is used.
Peter Rosin wrote: On 2012-09-19 23:02, Roumen Petrov wrote: Peter Rosin wrote: SNIP] So, what do you mean? On woe libtool define -DDLL_EXPORT as pic flag . So the value is pic_flag= -DDLL_EXPORT -DPIC On some other platform PIC default. I don't have asses to those platforms and I could guess that the value is pic_flag=-DPIC, i.e. only wit defines. Ah, now the objection makes sense. Thanks for spelling it out! If I understand patched code properly, skip the test if pic_flag contain only defines. This mean that other platform will be skipped too. Correct. What about to skip test only if DLL_EXPORT is in pic_flag ? Since the patch has already been pushed and it is only a test that may be skipped on some other platforms, I'm going to wait for a bit until someone can confirm if this change has in fact caused skips where the test used to pass. So, not rushing this one... I can not understand why you expect someone to confirm. a) how many users use platform with PIC default ? b) how many users build with libtool instead that vendor (proprietary) build system ? c) how many users test libtool ? d) how many users report skipped tests if no one of the tests fail ? Anyway, the change is simple if needed: So push it. -real_pic=false +no_dlls=: case $pic_flag in -[* [^ -]* | * -[^D]*]) real_pic=: ;; +* -DDLL_EXPORT *) no_dlls=false ;; esac -AT_CHECK([$real_pic || exit 77]) +AT_CHECK([$no_dlls || exit 77]) Cheers, Peter Roumen
[PATCH] tests: skip with-pic test when no real pic flag is used.
* tests/with-pic.at: Windows uses -DDLL_EXPORT -DPIC as the pic flag, but never applies it to static libraries. Cater for this and skip if no real pic flag is in use. Signed-off-by: Peter Rosin p...@lysator.liu.se --- tests/with-pic.at | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) Ok to push? I tried to eliminate the loop using variants of this: real_pic=false case $pic_flag in * [^-]* | * -[^D]*) real_pic=: ;; esac AT_CHECK([$real_pic || exit 77]) ...but I never got that to work in the test. It worked in an interactive bash though. Strange. Cheers, Peter diff --git a/tests/with-pic.at b/tests/with-pic.at index cee5e32..e4f52c2 100644 --- a/tests/with-pic.at +++ b/tests/with-pic.at @@ -24,7 +24,16 @@ AT_SETUP([test --with-pic]) eval `$LIBTOOL --config | $EGREP '^(pic_flag|FGREP)='` -AT_CHECK([test -n $pic_flag || exit 77]) +# skip if there is no real pic flag (-D defines don't count) +set x $pic_flag +shift +for pf; do + case $1 in +-D*) shift ;; +*) break ;; + esac +done +AT_CHECK([test $# -ne 0 || exit 77]) AT_CHECK([test . != $at_srcdir || exit 77]) CONFIGURE=$abs_top_srcdir/tests/demo/configure -- 1.7.9
Re: [PATCH] tests: skip with-pic test when no real pic flag is used.
Hi Peter, On 19 ก.ย. 2012, at 15:56, Peter Rosin p...@lysator.liu.se wrote: * tests/with-pic.at: Windows uses -DDLL_EXPORT -DPIC as the pic flag, but never applies it to static libraries. Cater for this and skip if no real pic flag is in use. [[...]] Ok to push? Yes, with nit below addressed. Thanks! I tried to eliminate the loop using variants of this: real_pic=false case $pic_flag in * [^-]* | * -[^D]*) real_pic=: ;; esac AT_CHECK([$real_pic || exit 77]) ...but I never got that to work in the test. It worked in an interactive bash though. Strange. M4 will strip one level of square brackets as it generates the testsuite script. Normally we just put an extra level of quoting around regexps/globs to account for that: [* [^-]* | * -[^D]*]) real_pic=: ;; (untested -- still on vacation ;-) Cheers, -- Gary V. Vaughan (gary AT gnu DOT org)
Re: [PATCH] tests: skip with-pic test when no real pic flag is used.
On 2012-09-19 11:20, Gary V. Vaughan wrote: Hi Peter, On 19 ก.ย. 2012, at 15:56, Peter Rosin p...@lysator.liu.se wrote: * tests/with-pic.at: Windows uses -DDLL_EXPORT -DPIC as the pic flag, but never applies it to static libraries. Cater for this and skip if no real pic flag is in use. [[...]] Ok to push? Yes, with nit below addressed. Thanks! I tried to eliminate the loop using variants of this: real_pic=false case $pic_flag in * [^-]* | * -[^D]*) real_pic=: ;; esac AT_CHECK([$real_pic || exit 77]) ...but I never got that to work in the test. It worked in an interactive bash though. Strange. M4 will strip one level of square brackets as it generates the testsuite script. Normally we just put an extra level of quoting around regexps/globs to account for that: [* [^-]* | * -[^D]*]) real_pic=: ;; Doh! Face-palm. It's been a while... I needed an extra space to not seeas a real pic flag. This is what I pushed: Cheers, Peter diff --git a/tests/with-pic.at b/tests/with-pic.at index cee5e32..915acf5 100644 --- a/tests/with-pic.at +++ b/tests/with-pic.at @@ -24,7 +24,11 @@ AT_SETUP([test --with-pic]) eval `$LIBTOOL --config | $EGREP '^(pic_flag|FGREP)='` -AT_CHECK([test -n $pic_flag || exit 77]) +real_pic=false +case $pic_flag in +[* [^ -]* | * -[^D]*]) real_pic=: ;; +esac +AT_CHECK([$real_pic || exit 77]) AT_CHECK([test . != $at_srcdir || exit 77]) CONFIGURE=$abs_top_srcdir/tests/demo/configure
Re: [PATCH] tests: skip with-pic test when no real pic flag is used.
Peter Rosin wrote: * tests/with-pic.at: Windows uses -DDLL_EXPORT -DPIC as the pic flag, but never applies it to static libraries. Cater for this and skip if no real pic flag is in use. I'm not sure that this test is suitable for mingw host. Signed-off-by: Peter Rosin p...@lysator.liu.se --- tests/with-pic.at | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) Ok to push? No as libtool should define -DPIC and for mingw host pic flag is -DDLL_EXPORT Roumen
Re: [PATCH] tests: skip with-pic test when no real pic flag is used.
On 2012-09-19 21:43, Roumen Petrov wrote: Peter Rosin wrote: * tests/with-pic.at: Windows uses -DDLL_EXPORT -DPIC as the pic flag, but never applies it to static libraries. Cater for this and skip if no real pic flag is in use. I'm not sure that this test is suitable for mingw host. Signed-off-by: Peter Rosin p...@lysator.liu.se --- tests/with-pic.at | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) Ok to push? No as libtool should define -DPIC and for mingw host pic flag is -DDLL_EXPORT The test skips on MinGW with the patch, w/o the patch it fails. You are first saying that the test is not suitable for MinGW (implying that a skip is in order), and then you don't like the patch (implying that a fail is good news). You don't make any sense. So, what do you mean? Cheers, Peter
Re: [PATCH] tests: skip with-pic test when no real pic flag is used.
Peter Rosin wrote: On 2012-09-19 21:43, Roumen Petrov wrote: Peter Rosin wrote: * tests/with-pic.at: Windows uses -DDLL_EXPORT -DPIC as the pic flag, but never applies it to static libraries. Cater for this and skip if no real pic flag is in use. I'm not sure that this test is suitable for mingw host. Signed-off-by: Peter Rosin p...@lysator.liu.se --- tests/with-pic.at | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) Ok to push? No as libtool should define -DPIC and for mingw host pic flag is -DDLL_EXPORT The test skips on MinGW with the patch, w/o the patch it fails. You are first saying that the test is not suitable for MinGW (implying that a skip is in order), and then you don't like the patch (implying that a fail is good news). You don't make any sense. So, what do you mean? On woe libtool define -DDLL_EXPORT as pic flag . So the value is pic_flag= -DDLL_EXPORT -DPIC On some other platform PIC default. I don't have asses to those platforms and I could guess that the value is pic_flag=-DPIC, i.e. only wit defines. If I understand patched code properly, skip the test if pic_flag contain only defines. This mean that other platform will be skipped too. What about to skip test only if DLL_EXPORT is in pic_flag ? Cheers, Peter Roumen
Re: [PATCH] tests: skip with-pic test when no real pic flag is used.
On 2012-09-19 23:02, Roumen Petrov wrote: Peter Rosin wrote: On 2012-09-19 21:43, Roumen Petrov wrote: Peter Rosin wrote: * tests/with-pic.at: Windows uses -DDLL_EXPORT -DPIC as the pic flag, but never applies it to static libraries. Cater for this and skip if no real pic flag is in use. I'm not sure that this test is suitable for mingw host. Signed-off-by: Peter Rosin p...@lysator.liu.se --- tests/with-pic.at | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) Ok to push? No as libtool should define -DPIC and for mingw host pic flag is -DDLL_EXPORT The test skips on MinGW with the patch, w/o the patch it fails. You are first saying that the test is not suitable for MinGW (implying that a skip is in order), and then you don't like the patch (implying that a fail is good news). You don't make any sense. So, what do you mean? On woe libtool define -DDLL_EXPORT as pic flag . So the value is pic_flag= -DDLL_EXPORT -DPIC On some other platform PIC default. I don't have asses to those platforms and I could guess that the value is pic_flag=-DPIC, i.e. only wit defines. Ah, now the objection makes sense. Thanks for spelling it out! If I understand patched code properly, skip the test if pic_flag contain only defines. This mean that other platform will be skipped too. Correct. What about to skip test only if DLL_EXPORT is in pic_flag ? Since the patch has already been pushed and it is only a test that may be skipped on some other platforms, I'm going to wait for a bit until someone can confirm if this change has in fact caused skips where the test used to pass. So, not rushing this one... Anyway, the change is simple if needed: -real_pic=false +no_dlls=: case $pic_flag in -[* [^ -]* | * -[^D]*]) real_pic=: ;; +* -DDLL_EXPORT *) no_dlls=false ;; esac -AT_CHECK([$real_pic || exit 77]) +AT_CHECK([$no_dlls || exit 77]) Cheers, Peter