forked from rpms/glibc
		
	adds Regression/locale-archive-test(glibc-all-langpacks) test
This commit is contained in:
		
							parent
							
								
									fc64649722
								
							
						
					
					
						commit
						157efe36a2
					
				
							
								
								
									
										63
									
								
								tests/Regression/locale-archive-test/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								tests/Regression/locale-archive-test/Makefile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,63 @@ | |||||||
|  | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | ||||||
|  | #
 | ||||||
|  | #   Makefile of /tools/glibc/Regression/locale-archive-test
 | ||||||
|  | #   Description: What the test does
 | ||||||
|  | #   Author: Sergey Kolosov <skolosov@redhat.com>
 | ||||||
|  | #
 | ||||||
|  | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | ||||||
|  | #
 | ||||||
|  | #   Copyright (c) 2022 Red Hat, Inc.
 | ||||||
|  | #
 | ||||||
|  | #   This program is free software: you can redistribute it and/or
 | ||||||
|  | #   modify it under the terms of the GNU General Public License as
 | ||||||
|  | #   published by the Free Software Foundation, either version 2 of
 | ||||||
|  | #   the License, or (at your option) any later version.
 | ||||||
|  | #
 | ||||||
|  | #   This program 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 General Public License for more details.
 | ||||||
|  | #
 | ||||||
|  | #   You should have received a copy of the GNU General Public License
 | ||||||
|  | #   along with this program. If not, see http://www.gnu.org/licenses/.
 | ||||||
|  | #
 | ||||||
|  | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | ||||||
|  | 
 | ||||||
|  | export TEST=/tools/glibc/Regression/locale-archive-test | ||||||
|  | export TESTVERSION=1.0 | ||||||
|  | 
 | ||||||
|  | BUILT_FILES= | ||||||
|  | 
 | ||||||
|  | FILES=$(METADATA) runtest.sh Makefile PURPOSE test-locale.py | ||||||
|  | 
 | ||||||
|  | .PHONY: all install download clean | ||||||
|  | 
 | ||||||
|  | run: $(FILES) build | ||||||
|  | 	./runtest.sh | ||||||
|  | 
 | ||||||
|  | build: $(BUILT_FILES) | ||||||
|  | 	test -x runtest.sh || chmod a+x runtest.sh | ||||||
|  | 
 | ||||||
|  | clean: | ||||||
|  | 	rm -f *~ $(BUILT_FILES) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | include /usr/share/rhts/lib/rhts-make.include | ||||||
|  | 
 | ||||||
|  | $(METADATA): Makefile | ||||||
|  | 	@echo "Owner:           Sergey Kolosov <skolosov@redhat.com>" > $(METADATA) | ||||||
|  | 	@echo "Name:            $(TEST)" >> $(METADATA) | ||||||
|  | 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA) | ||||||
|  | 	@echo "Path:            $(TEST_DIR)" >> $(METADATA) | ||||||
|  | 	@echo "Description:     What the test does" >> $(METADATA) | ||||||
|  | 	@echo "Type:            Regression" >> $(METADATA) | ||||||
|  | 	@echo "TestTime:        20m" >> $(METADATA) | ||||||
|  | 	@echo "RunFor:          glibc" >> $(METADATA) | ||||||
|  | 	@echo "Requires:        glibc glibc-all-langpacks python3" >> $(METADATA) | ||||||
|  | 	@echo "Priority:        Normal" >> $(METADATA) | ||||||
|  | 	@echo "License:         GPLv2+" >> $(METADATA) | ||||||
|  | 	@echo "Confidential:    no" >> $(METADATA) | ||||||
|  | 	@echo "Destructive:     no" >> $(METADATA) | ||||||
|  | 	@echo "Releases:        RHEL8 RHEL9" >> $(METADATA) | ||||||
|  | 
 | ||||||
|  | 	rhts-lint $(METADATA) | ||||||
							
								
								
									
										5
									
								
								tests/Regression/locale-archive-test/PURPOSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								tests/Regression/locale-archive-test/PURPOSE
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | PURPOSE of /tools/glibc/Regression/locale-archive-test | ||||||
|  | Description: What the test does | ||||||
|  | Author: Sergey Kolosov <skolosov@redhat.com> | ||||||
|  | 
 | ||||||
