Fix calling of script creating shared folders

The calling script for each platform missed the leading ". " so
powershell never executed the script. Sadly, provisioning still
succeeded.

Add some log output to the script doing the work to verify that
the file system is what is expected to be at the end. If it's not,
then the cd'ing into the shares will fail and the script will
return with a non-zero exit.

Pick-to: 6.4
Change-Id: I8fe85c7e202132525876cdddf41750732f69aaf9
Reviewed-by: Simo Fält <simo.falt@qt.io>
This commit is contained in:
Volker Hilsheimer
2022-07-28 19:09:35 +02:00
parent e8495fc86e
commit aab85286b7
5 changed files with 14 additions and 4 deletions

View File

@@ -45,6 +45,8 @@ $writable='testsharewritable'
$readonlypath="${env:SystemDrive}\${readonly}"
$writablepath="${env:SystemDrive}\${writable}"
Write-Host "******************** Creating folders ${readonlpath} and ${writablepath}"
if ($(Test-Path -Path $readonlypath)) {
Remove-SmbShare -Name $readonly -Force
Remove-Item -Path $readonlypath -Force -Recurse
@@ -64,3 +66,11 @@ New-Item "${readonlypath}\readme.txt" -ItemType File
New-Item ${writablepath} -ItemType Directory
New-SmbShare -Name ${writable} -Path ${writablepath} -ChangeAccess Users
Write-Host "******************** File system content"
dir ${env:SystemDrive}
cd "\\${env:COMPUTERNAME}\${readonly}"
dir
cd "\\${env:COMPUTERNAME}\${writable}"
dir
Write-Host "******************** Done Content"

View File

@@ -1 +1 @@
"$PSScriptRoot\..\common\windows\share-test-folders.ps1"
. "$PSScriptRoot\..\common\windows\share-test-folders.ps1"

View File

@@ -1 +1 @@
"$PSScriptRoot\..\common\windows\share-test-folders.ps1"
. "$PSScriptRoot\..\common\windows\share-test-folders.ps1"

View File

@@ -1 +1 @@
"$PSScriptRoot\..\common\windows\share-test-folders.ps1"
. "$PSScriptRoot\..\common\windows\share-test-folders.ps1"

View File

@@ -1 +1 @@
"$PSScriptRoot\..\common\windows\share-test-folders.ps1"
. "$PSScriptRoot\..\common\windows\share-test-folders.ps1"