diff --git a/AzureTestSuite.ps1 b/AzureTestSuite.ps1 index 0817e3c..81a1ba1 100644 --- a/AzureTestSuite.ps1 +++ b/AzureTestSuite.ps1 @@ -467,6 +467,7 @@ Function RunTestsOnCycle ($cycleName , $xmlConfig, $Distro, $testIterations ) $dbpassword = $xmlSecrets.secrets.DatabasePassword $database = $xmlSecrets.secrets.DatabaseName $dataTableName = "AzureTestResultsMasterTable" + $dbTestName = $($currentTestData.testName) $SQLQuery = "INSERT INTO $dataTableName (DateTimeUTC,Environment,TestCycle,ExecutionID,TestName,TestResult,ARMImage,OsVHD,KernelVersion,LISVersion,GuestDistro,AzureHost,Location,OverrideVMSize,Networking,LogFile,BuildURL) VALUES " if ($testMode -eq "multi") { @@ -478,13 +479,12 @@ Function RunTestsOnCycle ($cycleName , $xmlConfig, $Distro, $testIterations ) $tempResult = $tempResult.Trim().Replace("
`hostname`-distroVersion.txt -elif [[ "$release" =~ "UBUNTU" ]] || [[ "$release" =~ "Ubuntu" ]] ; then +elif [[ "$release" =~ "UBUNTU" ]] || [[ "$release" =~ "Ubuntu" ]] || [[ "$release" =~ "Debian" ]]; then NAME=`cat /etc/os-release | grep ^NAME= | sed 's/"//g' | sed 's/NAME=//g'` VERSION=`cat /etc/os-release | grep ^VERSION= | sed 's/"//g' | sed 's/VERSION=//g'` echo "$NAME $VERSION" > `hostname`-distroVersion.txt - -elif [[ "$release" =~ "Debian" ]] ; then - cat /etc/os-release | grep "ID=" | sed 's/ID=//g' > `hostname`-distroVersion.txt +elif [ -e /usr/share/clear/version ]; then + NAME=`cat /usr/lib/os-release | grep ^PRETTY_NAME | sed 's/"//g' | sed 's/PRETTY_NAME=//g'` + VERSION=`cat /usr/lib/os-release | grep ^VERSION= | sed 's/"//g' | sed 's/VERSION=//g'` + echo "$NAME $VERSION" > `hostname`-distroVersion.txt +else + echo "unknown" > `hostname`-distroVersion.txt + echo $release > `hostname`-unknownDistro.txt fi -exit 0 +exit 0 \ No newline at end of file