Add CI tests using the standard test interface
Adds tests according to the CI wiki [0] specifically the standard test interface in the spec [1]. [0]: https://fedoraproject.org/wiki/CI [1]: https://fedoraproject.org/wiki/Changes/InvokingTests
This commit is contained in:
		
							parent
							
								
									d7e8402013
								
							
						
					
					
						commit
						81473c01fe
					
				
							
								
								
									
										64
									
								
								tests/netrw-plugin-delete-command-broken/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								tests/netrw-plugin-delete-command-broken/Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,64 @@
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
#
 | 
			
		||||
#   Makefile of netrw-plugin-delete-command-broken
 | 
			
		||||
#   Description: Test for netrw plugin: delete command broken
 | 
			
		||||
#   Author: Petr Splichal <psplicha@redhat.com>
 | 
			
		||||
#
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
#
 | 
			
		||||
#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
 | 
			
		||||
#
 | 
			
		||||
#   This copyrighted material is made available to anyone wishing
 | 
			
		||||
#   to use, modify, copy, or redistribute it subject to the terms
 | 
			
		||||
#   and conditions of the GNU General Public License version 2.
 | 
			
		||||
#
 | 
			
		||||
#   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, write to the Free
 | 
			
		||||
#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 | 
			
		||||
#   Boston, MA 02110-1301, USA.
 | 
			
		||||
#
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
export TEST=/CoreOS/vim/Regression/netrw-plugin-delete-command-broken
 | 
			
		||||
export TESTVERSION=1.0
 | 
			
		||||
 | 
			
		||||
BUILT_FILES=
 | 
			
		||||
 | 
			
		||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
 | 
			
		||||
 | 
			
		||||
.PHONY: all install download clean
 | 
			
		||||
 | 
			
		||||
run: $(FILES) build
 | 
			
		||||
	./runtest.sh
 | 
			
		||||
 | 
			
		||||
build: $(BUILT_FILES)
 | 
			
		||||
	chmod a+x runtest.sh
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -f *~ $(BUILT_FILES)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
include /usr/share/rhts/lib/rhts-make.include
 | 
			
		||||
 | 
			
		||||
$(METADATA): Makefile
 | 
			
		||||
	@echo "Owner:           Petr Splichal <psplicha@redhat.com>" > $(METADATA)
 | 
			
		||||
	@echo "Name:            $(TEST)" >> $(METADATA)
 | 
			
		||||
	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
 | 
			
		||||
	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
 | 
			
		||||
	@echo "Description:     Test for netrw plugin: delete command broken" >> $(METADATA)
 | 
			
		||||
	@echo "Type:            Regression" >> $(METADATA)
 | 
			
		||||
	@echo "TestTime:        5m" >> $(METADATA)
 | 
			
		||||
	@echo "RunFor:          vim" >> $(METADATA)
 | 
			
		||||
	@echo "Requires:        vim" >> $(METADATA)
 | 
			
		||||
	@echo "Priority:        Normal" >> $(METADATA)
 | 
			
		||||
	@echo "License:         GPLv2" >> $(METADATA)
 | 
			
		||||
	@echo "Confidential:    no" >> $(METADATA)
 | 
			
		||||
	@echo "Destructive:     no" >> $(METADATA)
 | 
			
		||||
	@echo "Requires:        vim-enhanced" >> $(METADATA)
 | 
			
		||||
 | 
			
		||||
	rhts-lint $(METADATA)
 | 
			
		||||
							
								
								
									
										9
									
								
								tests/netrw-plugin-delete-command-broken/PURPOSE
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								tests/netrw-plugin-delete-command-broken/PURPOSE
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
PURPOSE of netrw-plugin-delete-command-broken
 | 
			
		||||
Description: Test for netrw plugin: delete command broken
 | 
			
		||||
Author: Petr Splichal <psplicha@redhat.com>
 | 
			
		||||
Summary: netrw plugin: delete command broken
 | 
			
		||||
 | 
			
		||||
Description:
 | 
			
		||||
 | 
			
		||||
Regression to to verify the delete command of netrw plugin
 | 
			
		||||
successfully deletes files or directories.
 | 
			
		||||
							
								
								
									
										64
									
								
								tests/netrw-plugin-delete-command-broken/runtest.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										64
									
								
								tests/netrw-plugin-delete-command-broken/runtest.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,64 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
#
 | 
			
		||||
#   runtest.sh of /CoreOS/vim/Regression/netrw-plugin-delete-command-broken
 | 
			
		||||
#   Description: Test for netrw plugin: delete command broken
 | 
			
		||||
#   Author: Petr Splichal <psplicha@redhat.com>
 | 
			
		||||
#
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
#
 | 
			
		||||
#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
 | 
			
		||||
#
 | 
			
		||||
#   This copyrighted material is made available to anyone wishing
 | 
			
		||||
#   to use, modify, copy, or redistribute it subject to the terms
 | 
			
		||||
