Merge pull request #20 from iamshital/master

Changed the area of XFS tests
This commit is contained in:
Shital Savekar 2018-05-23 12:56:20 -07:00 коммит произвёл GitHub
Родитель e67a6dc101 049791a5d5
Коммит f474e37707
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 184 добавлений и 37 удалений

Просмотреть файл

@ -0,0 +1,146 @@
#!/bin/bash
########################################################################
#
# Linux on Hyper-V and Azure Test Code, ver. 1.0.0
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
# Licensed under the Apache License, Version 2.0 (the ""License"");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
# ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR
# PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
#
# See the Apache Version 2.0 License for specific language governing
# permissions and limitations under the License.
#
########################################################################
########################################################################
#
# Description:
# This script installs NVidia GPU drivers.
#
# Steps:
# 1. Installs dependencies
# 2. Compiles and installs GPU Drievers
# 3. -logFolder parameter is supported (Optional)
#
#
########################################################################
while echo $1 | grep ^- > /dev/null; do
eval $( echo $1 | sed 's/-//g' | tr -d '\012')=$2
shift
shift
done
#Updated as of 23rd May 2018
CUDADriverVersion="9.2.88-1"
#############################
ICA_TESTRUNNING="TestRunning" # The test is running
ICA_TESTCOMPLETED="TestCompleted" # The test completed successfully
ICA_TESTABORTED="TestAborted" # Error during setup of test
ICA_TESTFAILED="TestFailed" # Error while performing the test"
if [ ! ${logFolder} ]; then
logFolder="/root"
fi
#######################################################################
# Adds a timestamp to the log file
#######################################################################
LogMsg() {
echo $(date "+%a %b %d %T %Y") : ${1}
echo $(date "+%a %b %d %T %Y") : ${1} >> $logFolder/GPU_Test_Logs.txt
}
#######################################################################
# Updates the summary.log file
#######################################################################
UpdateSummary() {
echo $1 >> $logFolder/summary.log
}
#######################################################################
# Keeps track of the state of the test
#######################################################################
UpdateTestState() {
echo $1 > $logFolder/state.txt
}
#######################################################################
# Install dependencies and GPU Driver
#######################################################################
InstallGPUDrivers() {
DISTRO=`grep -ihs "buntu\|Suse\|Fedora\|Debian\|CentOS\|Red Hat Enterprise Linux" /etc/{issue,*release,*version}`
if [[ $DISTRO =~ "Ubuntu 16.04" ]];
then
LogMsg "Detected UBUNUT1604"
CUDA_REPO_PKG="cuda-repo-ubuntu1604_${CUDADriverVersion}_amd64.deb"
LogMsg "Using ${CUDA_REPO_PKG}"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} -O /tmp/${CUDA_REPO_PKG}
dpkg -i /tmp/${CUDA_REPO_PKG}
rm -f /tmp/${CUDA_REPO_PKG}
until dpkg --force-all --configure -a; sleep 10; do echo 'Trying again...'; done
apt-get -y update
apt-get -y --allow-unauthenticated install linux-tools-generic linux-cloud-tools-generic
apt-get -y --allow-unauthenticated install cuda-drivers
elif [[ $DISTRO =~ "Ubuntu 14.04" ]];
then
LogMsg "Detected UBUNTU1404"
CUDA_REPO_PKG="cuda-repo-ubuntu1404_${CUDADriverVersion}_amd64.deb"
LogMsg "Using ${CUDA_REPO_PKG}"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/${CUDA_REPO_PKG} -O /tmp/${CUDA_REPO_PKG}
dpkg -i /tmp/${CUDA_REPO_PKG}
rm -f /tmp/${CUDA_REPO_PKG}
apt-get -y update
apt-get -y --allow-unauthenticated install linux-tools-generic linux-cloud-tools-generic
apt-get -y --allow-unauthenticated install cuda-drivers
elif [[ $DISTRO =~ "CentOS Linux release 7.3" ]] || [[ $DISTRO =~ "CentOS Linux release 7.4" ]] || [[ $DISTRO =~ "Red Hat Enterprise Linux Server release 7.4" ]];
then
LogMsg "Detected CentOS 7.x / RHEL 7.x"
sed -i "/^exclude=kernel/c\#exclude=kernel*" /etc/yum.conf
yum -y update
yum -y --nogpgcheck install kernel-devel
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum --nogpgcheck -y install dkms
CUDA_REPO_PKG="cuda-repo-rhel7-${CUDADriverVersion}.x86_64.rpm"
LogMsg "Using ${CUDA_REPO_PKG}"
wget http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/${CUDA_REPO_PKG} -O /tmp/${CUDA_REPO_PKG}
rpm -ivh /tmp/${CUDA_REPO_PKG}
rm -f /tmp/${CUDA_REPO_PKG}
yum --nogpgcheck -y install lshw
yum --nogpgcheck -y install cuda-drivers
else
LogMsg "Unknown Distro"
UpdateTestState "TestAborted"
UpdateSummary "Unknown Distro, test aborted"
return 1
fi
}
######################################################################
#MAIN
######################################################################
LogMsg "Updating test case state to running"
UpdateTestState $ICA_TESTRUNNING
InstallGPUDrivers
if [[ $? == 0 ]];
then
LogMsg "GPU_DRIVER_INSTALLATION_SUCCESSFUL"
else
LogMsg "GPU_DRIVER_INSTALLATION_FAIL"
fi
UpdateTestState $ICA_TESTCOMPLETED
exit 0

