Skip to content

Fixes the issue with POSIX path translation in MinGW bash #1559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/lib/loginUser.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
echo "Logging in as user"
azure account add -u "$azureUser" -p "$password" -s "$subscription"
17 changes: 0 additions & 17 deletions examples/lib/setup.sh

This file was deleted.

15 changes: 10 additions & 5 deletions examples/lib/testrunner.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
#!/bin/bash
export BASEDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $BASEDIR/assert.sh
. $BASEDIR/helper.sh
. $BASEDIR/setup.sh
export groupName=`randomName testrg`
export location="westus"
export CmdletSessionID=1010
export MSYS_NO_PATHCONV=1

login
. $BASEDIR/loginUser.sh

for d in $( ls $BASEDIR/.. --ignore=lib ); do
for f in $( ls $BASEDIR/../$d/*.sh ); do
echo "running: $f"
. $f
cleanup
set +e
printf "\nCleanup: removing resource group: %s\n" $groupName
azure group remove --name "$groupName" --force
set -e
echo "success: $f"
done
done
done

export MSYS_NO_PATHCONV=
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ protected virtual IDictionary<string, string> GetSettings(string key)
var environmentValue = Environment.GetEnvironmentVariable(key);
if (string.IsNullOrWhiteSpace(environmentValue))
{
throw new InvalidOperationException($"Unable to create credentials. " +
"Please set environment ${key}");
throw new InvalidOperationException($"Unable to create credentials. Please set environment variable `{key}`");
}
IDictionary<string, string> settings = new Dictionary<string, string>();
foreach (
Expand Down
4 changes: 2 additions & 2 deletions src/CLU/Commands.Common.ScenarioTest/SampleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ public SampleTest(ScenarioTestFixture fixture)
}

[Fact]
public void RunSampleTest()
public void ResourceGroupsTest()
{
var helper = _collectionState.GetRunner("resource-management");
helper.RunScript("01-ResourceGroups");
}

[Fact]
public void RunVirtualHardDiskTest()
public void VirtualHardDisksTest()
{
var helper = _collectionState.GetRunner("virtual-hard-disk");
helper.RunScript("01-VirtualHardDisks");
Expand Down
2 changes: 1 addition & 1 deletion tools/CLU/BuildAndInstallClu.bat
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ copy /Y %root%\drop\clurun\win7-x64\msclu.cfg %root%\drop\clurun\ubuntu.14.04-x6
copy /Y %azuresh% %root%\drop\clurun\ubuntu.14.04-x64

REM, windows version also needs it for bash based testing
copy /Y %azuresh% %root%\drop\clurun\win7-x64\azure
copy /Y %~dp0\azure.win.sh %root%\drop\clurun\win7-x64\azure
8 changes: 8 additions & 0 deletions tools/CLU/azure.win.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
if [ -z ${CmdletSessionID} ]
then
export CmdletSessionID=$PPID
fi
SCRIPTPATH=$(dirname "$0")
WSCRIPTPATH=$({ cd $SCRIPTPATH && pwd -W; } | sed 's|/|\\|g')
$WSCRIPTPATH/clurun -s azure -r $WSCRIPTPATH/azure.lx "$@"