Browse Source

Added platform check.

Signed-off-by: scspaldi <[email protected]>
scspaldi 3 years ago
parent
commit
0545708f15

+ 1 - 1
Gem/Code/Source/NetSoakTestSystemComponent.cpp

@@ -177,7 +177,7 @@ namespace NetSoakTest
         AZ::TimeMs elapsedMs = aznumeric_cast<AZ::TimeMs>(aznumeric_cast<int64_t>(deltaTime / 1000.0f));
 
         m_totalElapsedMs += elapsedMs;
-        if (soak_runtime != AZ::TimeMs(0) && total_elapsedMs > soak_runtime)
+        if (soak_runtime != AZ::TimeMs(0) && m_totalElapsedMs > soak_runtime)
         {
             DumpSoakStats();
             exit(0);

+ 7 - 4
Scripts/build/Jenkins/Jenkinsfile

@@ -379,10 +379,13 @@ def Build(Map pipelineConfig, String platform, String type, String workspace) {
             PlatformSh(command, "Running ${platform} ${type}")
         }
 
-        // Launch the project, which automatically starts the tests
-        launch_command += "NetSoakTest.ServerLauncher --soak_runtime=1800000 --soak_mode=loopback --rhi=null"
-        dir("${workspace}/${ENGINE_REPOSITORY_NAME}") {
-            PlatformSh(launch_command, "Running NetSoakTest project")
+        // Only launch NetSoakTest on the appropriate platforms
+        if (platform == 'Windows' &&) {
+            // Launch the project, which automatically starts the tests
+            launch_command = "NetSoakTest.ServerLauncher --soak_runtime=1800000 --soak_mode=loopback --rhi=null"
+            dir("${workspace}/${ENGINE_REPOSITORY_NAME}") {
+                PlatformSh(launch_command, "Running NetSoakTest project")
+            }
         }
 
     }