Skip to content

Commit 23f9e70

Browse files
committed
Merge pull request #1566 from huangpf/clu
AzureRT PR - CLU Test Updates
2 parents 0157049 + bda40bf commit 23f9e70

File tree

5 files changed

+57
-1
lines changed

5 files changed

+57
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Param(
2+
[string]$resourceGroupName,
3+
[string]$resourceGroupLocation
4+
)
5+
6+
Write-Host "Skip"
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
set -e
3+
printf "\n=== Managing Virtual Machine Sizes in Azure Compute ===\n"
4+
5+
printf "\n1. Showing VM size results in location: %s.\n" "$location"
6+
azure vmsize get --location "$location"
7+
8+
printf "\n2. Checking VM size results in location: %s.\n" "$location"
9+
vmSizeResult=`azure vmsize get --location "$location"`
10+
11+
if [[ $vmSizeResult == "" ]]; then
12+
echo "Failure: No VM sizes!" 1>&2
13+
exit 1
14+
else
15+
echo "Success: Non-empty Results."
16+
fi
17+
18+
filterResult=`azure vmsize get --location "$location" | cat | jq 'select(.name | contains("Standard_A0"))' --raw-output`
19+
if [[ "$filterResult" == "" ]]; then
20+
echo "Failure: Standard_A0 vm size not found." 1>&2
21+
exit 1
22+
else
23+
echo "Success: Standard_A0 vm size found."
24+
fi
25+
26+
filterResult=`azure vmsize get --location "$location" | cat | jq 'select(.name | contains("Standard_G1"))' --raw-output`
27+
if [[ "$filterResult" == "" ]]; then
28+
echo "Failure: Standard_G1 vm size not found." 1>&2
29+
exit 1
30+
else
31+
echo "Success: Standard_G1 vm size found."
32+
fi
33+
34+
filterResult=`azure vmsize get --location "$location" | cat | jq 'select(.name | contains("NonStandard_A1"))' --raw-output`
35+
if [[ "$filterResult" == "" ]]; then
36+
echo "Success: NonStandard_A1 vm size not found."
37+
else
38+
echo "Failure: NonStandard_A1 vm size found." 1>&2
39+
exit 1
40+
fi

examples/virtual-hard-disk/01-VirtualHardDisks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ azure vhd save -o --resourcegroupname "$groupName" --sourceuri https://"$storage
1616

1717
printf "\n5. Validating the downloaded file is the same.\n"
1818
diffResult=`diff ./test_downloaded_by_clu.vhd $BASEDIR/test_uploaded_byps.vhd`
19+
printf "Difference Result = '%s'.\n" "$diffResult"
1920
if [ "$diffResult" = "" ]; then
2021
echo "Checked"
2122
else

src/CLU/Commands.Common.ScenarioTest/SampleTest.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,12 @@ public void VirtualHardDisksTest()
4545
var helper = _collectionState.GetRunner("virtual-hard-disk");
4646
helper.RunScript("01-VirtualHardDisks");
4747
}
48+
49+
[Fact]
50+
public void VirtualMachineSizeTest()
51+
{
52+
var helper = _collectionState.GetRunner("compute-management");
53+
helper.RunScript("01-VirtualMachineSizes");
54+
}
4855
}
4956
}

src/CLU/Sync/Upload/BlobCreatorBase.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ private static Mutex AcquireSingleInstanceMutex(Uri destinationBlobUri)
300300
Mutex singleInstanceMutex = null;
301301
try
302302
{
303-
singleInstanceMutex = new Mutex(false, @"Global\" + mutexName);
303+
// TODO: CLU
304+
singleInstanceMutex = new Mutex(false);
305+
//singleInstanceMutex = new Mutex(false, @"Global\" + mutexName);
304306
// TODO: CLU
305307
if (!singleInstanceMutex.WaitOne(TimeSpan.FromSeconds(5)))
306308
//if (!singleInstanceMutex.WaitOne(TimeSpan.FromSeconds(5), false))

0 commit comments

Comments
 (0)