diff options
Diffstat (limited to 'ci')
-rw-r--r-- | ci/apex.conf | 4 | ||||
-rwxr-xr-x | ci/build.sh | 17 | ||||
-rwxr-xr-x | ci/build_interface.sh | 13 | ||||
-rwxr-xr-x | ci/cyclicTestTrigger.sh | 8 | ||||
-rwxr-xr-x | ci/envs/cyclictest.sh | 7 | ||||
-rwxr-xr-x | ci/envs/guest-setup1.sh | 3 | ||||
-rwxr-xr-x | ci/envs/host-config | 9 | ||||
-rwxr-xr-x | ci/kernel_build.sh | 2 | ||||
-rwxr-xr-x | ci/kernel_debug.sh | 16 | ||||
-rwxr-xr-x | ci/test_kvmfornfv.sh | 4 |
10 files changed, 69 insertions, 14 deletions
diff --git a/ci/apex.conf b/ci/apex.conf index 03e5830bc..03d2b791a 100644 --- a/ci/apex.conf +++ b/ci/apex.conf @@ -1,2 +1,2 @@ -branch=stable/danube -commit_id=977317100f3b52caafb091ad5924e5dd81982433 +branch=master +commit_id=4bfeded9ee7ddc1cf05f6bd2c388894a7d736291 diff --git a/ci/build.sh b/ci/build.sh index ef06a716c..a52055940 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -119,6 +119,8 @@ then output_dir=$WORKSPACE/build_output fi +job_type=`echo $JOB_NAME | cut -d '-' -f 2` + echo "" echo "Building for $type package in $output_dir" echo "" @@ -139,3 +141,18 @@ if [ ${apex_build_flag} -eq 1 ];then variable=`ls kvmfornfv-* | grep "devel" | awk -F "_" '{print $3}' | awk -F "." '{print $1}'` rename "s/${variable}/centos/" kvmfornfv-* fi + +# Uploading rpms only for daily job +if [ $job_type == "verify" ]; then + if [ $type == "centos" ]; then + echo "Removing kernel-debuginfo rpm from output_dir" + rm -f ${output_dir}/kernel-debug* + echo "Checking packages in output_dir" + ls -lrth ${output_dir} + else + echo "Removing debug debian from output_dir" + rm -f ${output_dir}/*dbg* + echo "Checking packages in output_dir" + ls -lrth ${output_dir} + fi +fi
\ No newline at end of file diff --git a/ci/build_interface.sh b/ci/build_interface.sh index 6f5fadc28..cd5bc8cfc 100755 --- a/ci/build_interface.sh +++ b/ci/build_interface.sh @@ -9,7 +9,16 @@ output_dir=$build_dir/build_output cp -r $build_dir $tmp_build_dir # Build qemu rpm packages -cd $tmp_build_dir/qemu +cd $tmp_build_dir +#Initialize the submodule +git submodule init +#Update the submodules recursively to the latest commit +git submodule update --recursive +cd qemu +echo "Building Qemu latest release on the master branch" +git reset --hard v2.9.0 +git submodule init +git submodule update --recursive make clean ./configure @@ -27,4 +36,4 @@ elif [ $type == "ubuntu" ];then # Move Kernel and Qemu Debian builds from tmp_output_dir to output_dir mv $tmp_output_dir/qemu-* $output_dir mv $tmp_output_dir/linux-* $output_dir -fi +fi
\ No newline at end of file diff --git a/ci/cyclicTestTrigger.sh b/ci/cyclicTestTrigger.sh index 6765569f6..7f606b0b6 100755 --- a/ci/cyclicTestTrigger.sh +++ b/ci/cyclicTestTrigger.sh @@ -41,7 +41,6 @@ function verifyGuestImage { #disabling ftrace and collecting the logs to upload to artifact repository. function ftrace_disable { - sudo ssh root@${HOST_IP} "sh /root/workspace/scripts/disable_trace.sh" sudo ssh root@${HOST_IP} "cd /tmp ; mv trace.txt cyclictest_${env}.txt" mkdir -p $WORKSPACE/build_output/log/kernel_trace scp root@${HOST_IP}:/tmp/cyclictest_${env}.txt $WORKSPACE/build_output/log/kernel_trace/ @@ -189,15 +188,16 @@ function runCyclicTest { sudo docker run -i -v ${volume}:/opt --net=host --name kvmfornfv_${testType}_${testName} \ kvmfornfv:latest /bin/bash -c "cd /opt/scripts && ls; ./cyclictest.sh $testType $testName" cyclictest_output=$? - if [ "$testName" == "memorystress_idle" ];then - copyLogs - fi #Disabling ftrace after completion of executing test cases. if [ ${ftrace_enable} -eq '1' ]; then ftrace_disable fi + if [ "$testName" == "memorystress_idle" ];then + copyLogs + fi + #Verifying the results of cyclictest if [ "$testType" == "verify" ];then result=`grep -o '"errors":[^,]*' ${volume}/yardstick.out | awk -F '"' '{print $4}'` diff --git a/ci/envs/cyclictest.sh b/ci/envs/cyclictest.sh index 920a46b93..d1ae5c7fa 100755 --- a/ci/envs/cyclictest.sh +++ b/ci/envs/cyclictest.sh @@ -11,6 +11,7 @@ testName=$2 #idle_idle/stress_idle HOST_IP=$( getHostIP ) pod_config='/opt/scripts/pod.yaml' cyclictest_context_file='/opt/kvmfornfv_cyclictest_'${testName}'.yaml' +yardstick_prefix='/root/yardstick/yardstick/benchmark/scenarios/compute' # yardstick teardown path if [ ! -f ${pod_config} ] ; then echo "file ${pod_config} not found" @@ -22,6 +23,12 @@ if [ ! -f ${cyclictest_context_file} ] ; then exit 1 fi +#As yardstick executes only *.bash scripts, copy the post-execute script as .bash script +cp /opt/scripts/disable_trace.sh ${yardstick_prefix}/disable_trace.bash + +#Execution of the post-execute script copied requires re-installation of yardstick +( cd /root/yardstick ; python setup.py install ) + #setting up of image for launching guest vm. ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \ root@$HOST_IP "cp /root/images/guest1.qcow2 /root/" diff --git a/ci/envs/guest-setup1.sh b/ci/envs/guest-setup1.sh index 678baa43b..6d790a080 100755 --- a/ci/envs/guest-setup1.sh +++ b/ci/envs/guest-setup1.sh @@ -24,3 +24,6 @@ set_irq_affinity # Disable RT throttling echo -1 > /proc/sys/kernel/sched_rt_period_us echo -1 > /proc/sys/kernel/sched_rt_runtime_us + +# Disable the timer migration +echo 0 > /proc/sys/kernel/timer_migration diff --git a/ci/envs/host-config b/ci/envs/host-config index 54d262af4..c656f839b 100755 --- a/ci/envs/host-config +++ b/ci/envs/host-config @@ -64,9 +64,16 @@ function setTestTime { #Tar the log files generated during testcase execution and exit. function test_exit { exitCode=$1 + time_stamp=$(date -u +"%Y-%m-%d_%H-%M-%S") cd $WORKSPACE/build_output/ if [ -d log ];then - tar -czvf log-$(date -u +"%Y-%m-%d_%H-%M-%S").tar.gz log + tar -czvf log-${time_stamp}.tar.gz log + echo "uploading debugging logs to artifacts" + gsutil cp -r log-*.tar.gz gs://artifacts.opnfv.org/kvmfornfv/\ + kvmfornfv_verify_debug_logs_${time_stamp} > \ + $WORKSPACE/build_output/gsutil.log 2>&1 + echo -e "Download the logs from artifacts using below for debugging\n + http://artifacts.opnfv.org/kvmfornfv/kvmfornfv_verify_debug_logs_${time_stamp}" fi exit $exitCode } diff --git a/ci/kernel_build.sh b/ci/kernel_build.sh index 91e8b7765..6071ca760 100755 --- a/ci/kernel_build.sh +++ b/ci/kernel_build.sh @@ -50,7 +50,7 @@ EOF # Build the kernel debs make-kpkg clean -fakeroot make-kpkg --initrd --revision=$VERSION kernel_image kernel_headers +fakeroot make-kpkg --initrd --revision=$VERSION kernel_image kernel_headers kernel_debug -j$(nproc) make mv /root/kvmfornfv/linux-* /root/kvmfornfv/build_output } diff --git a/ci/kernel_debug.sh b/ci/kernel_debug.sh new file mode 100755 index 000000000..5ccf1af76 --- /dev/null +++ b/ci/kernel_debug.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +tmpdir=$1 #/tmp/kvmfornfv_rpmbuild.1/BUILD/kernel-4.4.50_rt62nfv +OBJCOPY=objcopy +if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then +for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do + module=lib/modules/$module + mkdir -p $(dirname $tmpdir/usr/lib/debug/$module) + # only keep debug symbols in the debug file + $OBJCOPY --only-keep-debug $tmpdir/$module $tmpdir/usr/lib/debug/$module + # strip original module from debug symbols + $OBJCOPY --strip-debug $tmpdir/$module + # then add a link to those + $OBJCOPY --add-gnu-debuglink=$tmpdir/usr/lib/debug/$module $tmpdir/$module + done +fi
\ No newline at end of file diff --git a/ci/test_kvmfornfv.sh b/ci/test_kvmfornfv.sh index b1aa97390..62b5c16f4 100755 --- a/ci/test_kvmfornfv.sh +++ b/ci/test_kvmfornfv.sh @@ -140,8 +140,6 @@ if [ ${test_type} == "verify" ];then test_exit 0 fi elif [ ${test_type} == "daily" ];then - echo "Daily job test cases execution disabled temporarily" - exit 0 getTestParams install_pcm if [ ${test_name} == "packet_forward" ];then @@ -165,8 +163,6 @@ elif [ ${test_type} == "daily" ];then sed -i '/host-setup1.sh/a\ \- \"enable-trace.sh\"' kvmfornfv_cyclictest_hostenv_guestenv.yaml #Executing cyclictest through yardstick. cyclictest ${env} - #disabling ftrace and collecting the logs to upload to artifact repository. - ftrace_disable sleep 5 done else |