#   and conditions of the GNU General Public License version 2.
 | 
			
		||||
#
 | 
			
		||||
#   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, write to the Free
 | 
			
		||||
#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 | 
			
		||||
#   Boston, MA 02110-1301, USA.
 | 
			
		||||
#
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
# Include rhts environment
 | 
			
		||||
. /usr/bin/rhts-environment.sh
 | 
			
		||||
. /usr/share/rhts-library/rhtslib.sh
 | 
			
		||||
 | 
			
		||||
PACKAGE="vim-enhanced"
 | 
			
		||||
 | 
			
		||||
rlJournalStart
 | 
			
		||||
    rlPhaseStartSetup
 | 
			
		||||
        rlAssertRpm $PACKAGE
 | 
			
		||||
        rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
 | 
			
		||||
        rlRun "pushd $TmpDir"
 | 
			
		||||
        # create test file & dir
 | 
			
		||||
        rlRun "touch testfile" 0 "Creating test file"
 | 
			
		||||
        rlRun "mkdir testdir" 0 "Creating test directory"
 | 
			
		||||
        rlAssertExists "testfile"
 | 
			
		||||
        rlAssertExists "testdir"
 | 
			
		||||
        # create vim scripts
 | 
			
		||||
        rlRun "echo '/testfile
Dy
:q' > scriptfile" \
 | 
			
		||||
                0 "Creating file delete script"
 | 
			
		||||
        rlRun "echo '/testdir
Dy
:q' > scriptdir" \
 | 
			
		||||
                0 "Creating directory delete script"
 | 
			
		||||
    rlPhaseEnd
 | 
			
		||||
 | 
			
		||||
    rlPhaseStartTest
 | 
			
		||||
        rlRun "vim . -s scriptfile" 0 "Deleting file using netrw"
 | 
			
		||||
        rlAssertNotExists "testfile"
 | 
			
		||||
        rlRun "vim . -s scriptdir" 0 "Deleting directory using netrw"
 | 
			
		||||
        rlAssertNotExists "testdir"
 | 
			
		||||
    rlPhaseEnd
 | 
			
		||||
 | 
			
		||||
    rlPhaseStartCleanup
 | 
			
		||||
        rlRun "popd"
 | 
			
		||||
        rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
 | 
			
		||||
    rlPhaseEnd
 | 
			
		||||
rlJournalPrintText
 | 
			
		||||
rlJournalEnd
 | 
			
		||||
							
								
								
									
										23
									
								
								tests/tests.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								tests/tests.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
			
		||||
---
 | 
			
		||||
# This first play always runs on the local staging system
 | 
			
		||||
- hosts: localhost
 | 
			
		||||
  roles:
 | 
			
		||||
  - role: standard-test-beakerlib
 | 
			
		||||
    tags:
 | 
			
		||||
    - classic
 | 
			
		||||
    - container
 | 
			
		||||
    tests:
 | 
			
		||||
    - netrw-plugin-delete-command-broken
 | 
			
		||||
    - vim-in-ex-mode-incorrectly-gives-an-eol-error
 | 
			
		||||
    required_packages:
 | 
			
		||||
    - vim-minimal
 | 
			
		||||
    - vim-enhanced
 | 
			
		||||
 | 
			
		||||
# Tests for Atomic Host
 | 
			
		||||
- hosts: localhost
 | 
			
		||||
  roles:
 | 
			
		||||
  - role: standard-test-beakerlib
 | 
			
		||||
    tags:
 | 
			
		||||
    - atomic
 | 
			
		||||
    tests:
 | 
			
		||||
    - vim-in-ex-mode-incorrectly-gives-an-eol-error
 | 
			
		||||
							
								
								
									
										63
									
								
								tests/vim-in-ex-mode-incorrectly-gives-an-eol-error/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								tests/vim-in-ex-mode-incorrectly-gives-an-eol-error/Makefile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,63 @@
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
#
 | 
			
		||||
#   Makefile of /CoreOS/vim/Regression/vim-in-ex-mode-incorrectly-gives-an-eol-error
 | 
			
		||||
#   Description: Test for vim in ex mode incorrectly gives an eol error
 | 
			
		||||
#   Author: David Kutalek <dkutalek@redhat.com>
 | 
			
		||||
#
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
#
 | 
			
		||||
#   Copyright (c) 2010 Red Hat, Inc. All rights reserved.
 | 
			
		||||
#
 | 
			
		||||
#   This copyrighted material is made available to anyone wishing
 | 
			
		||||
#   to use, modify, copy, or redistribute it subject to the terms
 | 
			
		||||
#   and conditions of the GNU General Public License version 2.
 | 
			
		||||
#
 | 
			
		||||
#   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, write to the Free
 | 
			
		||||
#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 | 
			
		||||
#   Boston, MA 02110-1301, USA.
 | 
			
		||||
