iproute/tests/ip-address-sanity-test/runtest.sh
Susant Sahani 7ee9aeadb4 CI: Add ip address sanity tests
Snip:
```
iproute-4.15.0-1.fc28.x86_64
:: [ 18:10:39 ] :: [   PASS   ] :: Checking for the presence of iproute rpm
:: [ 18:10:39 ] :: [   PASS   ] :: Checking for the presence of iproute rpm
:: [ 18:10:39 ] :: [   LOG    ] :: Package versions:
:: [ 18:10:39 ] :: [   LOG    ] :: Package versions:
:: [ 18:10:39 ] :: [   LOG    ] ::   iproute-4.15.0-1.fc28.x86_64
:: [ 18:10:39 ] :: [   LOG    ] ::   iproute-4.15.0-1.fc28.x86_64
:: [ 18:10:39 ] :: [  BEGIN   ] :: Running 'cp ip-address-tests.py /usr/bin'
:: [ 18:10:39 ] :: [   PASS   ] :: Command 'cp ip-address-tests.py /usr/bin' (Expected 0, got 0)
:: [ 18:10:39 ] :: [   PASS   ] :: Command 'cp ip-address-tests.py /usr/bin' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Duration: 0s
::   Assertions: 2 good, 0 bad
::   Assertions: 2 good, 0 bad
::   RESULT: PASS
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 18:10:39 ] :: [   LOG    ] :: ip address tests
:: [ 18:10:39 ] :: [   LOG    ] :: ip address tests
:: [ 18:10:39 ] :: [  BEGIN   ] :: Running '/usr/bin/python3 /usr/bin/ip-address-tests.py'
test_add_address (__main__.IPAddressTests) ... ok
test_add_address_lifetime (__main__.IPAddressTests) ... ok
test_add_address_scope (__main__.IPAddressTests) ... ok
test_add_broadcast_address_label (__main__.IPAddressTests) ... ok
test_add_ipv6_address (__main__.IPAddressTests) ... ok
test_del_address (__main__.IPAddressTests) ... ok

----------------------------------------------------------------------
Ran 6 tests in 0.136s

OK
:: [ 18:10:39 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/ip-address-tests.py' (Expected 0, got 0)
:: [ 18:10:39 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/ip-address-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 1s
::   Duration: 1s
::   Assertions: 1 good, 0 bad
::   Assertions: 1 good, 0 bad
::   RESULT: PASS
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Cleanup
::   Cleanup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 18:10:40 ] :: [  BEGIN   ] :: Running 'rm /usr/bin/ip-address-tests.py'
:: [ 18:10:40 ] :: [   PASS   ] :: Command 'rm /usr/bin/ip-address-tests.py' (Expected 0, got 0)
:: [ 18:10:40 ] :: [   PASS   ] :: Command 'rm /usr/bin/ip-address-tests.py' (Expected 0, got 0)
:: [ 18:10:40 ] :: [   LOG    ] :: ip address tests done
:: [ 18:10:40 ] :: [   LOG    ] :: ip address tests done
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Duration: 0s
::   Assertions: 1 good, 0 bad
::   Assertions: 1 good, 0 bad
::   RESULT: PASS
::   RESULT: PASS
```
2018-06-24 18:14:12 +05:30

35 lines
792 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1+
# ~~~
# runtest.sh of /CoreOS/iproute/Sanity/ip-address-sanity-test
# Description: Test basic ip address funcionality
#
# Author: Susant Sahani <susant@redhat.com>
# Copyright (c) 2018 Red Hat, Inc.
#~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="iproute"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "cp ip-address-tests.py /usr/bin"
rlPhaseEnd
rlPhaseStartTest
rlLog "ip address tests"
rlRun "/usr/bin/python3 /usr/bin/ip-address-tests.py"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rm /usr/bin/ip-address-tests.py"
rlLog "ip address tests done"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd
rlGetTestState