From patchwork Thu Dec 13 09:16:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 1012691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-492329-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="nhfo2ZLE"; dkim-atps=neutral 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 43Fp2l5JBgz9s0t for ; Thu, 13 Dec 2018 20:16:30 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=ii5UjlrHwQlA9rAOO/mbWvjFintREYawii50kNGT5msVG71vfm 51/9aMfRuoqZsCE+PKxMKAQHvLg6F2NgcPsCjMOvJhzskGzpxSfGcVHQEiydWDub hqZAmLWDsEvGGLY3AT/I4M4QNh7Jkc3hUgdFphbhK3/JaWJTZyifu8dPk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=g5mJOEpKTwD1sAEyr25t8l0KPls=; b=nhfo2ZLECb8cIZ9TApbA Bux42u3L3/aD86qkFybnp5ssqjlpBtzweBXjy6F4qCvqrTO/ac/PWOaUzh6+FuIO pjfOBIVI9ojq+sAd3fL+uTZSOUq4Lt1aoa/tijlLNJMnlABgskdcUMyXCSdUMCQk mojJNwAn+dqWA54bjcodvBU= Received: (qmail 24726 invoked by alias); 13 Dec 2018 09:16:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24692 invoked by uid 89); 13 Dec 2018 09:16:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=omitting, Initialize X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Dec 2018 09:16:19 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 7651A10B; Thu, 13 Dec 2018 10:16:15 +0100 (CET) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id dVQG4i6R4rH6; Thu, 13 Dec 2018 10:16:12 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 452FD108; Thu, 13 Dec 2018 10:16:12 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id wBD9GA2h023363; Thu, 13 Dec 2018 10:16:10 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Iain Buclaw Subject: [testsuite] Include gdc.test prefix in test names (PR testsuite/88041) Date: Thu, 13 Dec 2018 10:16:10 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes As reported in the PR, the test names of DejaGnu tests should be the path relative to the respective testsuite directory, a convention the gdc.test tests currently don't follow. The patch below fixes this. After a few false starts (some described in the PR and several more) I came up with the following minimally intrusive solution. This way, the gdc.test prefix is included in the test names but stripped out again in gdc-dg-test so all path names in the upstream testsuite (which don't include the prefix) continue to work. The link from gdc.test to . in the gdc* dirs is still needed because e.g. scanning the sources for dg- directives happens in dg-runtest before entering dg-test and thus still needs the prefixed form. I'm omitting the changes (also mentioned in the PR) to compilable/ddoc9676a.d and compilable/depsOutput9948.d which contain absolute path names in EXTRA_SOURCES because those need to go upstream first. Bootstrapped without regressions on i386-pc-solaris2.11 and x86_64-pc-linux-gnu. Ok for mainline? Rainer # HG changeset patch # Parent 10a25e7dfa1774247c9accc8f36c21dabdf72c44 Fix various gdc.test issues diff --git a/gcc/testsuite/gdc.test/gdc-test.exp b/gcc/testsuite/gdc.test/gdc-test.exp --- a/gcc/testsuite/gdc.test/gdc-test.exp +++ b/gcc/testsuite/gdc.test/gdc-test.exp @@ -180,6 +180,7 @@ proc dmd2dg { base test } { global DEFAULT_DFLAGS global PERMUTE_ARGS global GDC_EXECUTE_ARGS + global subdir set PERMUTE_ARGS $DEFAULT_DFLAGS set GDC_EXECUTE_ARGS "" @@ -360,6 +361,9 @@ proc gdc-do-test { } { # Initialize `dg'. dg-init + # Create gdc.test link so test names include that subdir. + catch { file link $subdir . } + # Main loop. # set verbose 1 @@ -380,7 +384,8 @@ proc gdc-do-test { } { # Convert to DG test. set imports [format "-I%s/%s" $base $dir] - set filename [dmd2dg $base $dir/$name.$ext] + # Include $subdir prefix so test names follow DejaGnu conventions. + set filename "$subdir/[dmd2dg $base $dir/$name.$ext]" if { $dir == "runnable" } { append PERMUTE_ARGS " $SHARED_OPTION" @@ -423,7 +428,7 @@ proc gdc-do-test { } { } # Cleanup - #file delete $filename + file delete $filename } # All done. diff --git a/gcc/testsuite/lib/gdc-dg.exp b/gcc/testsuite/lib/gdc-dg.exp --- a/gcc/testsuite/lib/gdc-dg.exp +++ b/gcc/testsuite/lib/gdc-dg.exp @@ -32,6 +32,10 @@ proc gdc-dg-test { prog do_what extra_to } } + # Strip gdc.test prefix off test names to avoid pathname failures in + # some tests. + set prog [dg-trim-dirname gdc.test $prog] + set result \ [gcc-dg-test-1 gdc_target_compile $prog $do_what $extra_tool_flags]