From patchwork Fri Mar 17 01:21:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 740085 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vkndQ5HL7z9ryZ for ; Fri, 17 Mar 2017 12:22:34 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="jCnO+1Y0"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=p7DZbwvyHIjI2w2t3HLaCvLzOiBwp /ZkjWse+PHcxSg7+ae2wan2u7VucB06gNpFK1xvKsla0IhmQe/0EM+Juwlgz8c1u U+mkP8qKQr6lt9fZNlYnMV8rnmzgnnHxlezo2X9lX2N5fi5WY76v7p03uGJ8IthH OF+Ss+dzK0z1Hk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=MsE8nf08ySH1RRr130sxrAGysno=; b=jCn O+1Y09hftIDKyhs6f5UociAjrl2ysFe8vhC0D7Zk0A0Bk6W5vQ+4GLPxQp5UuawG nilr2JUbzBBB/zvrp8YRXHruX1PA1UtRPJUrLX7zU+/AnzoR0ixF1mXPO6p1jwx9 R40EK3lcFPm2RsqTDCBf1v0mhuD+8nMoqBLa2pN4= Received: (qmail 88800 invoked by alias); 17 Mar 2017 01:22:12 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 88570 invoked by uid 89); 17 Mar 2017 01:22:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:2723 X-HELO: relay1.mentorg.com Date: Fri, 17 Mar 2017 01:21:59 +0000 From: Joseph Myers To: Subject: conformtest: Skip execution tests when cross-compiling [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) This patch makes conformtest skip execution tests when cross-compiling, as an interim step towards running most of these tests (presently disabled) in that case. It omits the (obvious) Makefile change to actually enable the conformtest tests when cross-compiling, as there are still enough failures seen with build-many-glibcs.py that I'd like to get the results cleaner before enabling these tests. Tested for x86_64, and with the tests actually enabled for cross-compilation with build-many-glibcs.py. Committed. 2017-03-17 Joseph Myers * conform/conformtest.pl ($cross): New variable. (--cross): New command-line option. (runtest): Skip test execution when cross-compiling. * conform/Makefile (conformtest-cross): New variable. ($(conformtest-header-tests)): Pass $(conformtest-cross) to conformtest.pl. diff --git a/conform/Makefile b/conform/Makefile index c07cc1d..eb2288f 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -197,13 +197,19 @@ conformtest-cc-flags = -I../include $(+sysdep-includes) $(sysincludes) -I.. # in xfail[cond]- lines in test expectations. conformtest-xfail = $(if $(conformtest-xfail-conds),\ --xfail='$(conformtest-xfail-conds)') +ifeq (no,$(cross-compiling)) +conformtest-cross = +else +conformtest-cross = --cross +endif $(conformtest-header-tests): $(objpfx)%/conform.out: \ conformtest.pl $(conformtest-headers-data) (set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \ mkdir -p $(@D)/scratch; \ $(PERL) -I. conformtest.pl --tmpdir=$(@D)/scratch --cc='$(CC)' \ --flags='$(conformtest-cc-flags)' --standard=$$std \ - --headers=$$hdr $(conformtest-xfail) > $@); \ + --headers=$$hdr $(conformtest-xfail) $(conformtest-cross) \ + > $@); \ $(evaluate-test) $(linknamespace-symlists-tests): $(objpfx)symlist-%: list-header-symbols.pl diff --git a/conform/conformtest.pl b/conform/conformtest.pl index 41682e9..7594f46 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -7,10 +7,11 @@ use POSIX; $standard = "XOPEN2K8"; $CC = "gcc"; $tmpdir = "/tmp"; +$cross = ""; $xfail_str = ""; GetOptions ('headers=s' => \@headers, 'standard=s' => \$standard, 'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir, - 'xfail=s' => \$xfail_str); + 'cross' => \$cross, 'xfail=s' => \$xfail_str); @headers = split(/,/,join(',',@headers)); # List of the headers we are testing. @@ -192,6 +193,8 @@ sub runtest } note_error($xfail); $result = 1; + } elsif ($cross) { + printf (" SKIP\n"); } else { # Now run the program. If the exit code is not zero something is wrong. $result = system "$fnamebase > $fnamebase.out2 2>&1";