Skip to content

Commit

Permalink
Fixed the now totally broken check if stress test program is supported.
Browse files Browse the repository at this point in the history
Also fixed the check if the selected test mode is supported.
  • Loading branch information
sp00n committed May 10, 2021
1 parent d7be43d commit 078f8b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script-corecycler.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.AUTHOR
sp00n
.VERSION
0.8.2.3
0.8.2.4
.DESCRIPTION
Sets the affinity of the selected stress test program process to only one core and cycles through
all the cores to test the stability of a Curve Optimizer setting
Expand All @@ -17,7 +17,7 @@
#>

# Global variables
$version = '0.8.2.3'
$version = '0.8.2.4'
$startDate = Get-Date
$startDateTime = Get-Date -format yyyy-MM-dd_HH-mm-ss
$logFilePath = 'logs'
Expand Down Expand Up @@ -1476,7 +1476,7 @@ function Get-Settings {


# If the selected stress test program is not supported
if (!$settings.General.stressTestProgram -or !($stressTestPrograms -contains $settings.General.stressTestProgram)) {
if (!$settings.General.stressTestProgram -or !($stressTestPrograms.Contains($settings.General.stressTestProgram))) {
Exit-WithFatalError('The selected stress test program "' + $settings.General.stressTestProgram + '" could not be found!')
}

Expand Down Expand Up @@ -1514,7 +1514,7 @@ function Get-Settings {
$modeString = ($modesArray -Join '-').ToUpper()

foreach ($mode in $modesArray) {
if (!$stressTestPrograms[$settings.General.stressTestProgram]['testModes'] -contains $mode) {
if (!($stressTestPrograms[$settings.General.stressTestProgram]['testModes'] -contains $mode)) {
Exit-WithFatalError('The selected test mode "' + $mode + '" is not available for ' + $stressTestPrograms[$settings.General.stressTestProgram]['displayName'] + '!')
}
}
Expand Down

0 comments on commit 078f8b0

Please sign in to comment.