Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b6f596c4112818109441c84d313cf38fa06d6768)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -55,6 +55,11 @@ Write-Host -ForegroundColor Red "----------------------------------------------- |
| 55 | 55 |
# |
| 56 | 56 |
# DOCKER_DUT_DEBUG if defined starts the daemon under test in debug mode. |
| 57 | 57 |
# |
| 58 |
+# DOCKER_STORAGE_OPTS comma-separated list of optional storage driver options for the daemon under test |
|
| 59 |
+# examples: |
|
| 60 |
+# DOCKER_STORAGE_OPTS="size=40G" |
|
| 61 |
+# DOCKER_STORAGE_OPTS="lcow.globalmode=false,lcow.kernel=kernel.efi" |
|
| 62 |
+# |
|
| 58 | 63 |
# SKIP_VALIDATION_TESTS if defined skips the validation tests |
| 59 | 64 |
# |
| 60 | 65 |
# SKIP_UNIT_TESTS if defined skips the unit tests |
| ... | ... |
@@ -585,6 +590,15 @@ Try {
|
| 585 | 585 |
$dutArgs += "--exec-opt isolation=hyperv" |
| 586 | 586 |
} |
| 587 | 587 |
|
| 588 |
+ # Arguments: Allow setting optional storage-driver options |
|
| 589 |
+ # example usage: DOCKER_STORAGE_OPTS="lcow.globalmode=false,lcow.kernel=kernel.efi" |
|
| 590 |
+ if (-not ("$env:DOCKER_STORAGE_OPTS" -eq "")) {
|
|
| 591 |
+ Write-Host -ForegroundColor Green "INFO: Running the daemon under test with storage-driver options ${env:DOCKER_STORAGE_OPTS}"
|
|
| 592 |
+ $env:DOCKER_STORAGE_OPTS.Split(",") | ForEach {
|
|
| 593 |
+ $dutArgs += "--storage-opt $_" |
|
| 594 |
+ } |
|
| 595 |
+ } |
|
| 596 |
+ |
|
| 588 | 597 |
# Start the daemon under test, ensuring everything is redirected to folders under $TEMP. |
| 589 | 598 |
# Important - we launch the -$COMMITHASH version so that we can kill it without |
| 590 | 599 |
# killing the control daemon. |