#
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
export TEST=/CoreOS/vim/Regression/vim-in-ex-mode-incorrectly-gives-an-eol-error
 | 
			
		||||
export TESTVERSION=1.0
 | 
			
		||||
 | 
			
		||||
BUILT_FILES=
 | 
			
		||||
 | 
			
		||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE exdoublequote expounddoublequote
 | 
			
		||||
 | 
			
		||||
.PHONY: all install download clean
 | 
			
		||||
 | 
			
		||||
run: $(FILES) build
 | 
			
		||||
	./runtest.sh
 | 
			
		||||
 | 
			
		||||
build: $(BUILT_FILES)
 | 
			
		||||
	chmod a+x runtest.sh
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -f *~ $(BUILT_FILES)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
include /usr/share/rhts/lib/rhts-make.include
 | 
			
		||||
 | 
			
		||||
$(METADATA): Makefile
 | 
			
		||||
	@echo "Owner:           David Kutalek <dkutalek@redhat.com>" > $(METADATA)
 | 
			
		||||
	@echo "Name:            $(TEST)" >> $(METADATA)
 | 
			
		||||
	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
 | 
			
		||||
	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
 | 
			
		||||
	@echo "Description:     Test for vim in ex mode incorrectly gives an eol error" >> $(METADATA)
 | 
			
		||||
	@echo "Type:            Regression" >> $(METADATA)
 | 
			
		||||
	@echo "TestTime:        5m" >> $(METADATA)
 | 
			
		||||
	@echo "RunFor:          vim" >> $(METADATA)
 | 
			
		||||
	@echo "Requires:        vim vim-minimal" >> $(METADATA)
 | 
			
		||||
	@echo "Priority:        Normal" >> $(METADATA)
 | 
			
		||||
	@echo "License:         GPLv2" >> $(METADATA)
 | 
			
		||||
	@echo "Confidential:    no" >> $(METADATA)
 | 
			
		||||
	@echo "Destructive:     no" >> $(METADATA)
 | 
			
		||||
 | 
			
		||||
	rhts-lint $(METADATA)
 | 
			
		||||
@ -0,0 +1,3 @@
 | 
			
		||||
PURPOSE of /CoreOS/vim/Regression/vim-in-ex-mode-incorrectly-gives-an-eol-error
 | 
			
		||||
Description: Test for vim in ex mode incorrectly gives an eol error
 | 
			
		||||
Author: David Kutalek <dkutalek@redhat.com>
 | 
			
		||||
@ -0,0 +1,2 @@
 | 
			
		||||
" comment
 | 
			
		||||
q
 | 
			
		||||
@ -0,0 +1,2 @@
 | 
			
		||||
#" comment
 | 
			
		||||
q
 | 
			
		||||
							
								
								
									
										46
									
								
								tests/vim-in-ex-mode-incorrectly-gives-an-eol-error/runtest.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										46
									
								
								tests/vim-in-ex-mode-incorrectly-gives-an-eol-error/runtest.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,46 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
#
 | 
			
		||||
#   runtest.sh of /CoreOS/vim/Regression/vim-in-ex-mode-incorrectly-gives-an-eol-error
 | 
			
		||||
#   Description: Test for vim in ex mode incorrectly gives an eol error
 | 
			
		||||
#   Author: David Kutalek <dkutalek@redhat.com>
 | 
			
		||||
#
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
#
 | 
			
		||||
#   Copyright (c) 2010 Red Hat, Inc. All rights reserved.
 | 
			
		||||
#
 | 
			
		||||
#   This copyrighted material is made available to anyone wishing
 | 
			
		||||
#   to use, modify, copy, or redistribute it subject to the terms
 | 
			
		||||
#   and conditions of the GNU General Public License version 2.
 | 
			
		||||
#
 | 
			
		||||
#   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, write to the Free
 | 
			
		||||
#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 | 
			
		||||
#   Boston, MA 02110-1301, USA.
 | 
			
		||||
#
 | 
			
		||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
# Include rhts environment
 | 
			
		||||
. /usr/bin/rhts-environment.sh
 | 
			
		||||
. /usr/lib/beakerlib/beakerlib.sh
 | 
			
		||||
 | 
			
		||||
PACKAGE="vim"
 | 
			
		||||
 | 
			
		||||
rlJournalStart
 | 
			
		||||
    rlPhaseStartSetup
 | 
			
		||||
        rlAssertRpm vim-minimal
 | 
			
		||||
    rlPhaseEnd
 | 
			
		||||
 | 
			
		||||
    rlPhaseStartTest
 | 
			
		||||
	rlRun "ex -u NONE ~/.bash_profile < ./exdoublequote"
 | 
			
		||||
	rlRun "ex -u NONE ~/.bash_profile < ./expounddoublequote"
 | 
			
		||||
    rlPhaseEnd
 | 
			
		||||
 | 
			
		||||
rlJournalPrintText
 | 
			
		||||
rlJournalEnd
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user