iproute/tests/ip-token-sanity-test/Makefile
Susant Sahani 1abbe5eb83 CI: Add ip token to test
Sample Run
```
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

iproute-4.16.0-1.fc28.x86_64
:: [ 16:55:06 ] :: [   PASS   ] :: Checking for the presence of iproute rpm
:: [ 16:55:06 ] :: [   LOG    ] :: Package versions:
:: [ 16:55:06 ] :: [   LOG    ] ::   iproute-4.16.0-1.fc28.x86_64
:: [ 16:55:06 ] :: [  BEGIN   ] :: Running 'cp ip-token-tests.py /usr/bin'
:: [ 16:55:06 ] :: [   PASS   ] :: Command 'cp ip-token-tests.py /usr/bin' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 2 good, 0 bad
::   RESULT: PASS

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

:: [ 16:55:07 ] :: [   LOG    ] :: ip token tests
:: [ 16:55:07 ] :: [  BEGIN   ] :: Running '/usr/bin/python3 /usr/bin/ip-token-tests.py'
test_add_token (__main__.IPTokenTests) ... token ::1a:2b:3c:4d dev veth-test
ok

----------------------------------------------------------------------
Ran 1 test in 0.029s

OK
:: [ 16:55:07 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/ip-token-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 1s
::   Assertions: 1 good, 0 bad
::   RESULT: PASS

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

```
2018-07-24 16:56:27 +05:30

48 lines
1.3 KiB
Makefile

#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1+
# ~~~
# runtest.sh of /CoreOS/iproute/Sanity/ip-token-sanity-test
# Description: Test basic ip token funcionality
#
# Author: Susant Sahani <susant@redhat.com>
# Copyright (c) 2018 Red Hat, Inc.
#~~~
export TEST=/CoreOS/iproute/Sanity/ip-token-sanity-test
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)
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: Susant Sahani <susant@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test basic ip token funcionality" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: iproute" >> $(METADATA)
@echo "Requires: iproute" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)