Skip to content

Commit bf23eb5

Browse files
committed
Merge pull request Azure#1559 from stankovski/clu
Fixes the issue with POSIX path translation in MinGW bash
2 parents 43c180c + 14fb36d commit bf23eb5

File tree

7 files changed

+23
-27
lines changed

7 files changed

+23
-27
lines changed

examples/lib/loginUser.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/bin/bash
2+
echo "Logging in as user"
23
azure account add -u "$azureUser" -p "$password" -s "$subscription"

examples/lib/setup.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/lib/testrunner.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
#!/bin/bash
22
export BASEDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
3-
. $BASEDIR/assert.sh
43
. $BASEDIR/helper.sh
5-
. $BASEDIR/setup.sh
64
export groupName=`randomName testrg`
75
export location="westus"
6+
export CmdletSessionID=1010
7+
export MSYS_NO_PATHCONV=1
88

9-
login
9+
. $BASEDIR/loginUser.sh
1010

1111
for d in $( ls $BASEDIR/.. --ignore=lib ); do
1212
for f in $( ls $BASEDIR/../$d/*.sh ); do
1313
echo "running: $f"
1414
. $f
15-
cleanup
15+
set +e
16+
printf "\nCleanup: removing resource group: %s\n" $groupName
17+
azure group remove --name "$groupName" --force
18+
set -e
1619
echo "success: $f"
1720
done
18-
done
21+
done
22+
23+
export MSYS_NO_PATHCONV=

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ protected virtual IDictionary<string, string> GetSettings(string key)
4545
var environmentValue = Environment.GetEnvironmentVariable(key);
4646
if (string.IsNullOrWhiteSpace(environmentValue))
4747
{
48-
throw new InvalidOperationException($"Unable to create credentials. " +
49-
"Please set environment ${key}");
48+
throw new InvalidOperationException($"Unable to create credentials. Please set environment variable `{key}`");
5049
}
5150
IDictionary<string, string> settings = new Dictionary<string, string>();
5251
foreach (

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ public SampleTest(ScenarioTestFixture fixture)
3333
}
3434

3535
[Fact]
36-
public void RunSampleTest()
36+
public void ResourceGroupsTest()
3737
{
3838
var helper = _collectionState.GetRunner("resource-management");
3939
helper.RunScript("01-ResourceGroups");
4040
}
4141

4242
[Fact]
43-
public void RunVirtualHardDiskTest()
43+
public void VirtualHardDisksTest()
4444
{
4545
var helper = _collectionState.GetRunner("virtual-hard-disk");
4646
helper.RunScript("01-VirtualHardDisks");

tools/CLU/BuildAndInstallClu.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\ubuntu.14.04-x6
5656
copy /Y %azuresh% %root%\drop\clurun\ubuntu.14.04-x64
5757

5858
REM, windows version also needs it for bash based testing
59-
copy /Y %azuresh% %root%\drop\clurun\win7-x64\azure
59+
copy /Y %~dp0\azure.win.sh %root%\drop\clurun\win7-x64\azure

tools/CLU/azure.win.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
if [ -z ${CmdletSessionID} ]
3+
then
4+
export CmdletSessionID=$PPID
5+
fi
6+
SCRIPTPATH=$(dirname "$0")
7+
WSCRIPTPATH=$({ cd $SCRIPTPATH && pwd -W; } | sed 's|/|\\|g')
8+
$WSCRIPTPATH/clurun -s azure -r $WSCRIPTPATH/azure.lx "$@"

0 commit comments

Comments
 (0)