From patchwork Mon Jun 9 16:44:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 357567 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 6169C140081 for ; Tue, 10 Jun 2014 02:44:43 +1000 (EST) 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=vP0T/8zxqTJrWCFpnnKqVmJvAOBSK +Jnjnx+e9fzW0rFRgTjsliynzt0PxuPDBrxxa4YbXPCswm+GWGblu9iRJJuwBn3P jv4Zmq6f5hMXVweulHIs0NlnTc3QkpWZXZ1ic0xFh6fanunBJAU5+NCyq9/CIQX+ NOnvyDfldxssTM= 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=FrGwrDlp3jpm9fhMCspKhxEnfUE=; b=Lhv EftwExgGB+D83BMFGzzp+/V/yHeWIBSO/1PUMFR/0zaC4dRzzNZmfrPce7gBfBzb s8QkENGZ9CaMxrV2dFBD/15v2lC8vAWf8tjf59Gs/EMDunv4r0mIldLHlos23m92 QagotHLROi2oCB5AnNHDT44Z4HnKy/7fJa7ctZW4= Received: (qmail 7129 invoked by alias); 9 Jun 2014 16:44:37 -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 7114 invoked by uid 89); 9 Jun 2014 16:44:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Mon, 9 Jun 2014 16:44:23 +0000 From: "Joseph S. Myers" To: Subject: Remove special makefile rules / .sh files for some localedata tests Message-ID: MIME-Version: 1.0 The localedata tests tst-mbswcs and tst-wctype use custom .sh scripts and makefile rules, but have no need to do so. tst-mbswcs.sh runs a series of test programs in succession (and nothing special is done with the output of the programs); this patch makes the separate tests into ordinary tests run directly by the usual makefile rules. tst-wctype.sh runs one test with an environment variable and input redirection; generic makefile rules also cover that, so again this patch converts it into an ordinary test. (The makefile dependency of tst-wctype.out on sort-test.out that this patch removes appears to be a cut-and-paste error; the test does not appear to use that file. There is already a generic dependency of ordinary tests in this directory on $(addprefix $(objpfx),$(CTYPE_FILES)).) Tested x86_64. localedata/ChangeLog: 2014-06-09 Joseph Myers * Makefile (test-srcs): Remove tst-mbswcs1, tst-mbswcs2, tst-mbswcs3, tst-mbswcs4, tst-mbswcs5 and tst-wctype. (generated): Remove tst-mbswcs.out. (tests): Add tst-mbswcs1, tst-mbswcs2, tst-mbswcs3, tst-mbswcs4, tst-mbswcs5 and tst-wctype. (tests-special): Remove $(objpfx)tst-mbswcs.out and $(objpfx)tst-wctype.out. ($(objpfx)tst-mbswcs.out): Remove rule. ($(objpfx)tst-wctype.out): Likewise. (tst-wctype-ENV): New variable. * tst-mbswcs.sh: Remove file. * tst-wctype.sh: Likewise. diff --git a/localedata/Makefile b/localedata/Makefile index 6dc2524..76eeedf 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -34,8 +34,7 @@ vpath %.h tests-mbwc test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans \ - tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \ - tst-ctype tst-wctype tst-langinfo tst-langinfo-static tst-numeric + tst-ctype tst-langinfo tst-langinfo-static tst-numeric test-input := de_DE.ISO-8859-1 en_US.ISO-8859-1 da_DK.ISO-8859-1 \ hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 tr_TR.UTF-8 fr_FR.UTF-8 \ si_LK.UTF-8 @@ -52,7 +51,7 @@ fmon-tests = n01y12 n02n40 n10y31 n11y41 n12y11 n20n32 n30y20 n41n00 \ y01y10 y02n22 y22n42 y30y21 y32n31 y40y00 y42n21 generated += $(test-input) $(test-output) sort-test.out tst-locale.out \ - tst-mbswcs.out tst-leaks.mtrace mtrace-tst-leaks.out + tst-leaks.mtrace mtrace-tst-leaks.out generated-dirs += $(ld-test-names) tt_TT de_DE.437 \ $(addprefix tstfmon_,$(fmon-tests)) \ @@ -73,8 +72,9 @@ locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \ tst_wctype tst_wcwidth tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \ - tst-leaks tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \ - tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2 + tst-leaks tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \ + tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \ + tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2 tst-wctype tests-static = bug-setlocale1-static tests += $(tests-static) ifeq (yes,$(build-shared)) @@ -93,8 +93,7 @@ tests: $(objdir)/iconvdata/gconv-modules tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \ $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \ - $(objpfx)tst-trans.out $(objpfx)tst-mbswcs.out \ - $(objpfx)tst-ctype.out $(objpfx)tst-wctype.out \ + $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \ $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out \ $(objpfx)tst-numeric.out tests-static += tst-langinfo-static @@ -189,24 +188,12 @@ $(objpfx)tst-trans.out: tst-trans.sh $(objpfx)tst-trans \ '$(test-program-prefix-before-env)' \ '$(test-program-prefix-after-env)'; \ $(evaluate-test) -$(objpfx)tst-mbswcs.out: tst-mbswcs.sh $(objpfx)tst-mbswcs1 \ - $(objpfx)tst-mbswcs2 $(objpfx)tst-mbswcs3 \ - $(objpfx)tst-mbswcs4 $(objpfx)tst-mbswcs5 \ - $(addprefix $(objpfx),$(CTYPE_FILES)) - $(SHELL) $< $(common-objpfx) '$(test-program-prefix)'; \ - $(evaluate-test) $(objpfx)tst-ctype.out: tst-ctype.sh $(objpfx)tst-ctype \ $(objpfx)sort-test.out \ $(addprefix $(objpfx),$(CTYPE_FILES)) $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \ '$(run-program-env)' '$(test-program-cmd-after-env)'; \ $(evaluate-test) -$(objpfx)tst-wctype.out: tst-wctype.sh $(objpfx)tst-wctype \ - $(objpfx)sort-test.out tst-wctype.input \ - $(addprefix $(objpfx),$(CTYPE_FILES)) - $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \ - '$(run-program-env)' '$(test-program-cmd-after-env)'; \ - $(evaluate-test) $(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \ $(objpfx)sort-test.out \ $(addprefix $(objpfx),$(CTYPE_FILES)) @@ -250,6 +237,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-locales-dir echo ' done'; \ tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP +tst-wctype-ENV = LC_ALL=ja_JP.EUC-JP tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace $(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out diff --git a/localedata/tst-mbswcs.sh b/localedata/tst-mbswcs.sh deleted file mode 100755 index 1cfc482..0000000 --- a/localedata/tst-mbswcs.sh +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/sh -# Testing the implementation of the mb*towc*() and wc*tomb*() functions. -# Copyright (C) 2000-2014 Free Software Foundation, Inc. -# This file is part of the GNU C Library. - -# The GNU C Library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. - -# The GNU C Library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. - -# You should have received a copy of the GNU Lesser General Public -# License along with the GNU C Library; if not, see -# . - -set -e - -common_objpfx=$1; shift -test_program_prefix=$1; shift - -status=0 - -# Run the test programs. -${test_program_prefix} ${common_objpfx}localedata/tst-mbswcs1 \ - > ${common_objpfx}localedata/tst-mbswcs.out || status=1 - -${test_program_prefix} ${common_objpfx}localedata/tst-mbswcs2 \ - >> ${common_objpfx}localedata/tst-mbswcs.out || status=1 - -${test_program_prefix} ${common_objpfx}localedata/tst-mbswcs3 \ - >> ${common_objpfx}localedata/tst-mbswcs.out || status=1 - -${test_program_prefix} ${common_objpfx}localedata/tst-mbswcs4 \ - >> ${common_objpfx}localedata/tst-mbswcs.out || status=1 - -${test_program_prefix} ${common_objpfx}localedata/tst-mbswcs5 \ - >> ${common_objpfx}localedata/tst-mbswcs.out || status=1 - -exit $status diff --git a/localedata/tst-wctype.sh b/localedata/tst-wctype.sh deleted file mode 100755 index 53b88b5..0000000 --- a/localedata/tst-wctype.sh +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh -# Test locale-define character classes. -# Copyright (C) 1999-2014 Free Software Foundation, Inc. -# This file is part of the GNU C Library. - -# The GNU C Library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. - -# The GNU C Library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. - -# You should have received a copy of the GNU Lesser General Public -# License along with the GNU C Library; if not, see -# . - -set -e - -common_objpfx=$1 -tst_wctype_before_env=$2 -run_program_env=$3 -tst_wctype_after_env=$4 - -# Run the test program. -${tst_wctype_before_env} \ -${run_program_env} \ -LC_ALL=ja_JP.EUC-JP ${tst_wctype_after_env} < tst-wctype.input \ - > ${common_objpfx}localedata/tst-wctype.out - -exit $?