Просмотр исходного кода

Added platform check.

Signed-off-by: scspaldi <[email protected]>
scspaldi 3 лет назад
Родитель
Сommit
0545708f15
2 измененных файлов с 8 добавлено и 5 удалено
  1. 1 1
      Gem/Code/Source/NetSoakTestSystemComponent.cpp
  2. 7 4
      Scripts/build/Jenkins/Jenkinsfile

+ 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));
         AZ::TimeMs elapsedMs = aznumeric_cast<AZ::TimeMs>(aznumeric_cast<int64_t>(deltaTime / 1000.0f));
 
 
         m_totalElapsedMs += elapsedMs;
         m_totalElapsedMs += elapsedMs;
-        if (soak_runtime != AZ::TimeMs(0) && total_elapsedMs > soak_runtime)
+        if (soak_runtime != AZ::TimeMs(0) && m_totalElapsedMs > soak_runtime)
         {
         {
             DumpSoakStats();
             DumpSoakStats();
             exit(0);
             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}")
             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")
+            }
         }
         }
 
 
     }
     }