--- /dev/null
+.osc/
+itest-cases-gbs*.tar.gz
--- /dev/null
+PKG_NAME := itest-cases-gbs
+SPECFILE = $(addsuffix .spec, $(PKG_NAME))
+PKG_VERSION := $(shell grep '^Version: ' $(SPECFILE)|awk '{print $$2}')
+
+TARBALL := $(PKG_NAME)_$(PKG_VERSION).tar.gz
+
+dsc: tarball
+ $(eval MD5=$(shell md5sum $(TARBALL) | sed "s/ / $(shell stat -c '%s' $(TARBALL)) /"))
+ sed -i 's/^Version:.*/Version: $(PKG_VERSION)/' $(PKG_NAME).dsc
+ sed -i 's/ [a-f0-9]\+ [0-9]\+ $(PKG_NAME).*tar.*/ $(MD5)/' $(PKG_NAME).dsc
+
+tarball:
+ cd .. && git archive --prefix $(PKG_NAME)-$(PKG_VERSION)/ HEAD \
+ | gzip > packaging/$(TARBALL)
+
+clean:
+ rm -f $(PKG_NAME)*tar*
+
+all: tarball dsc
--- /dev/null
+* test-<2>
+
+* Wed Jul 03 2013 Huang Hao <hao.h.huang@intel.com> a7c12c5
+- Add packaging files
+- Adding changelog cases and corresponding fixtures
+- Initial commit
+
--- /dev/null
+Name: itest-cases-gbs
+VCS: tools/itest-cases-gbs#3dc0708ad10115ae10ae376ffd44d36b339991b0
+Summary: Cases for gbs functional testing
+Version: 0.9
+Release: 1
+Group: Development/Tools/Other
+License: GPLv2
+Source0: %{name}_%{version}.tar.gz
+
+BuildArch: noarch
+%if 0%{?suse_version}
+BuildRequires: sudo
+Requires: mozilla-nss
+%endif
+
+Requires: lzma
+Requires: zip
+Requires: p7zip
+
+%description
+gbs functional test cases in format of itest
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+make build
+
+%install
+make PREFIX=%{buildroot} install
+
+%post
+# get hostIP, then change the localhost:8881 to hostIP
+hostconf="/home/build/tools-tester.d/servers-local.conf"
+if [ -f "$hostconf" ]
+then
+ hostIP=`grep "LOCAL_HOST_IP" /home/build/tools-tester.d/servers-local.conf | cut -d":" -f 2`
+ sed -i "s/http:\/\/localhost:8881/http:\/\/$hostIP:8881/g" `grep "http:\/\/localhost:8881" -rl /srv/itest/cases/gbs/`
+ sed -i "s/http:\/\/test:123456@localhost:8881/http:\/\/test:123456@$hostIP:8881/g" `grep "http:\/\/test:123456@localhost:8881" -rl /srv/itest/cases/gbs/`
+fi
+
+%files
+%defattr(-,root,root,-)
+/srv/itest/
+%{_sysconfdir}/sudoers.d/itest_cases_gbs
CWD = os.path.dirname(os.path.abspath(__file__))
-# set osc certifications
+# set osc certifications test
OSC_CERT_DIR = os.path.expanduser('~/.config/osc/trusted-certs')
OSC_CERT_FROM = os.path.join(CWD, 'fixtures', 'conf_fixtures')
OSC_CERTS = [name.split('/')[-1] for name in glob(r'%s/*_[0-9]*.pem' % OSC_CERT_FROM)]