From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: gcc-patches@gcc.gnu.org, Ian Lance Taylor <iant@google.com>
Subject: Re: [build] Support multilib testing in libgo
Date: Sun, 10 Apr 2011 07:46:00 -0000 [thread overview]
Message-ID: <20110410074602.GD28526@gmx.de> (raw)
In-Reply-To: <yddwrj9c21k.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
* Rainer Orth wrote on Mon, Apr 04, 2011 at 08:19:19PM CEST:
> To avoid this mess, I'm instead setting LD_LIBRARY_PATH in CHECK. While
> this isn't exactly portable (some platforms, especially Darwin and
> HP-UX, use different variables), it's at least more widespread than -R.
Toplevel configure computes RPATH_ENVVAR for the host, and toplevel
Makefile passes that. If you need it for the target, it should be
easy to repeat those five lines of code somewhere.
> +check-tail: check-recursive check-multi
> + @lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
> + for dir in . $(MULTIDIRS); do \
> + mv ../$${dir}/$${lib}/libgo.sum ../$${dir}/$${lib}/libgo.sum.sep; \
> + mv ../$${dir}/$${lib}/libgo.log ../$${dir}/$${lib}/libgo.log.sep; \
> + done; \
> + mv libgo.head libgo.sum; \
> + cp libgo.sum libgo.log; \
> + echo "Schedule of variations:" >> libgo.sum; \
> + for dir in . $(MULTIDIRS); do \
> + multidir=../$${dir}/$${lib}; \
> + multivar=`cat $${multidir}/libgo.var`; \
> + echo " $${multivar}" >> libgo.sum; \
> + done; \
> + echo >> libgo.sum; \
> + pass=0; fail=0; untested=0; \
> + for dir in . $(MULTIDIRS); do \
> + multidir=../$${dir}/$${lib}; \
> + multivar=`cat $${multidir}/libgo.var`; \
> + echo "Running target $${multivar}" >> libgo.sum; \
> + echo "Running $(srcdir)/libgo.exp ..." >> libgo.sum; \
> + cat $${multidir}/libgo.sum.sep >> libgo.sum; \
> + cat $${multidir}/libgo.log.sep >> libgo.log; \
> + echo " === libgo Summary for $${multivar} ===" >> libgo.sum; \
> + echo >> libgo.sum; \
> + p=`grep -c PASS $${multidir}/libgo.sum.sep`; \
> + if test "$$p" != "0"; then \
I'd use -ne instead of != here and below.
> + echo "# of expected passes $$p" >> libgo.sum; \
> + fi; \
> + pass=`expr $$pass + $$p`; \
> + p=`grep -c FAIL $${multidir}/libgo.sum.sep`; \
> + if test "$$p" != "0"; then \
> + echo "# of unexpected failures $$p" >> libgo.sum; \
> + fi; \
> + fail=`expr $$fail + $$p`; \
> + p=`grep -c UNTESTED libgo.sum`; \
> + if test "$$p" != "0"; then \
> + echo "# of untested testcases $$p" >> libgo.tail; \
> + fi; \
> + untested=`expr $$untested + $$p`; \
> + done; \
> + echo >> libgo.sum; \
> + echo " === libgo Summary ===" >> libgo.sum; \
> + echo >> libgo.sum; \
> + if test "$$pass" != "0"; then \
> + echo "# of expected passes $$pass" >> libgo.sum; \
> + fi; \
> + if test "$$fail" != "0"; then \
> + echo "# of unexpected failures $$fail" >> libgo.sum; \
> + fi; \
> + if test "$$untested" != "0"; then \
> + echo "# of untested testcases $$untested" >> libgo.sum; \
> + fi; \
> + echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \
This line:
echo `echo $(GOC) | sed -e 's/ .*//'` ...
is equivalent to:
echo $(GOC) ...
as the shell squashes unquoted multiple adjacent white space.
> + echo >> libgo.log; \
> + echo "runtest completed at `date`" >> libgo.log
> +
> check-am:
> @rm -f libgo.sum libgo.log libgo.tail
> - @echo "Test Run By $${USER} on `date`" > libgo.sum
> - @echo "Native configuration is $(host_triplet)" >> libgo.sum
> - @echo >> libgo.sum
> - @echo " === libgo tests ===" >> libgo.sum
> - @echo >> libgo.sum
> - @echo "Schedule of variations:" >> libgo.sum
> - @echo " unix" >> libgo.sum
> - @echo >> libgo.sum
> - @echo "Running target unix" >> libgo.sum
> - @echo "Running $(srcdir)/libgo.exp ..." >> libgo.sum
> - @cp libgo.sum libgo.log
> - @echo > libgo.tail
> - @echo " === libgo summary ===" >> libgo.tail
> - @echo >> libgo.tail
> + @multivar="unix"; \
> + [ -z "$(MULTIFLAGS)" ] || multivar="$${multivar}/$(MULTIFLAGS)"; \
> + echo "$${multivar}" > libgo.var
> @for f in $(TEST_PACKAGES); do \
> rm -f $$f-testsum $$f-testlog; \
> done
> - @$(MAKE) -k $(TEST_PACKAGES); \
> - status=$$?; \
> + -@$(MAKE) -k $(TEST_PACKAGES)
> for f in $(TEST_PACKAGES); do \
> if test -f $$f-testsum; then \
> cat $$f-testsum >> libgo.sum; \
> @@ -3095,27 +3153,12 @@ check-am:
> if test -f $$f-testlog; then \
> cat $$f-testlog >> libgo.log; \
> fi; \
> - done; \
> - p=`grep -c PASS libgo.sum`; \
> - if test "$$p" != "0"; then \
> - echo "# of expected passes $$p" >> libgo.tail; \
> - fi; \
> - p=`grep -c FAIL libgo.sum`; \
> - if test "$$p" != "0"; then \
> - echo "# of unexpected failures $$p" >> libgo.tail; \
> - fi; \
> - p=`grep -c UNTESTED libgo.sum`; \
> - if test "$$p" != "0"; then \
> - echo "# of untested testcases $$p" >> libgo.tail; \
> - fi; \
> - cat libgo.tail >> libgo.sum; \
> - cat libgo.tail >> libgo.log; \
> - echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \
> - echo >> libgo.log; \
> - echo "runtest completed at `date`" >> libgo.log; \
> - exit $$status
> -
> -MOSTLYCLEAN_FILES = libgo.tail
> + done
> +
> +check-multi:
> + $(MULTIDO) $(AM_MAKEFLAGS) DO=check-am multi-do # $(MAKE)
> +
> +MOSTLYCLEAN_FILES = libgo.head libgo.sum.sep libgo.log.sep
>
> mostlyclean-local:
> find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
Cheers,
Ralf
next prev parent reply other threads:[~2011-04-10 7:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 18:19 Rainer Orth
2011-04-10 7:46 ` Ralf Wildenhues [this message]
2011-04-19 18:19 ` Rainer Orth
2011-04-22 19:06 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110410074602.GD28526@gmx.de \
--to=ralf.wildenhues@gmx.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=iant@google.com \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).