Commit b7332db Initial commit of brltty sanity tests.

5 files Merged and Committed by mgahagan a year ago
Initial commit of brltty sanity tests.

    
 1 @@ -0,0 +1,64 @@
 2 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3 + #
 4 + #   Makefile of /CoreOS/brltty/Sanity/sanity-test
 5 + #   Description: it check basic sanity of packahe
 6 + #   Author: Jan Scotka <jscotka@redhat.com>
 7 + #
 8 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 9 + #
10 + #   Copyright (c) 2016 Red Hat, Inc.
11 + #
12 + #   This copyrighted material is made available to anyone wishing
13 + #   to use, modify, copy, or redistribute it subject to the terms
14 + #   and conditions of the GNU General Public License version 2.
15 + #
16 + #   This program is distributed in the hope that it will be
17 + #   useful, but WITHOUT ANY WARRANTY; without even the implied
18 + #   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19 + #   PURPOSE. See the GNU General Public License for more details.
20 + #
21 + #   You should have received a copy of the GNU General Public
22 + #   License along with this program; if not, write to the Free
23 + #   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 + #   Boston, MA 02110-1301, USA.
25 + #
26 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 + 
28 + export TEST=/CoreOS/brltty/sanity-test
29 + export TESTVERSION=1.0
30 + 
31 + BUILT_FILES=
32 + 
33 + FILES=$(METADATA) runtest.sh Makefile PURPOSE
34 + 
35 + .PHONY: all install download clean
36 + 
37 + run: $(FILES) build
38 + »       ./runtest.sh
39 + 
40 + build: $(BUILT_FILES)
41 + »       test -x runtest.sh || chmod a+x runtest.sh
42 + 
43 + clean:
44 + »       rm -f *~ $(BUILT_FILES)
45 + 
46 + 
47 + include /usr/share/rhts/lib/rhts-make.include
48 + 
49 + $(METADATA): Makefile
50 + »       @echo "Owner:           Jan Scotka <jscotka@redhat.com>" > $(METADATA)
51 + »       @echo "Name:            $(TEST)" >> $(METADATA)
52 + »       @echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
53 + »       @echo "Path:            $(TEST_DIR)" >> $(METADATA)
54 + »       @echo "Description:     Basic sanity test of brltty" >> $(METADATA)
55 + »       @echo "Type:            Sanity" >> $(METADATA)
56 + »       @echo "TestTime:        20m" >> $(METADATA)
57 + »       @echo "RunFor:          brltty" >> $(METADATA)
58 + »       @echo "Requires:        brltty Xvfb ImageMagick psmisc xorg-x11-utils nc orca" >> $(METADATA)
59 + »       @echo "Priority:        Normal" >> $(METADATA)
60 + »       @echo "License:         GPLv2" >> $(METADATA)
61 + »       @echo "Confidential:    no" >> $(METADATA)
62 + »       @echo "Destructive:     no" >> $(METADATA)
63 + »       @echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
64 + 
65 + »       rhts-lint $(METADATA)
1 @@ -0,0 +1,3 @@
2 + PURPOSE of /CoreOS/brltty/Sanity/sanity-test
3 + Description: it check basic sanity of packahe
4 + Author: Jan Scotka <jscotka@redhat.com>
 1 @@ -0,0 +1,71 @@
 2 + #!/bin/bash
 3 + # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
 4 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 5 + #
 6 + #   runtest.sh of /CoreOS/brltty/Sanity/sanity-test
 7 + #   Description: Basic sanity test of brltty
 8 + #   Author: Jan Scotka <jscotka@redhat.com>
 9 + #
10 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 + #
12 + #   Copyright (c) 2016 Red Hat, Inc.
13 + #
14 + #   This copyrighted material is made available to anyone wishing
15 + #   to use, modify, copy, or redistribute it subject to the terms
16 + #   and conditions of the GNU General Public License version 2.
17 + #
18 + #   This program is distributed in the hope that it will be
19 + #   useful, but WITHOUT ANY WARRANTY; without even the implied
20 + #   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
21 + #   PURPOSE. See the GNU General Public License for more details.
22 + #
23 + #   You should have received a copy of the GNU General Public
24 + #   License along with this program; if not, write to the Free
25 + #   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 + #   Boston, MA 02110-1301, USA.
27 + #
28 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29 + 
30 + # Include Beaker environment
31 + . /usr/share/beakerlib/beakerlib.sh || exit 1
32 + 
33 + PACKAGE="brltty"
34 + DISPLAY=99
35 + 
36 + rlJournalStart
37 +     rlPhaseStartSetup
38 +         rlAssertRpm $PACKAGE
39 +         rlRun "Xvfb :$DISPLAY -screen 0 1024x768x24&"
40 +         rlRun "sleep 5"
41 +     rlPhaseEnd
42 + 
43 +     rlPhaseStartTest
44 +         rlRun "DISPLAY=:$DISPLAY orca&"
45 +         rlRun "sleep 5"
46 +         rlRun "sleep 5"
47 +         rlRun "DISPLAY=:$DISPLAY brltty -b xw -x a2 -A auth=none"
48 +         rlRun "sleep 5"
49 +         rlRun "DISPLAY=:$DISPLAY import -window root example.png"
50 +         rlRun "DISPLAY=:$DISPLAY xwininfo -tree -root"
51 +         rlRun "DISPLAY=:$DISPLAY xwininfo -tree -root| grep -A 2 children |grep brltty"
52 +         rlRun "DISPLAY=:$DISPLAY xwininfo -tree -root|grep +664+36"
53 +         rlRun "killall brltty"
54 +         rlRun "sleep 5"
55 +         rlRun "DISPLAY=:$DISPLAY brltty -b vr -d server:127.0.0.1 -x a2 -A auth=none"
56 +         rlRun "sleep 5"
57 +         rlRun "echo cells 20 | ncat 127.0.0.1 35752 |grep 'Visual \"BRLTTY 4.5'"
58 +         rlRun "echo cells 20 | ncat 127.0.0.1 35752 |grep '127.12357.1237.23457.23457.134567'"
59 +         rlRun "echo quit | ncat 127.0.0.1 35752"
60 + »       rlRun "sleep 2"
61 + »       rlRun "test -x /usr/bin/brltty-config"
62 + »       rlRun "brltty-config"
63 +     rlPhaseEnd
64 + 
65 +     rlPhaseStartCleanup
66 +         rlRun "killall brltty"
67 +         rlRun "killall Xvfb"
68 + »       rlRun "rm -rf example.png"
69 +     rlPhaseEnd
70 + rlJournalPrintText
71 + rlJournalEnd
72 + 
 1 @@ -0,0 +1,17 @@
 2 + - hosts: localhost
 3 +   tags:
 4 +   - classic
 5 +   - container
 6 +   roles:
 7 +   - role: standard-test-beakerlib
 8 +     tests:
 9 +     - sanity-test
10 +     required_packages:
11 +     - ImageMagick
12 +     - Xvfb
13 +     - brltty
14 +     - nc
15 +     - orca
16 +     - psmisc
17 +     - xorg-x11-utils
18 +