|  | Test for locale-archive(glibc-all-langpacks). It came from https://bugzilla.redhat.com/show_bug.cgi?id=2057697 | ||||||
							
								
								
									
										15
									
								
								tests/Regression/locale-archive-test/main.fmf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								tests/Regression/locale-archive-test/main.fmf
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | |||||||
|  | summary: What the test does | ||||||
|  | description: | | ||||||
|  |     Test for locale-archive(glibc-all-langpacks). It came from https://bugzilla.redhat.com/show_bug.cgi?id=2057697 | ||||||
|  | contact: Sergey Kolosov <skolosov@redhat.com> | ||||||
|  | component: | ||||||
|  |   - glibc | ||||||
|  | test: ./runtest.sh | ||||||
|  | framework: beakerlib | ||||||
|  | recommend: | ||||||
|  |   - glibc | ||||||
|  |   - glibc-all-langpacks | ||||||
|  |   - python3 | ||||||
|  | duration: 20m | ||||||
|  | extra-summary: /tools/glibc/Regression/locale-archive-test | ||||||
|  | extra-task: /tools/glibc/Regression/locale-archive-test | ||||||
							
								
								
									
										59
									
								
								tests/Regression/locale-archive-test/runtest.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										59
									
								
								tests/Regression/locale-archive-test/runtest.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,59 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k | ||||||
|  | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|  | # | ||||||
|  | #   runtest.sh of /tools/glibc/Regression/locale-archive-test | ||||||
|  | #   Description: What the test does | ||||||
|  | #   Author: Sergey Kolosov <skolosov@redhat.com> | ||||||
|  | # | ||||||
|  | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|  | # | ||||||
|  | #   Copyright (c) 2022 Red Hat, Inc. | ||||||
|  | # | ||||||
|  | #   This program is free software: you can redistribute it and/or | ||||||
|  | #   modify it under the terms of the GNU General Public License as | ||||||
|  | #   published by the Free Software Foundation, either version 2 of | ||||||
|  | #   the License, or (at your option) any later version. | ||||||
|  | # | ||||||
|  | #   This program 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 General Public License for more details. | ||||||
|  | # | ||||||
|  | #   You should have received a copy of the GNU General Public License | ||||||
|  | #   along with this program. If not, see http://www.gnu.org/licenses/. | ||||||
|  | # | ||||||
|  | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|  | 
 | ||||||
|  | # Include Beaker environment | ||||||
|  | . /usr/share/beakerlib/beakerlib.sh || exit 1 | ||||||
|  | 
 | ||||||
|  | PACKAGE="glibc" | ||||||
|  | LANGPACK="glibc-all-langpacks" | ||||||
|  | TESTPROG=test-locale.py | ||||||
|  | 
 | ||||||
|  | rlJournalStart | ||||||
|  |     rlPhaseStartSetup | ||||||
|  |         rlAssertRpm $PACKAGE | ||||||
|  |         rlAssertRpm $LANGPACK | ||||||
|  |         rlAssertNotRpm glibc-minimal-langpack | ||||||
|  |         rlRun -c "dnf remove -y glibc-langpack-*" | ||||||
|  |         rlRun -c "rpm -qa|grep glibc-langpack" 1 | ||||||
|  |         rlRun "TESTTMPDIR=$(mktemp -d)" | ||||||
|  |         rlRun "cp ${TESTPROG} $TESTTMPDIR" | ||||||
|  |         rlRun "pushd $TESTTMPDIR" | ||||||
|  |     rlPhaseEnd | ||||||
|  | 
 | ||||||
|  |     rlPhaseStartTest | ||||||
|  |         rlRun -l "ls -l /usr/lib/locale/" | ||||||
|  |         rlRun -l "locale -a" | ||||||
|  |         rlRun -l "python3 ${TESTPROG}" | ||||||
|  |         rlRun -l "LANG=en_US.UTF-8 /bin/true" | ||||||
|  |     rlPhaseEnd | ||||||
|  | 
 | ||||||
|  |     rlPhaseStartCleanup | ||||||
|  |         rlRun "popd" | ||||||
|  |         rlRun "rm -r $TESTTMPDIR" | ||||||
|  |     rlPhaseEnd | ||||||
|  | rlJournalPrintText | ||||||
|  | rlJournalEnd | ||||||
							
								
								
									
										4
									
								
								tests/Regression/locale-archive-test/test-locale.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tests/Regression/locale-archive-test/test-locale.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | #!/usr/bin/python3 | ||||||
|  | 
 | ||||||
|  | import locale | ||||||
|  | locale.setlocale(locale.LC_ALL,"en_US.UTF-8") | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user