Просмотреть файл

@ -26,13 +26,14 @@ if ($isDeployed)
#region Install N-Vidia Drivers and reboot.
$myString = @"
cd /root/
./GPU_Test.sh -logFolder /root &> GPUConsoleLogs.txt
./InstallCUDADrivers.sh -logFolder /root &> GPUConsoleLogs.txt
. azuremodules.sh
collect_VM_properties
"@
$StartScriptName = "StartGPUDriverInstall.sh"
Set-Content "$LogDir\$StartScriptName" $myString
RemoteCopy -uploadTo $clientVMData.PublicIP -port $clientVMData.SSHPort -files ".\Testscripts\Linux\azuremodules.sh,.\Testscripts\Linux\GPU_Test.sh,.\$LogDir\$StartScriptName" -username "root" -password $password -upload
RemoteCopy -uploadTo $clientVMData.PublicIP -port $clientVMData.SSHPort -files ".\$LogDir\$StartScriptName" -username "root" -password $password -upload
RemoteCopy -uploadTo $clientVMData.PublicIP -port $clientVMData.SSHPort -files "$($currentTestData.files)" -username "root" -password $password -upload
$out = RunLinuxCmd -ip $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -command "chmod +x *.sh"
$testJob = RunLinuxCmd -ip $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -command "/root/$StartScriptName" -RunInBackground
#endregion

Просмотреть файл

@ -11,7 +11,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,provision</Tags>
<Tags>bvt,boot</Tags>
<TestID>AzureBVT_001</TestID>
</test>
<test>
@ -26,7 +26,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,provision</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_002</TestID>
</test>
<test>
@ -41,7 +41,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,provision</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_003</TestID>
</test>
<test>
@ -56,7 +56,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,provision</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_004</TestID>
</test>
<test>
@ -71,7 +71,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,provision</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_005</TestID>
</test>
<test>
@ -86,7 +86,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,timeout</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_006</TestID>
</test>
<test>
@ -101,7 +101,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,hv</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_007</TestID>
</test>
<test>
@ -116,7 +116,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,hv</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_008</TestID>
</test>
<test>
@ -131,7 +131,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,swap</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_009</TestID>
</test>
<test>
@ -146,7 +146,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,mtab</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_010</TestID>
</test>
<test>
@ -161,7 +161,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,console</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_011</TestID>
</test>
<test>
@ -176,7 +176,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,disksize</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_012</TestID>
</test>
<test>
@ -191,7 +191,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,firewall</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_013</TestID>
</test>
<test>
@ -206,7 +206,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,boot</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_014</TestID>
</test>
<test>
@ -221,7 +221,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,boot</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_015</TestID>
</test>
<test>
@ -236,7 +236,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,restart</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_016</TestID>
</test>
<test>
@ -251,7 +251,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,mount,io</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_017</TestID>
</test>
<test>
@ -266,7 +266,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,uuid</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_018</TestID>
</test>
<test>
@ -281,7 +281,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,auth</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_019</TestID>
</test>
<test>
@ -296,7 +296,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,sshd</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_020</TestID>
</test>
<test>
@ -311,7 +311,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,vhd</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_021</TestID>
</test>
<test>
@ -326,7 +326,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,mount</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_022</TestID>
</test>
<test>
@ -341,7 +341,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,mount</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_023</TestID>
</test>
<test>
@ -356,7 +356,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,mount</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_024</TestID>
</test>
<test>
@ -371,7 +371,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,bash,history</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_025</TestID>
</test>
<test>
@ -388,7 +388,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,policy</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_026</TestID>
</test>
<test>
@ -405,7 +405,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,vhd</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_027</TestID>
</test>
<test>
@ -422,7 +422,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,vhd</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_028</TestID>
</test>
<test>
@ -437,7 +437,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,kvp</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_029</TestID>
</test>
<test>
@ -454,7 +454,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,vm,size</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_030</TestID>
</test>
<test>
@ -471,7 +471,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,disk</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_031</TestID>
</test>
<test>
@ -488,7 +488,7 @@
<Platform>Azure</Platform>
<Category>BVT</Category>
<Area>BVT</Area>
<Tags>bvt,disk</Tags>
<Tags>bvt</Tags>
<TestID>AzureBVT_032</TestID>
</test>
</TestCases>

Просмотреть файл

@ -9,7 +9,7 @@
</TestParameters>
<Platform>Azure</Platform>
<Category>Community</Category>
<Area>Community</Area>
<Area>Xfstesting-cifs</Area>
<Tags>smb</Tags>
<TestID>Community_001</TestID>
</test>
@ -23,7 +23,7 @@
</TestParameters>
<Platform>Azure</Platform>
<Category>Community</Category>
<Area>Community</Area>
<Area>Xfstesting-cifs</Area>
<Tags>xfs,disk</Tags>
<TestID>Community_001</TestID>
</test>
@ -37,7 +37,7 @@
</TestParameters>
<Platform>Azure</Platform>
<Category>Community</Category>
<Area>Community</Area>
<Area>Xfstesting-cifs</Area>
<Tags>ext4,disk</Tags>
<TestID>Community_002</TestID>
</test>