Script to create the rt-tests rpm 59/4559/4
authorYunhong Jiang <yunhong.jiang@linux.intel.com>
Fri, 11 Dec 2015 19:38:49 +0000 (14:38 -0500)
committerYunhong Jiang <yunhong.jiang@linux.intel.com>
Wed, 6 Jan 2016 03:32:47 +0000 (19:32 -0800)
There is no rt-tests rpm on centos repo, also we need some special
compile flag to enable the -a parameter. So we try to make the rpm
ourselves. The version is specified as 0.96.

But please notice that the Makefile in the rt-tests tree requires some
key, we have to disable that requirement. So this rpm is only for OPNFV
testing purpose.

Change-Id: Ifdd52649bc14405dbe5ad375dc7fd32087139b18
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
ci/envs/create-rt-tests-rpm.sh [new file with mode: 0644]
ci/envs/rt-tests.patch [new file with mode: 0644]

diff --git a/ci/envs/create-rt-tests-rpm.sh b/ci/envs/create-rt-tests-rpm.sh
new file mode 100644 (file)
index 0000000..96fef2b
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+##############################################################################
+## Copyright (c) 2015 Intel Corp.
+##
+## All rights reserved. This program and the accompanying materials
+## are made available under the terms of the Apache License, Version 2.0
+## which accompanies this distribution, and is available at
+## http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+
+usage ()
+{
+       echo "$0 rpmdir"
+       exit 1
+}
+
+rpmdir=$1
+rm -rf ${rpmdir}/rt-tests-0.96-1.el7.centos.x86_64.rpm
+gitdir=`mktemp -d`
+ROOTDIR=$(cd $(dirname "$0")/../.. && pwd)
+VERSION=v0.96
+cd $gitdir
+git clone https://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git
+cd rt-tests
+git checkout -b ${VERSION} ${VERSION}
+patch -p1  -i ${ROOTDIR}/ci/envs/rt-tests.patch
+make HAVE_PARSE_CPUSTRING_ALL=1 rpm
+cp ./RPMS/x86_64/rt-tests-0.96-1.el7.centos.x86_64.rpm $rpmdir
+rm -rf $gitdir
+
diff --git a/ci/envs/rt-tests.patch b/ci/envs/rt-tests.patch
new file mode 100644 (file)
index 0000000..b938e07
--- /dev/null
@@ -0,0 +1,26 @@
+/******************************************************************************* 
+ * * Copyright (c) 2015 Intel Corp.
+ * * 
+ * * All rights reserved. This program and the accompanying materials 
+ * * are made available under the terms of the Apache License, Version 2.0 
+ * * which accompanies this distribution, and is available at 
+ * * http://www.apache.org/licenses/LICENSE-2.0 
+ * *******************************************************************************/ 
+
+diff --git a/Makefile b/Makefile
+index 1e4b7d1b0d3a..98968b94a57f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -198,10 +198,10 @@ release: distclean changelog
+       cp -r Makefile COPYING ChangeLog MAINTAINERS doc README.markdown src tmp/rt-tests
+       rm -f rt-tests-$(VERSION).tar rt-tests-$(VERSION).tar.asc
+       tar -C tmp -cf rt-tests-$(VERSION).tar rt-tests
+-      gpg2 --default-key clrkwllms@kernel.org --detach-sign --armor rt-tests-$(VERSION).tar
++      #gpg2 --default-key clrkwllms@kernel.org --detach-sign --armor rt-tests-$(VERSION).tar
+       gzip rt-tests-$(VERSION).tar
+       rm -f ChangeLog
+-      cp rt-tests-$(VERSION).tar.gz rt-tests-$(VERSION).tar.asc releases
++      cp rt-tests-$(VERSION).tar.gz  releases
+ .PHONY: tarball
+ tarball: