Blame SOURCES/0017-Provide-Arch-specific-StressTest-configuration.patch

f9a98e
From 9fb4776f57de0948c5256b3b364880dced66e10d Mon Sep 17 00:00:00 2001
f9a98e
From: Jakub Filak <jfilak@redhat.com>
f9a98e
Date: Thu, 9 Jan 2014 13:30:14 +0100
f9a98e
Subject: [PATCH 17/39] Provide Arch specific StressTest configuration
f9a98e
f9a98e
Related to rhbz#1054737
f9a98e
f9a98e
Signed-off-by: Jakub Filak <jfilak@redhat.com>
f9a98e
---
f9a98e
 test/CMakeLists.txt | 15 ++++++++++++++-
f9a98e
 test/testdriver     |  6 ++++--
f9a98e
 2 files changed, 18 insertions(+), 3 deletions(-)
f9a98e
f9a98e
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
f9a98e
index 6be9498..0a73e2b 100644
f9a98e
--- a/test/CMakeLists.txt
f9a98e
+++ b/test/CMakeLists.txt
f9a98e
@@ -235,10 +235,23 @@ _add_test_target(
f9a98e
 )
f9a98e
 _add_test(run_cut_reason_message 2)
f9a98e
 
f9a98e
+if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^s390x?$")
f9a98e
+    set(STRESS_TEST_REPEATS 30)
f9a98e
+    set(STRESS_TEST_THREADS 200)
f9a98e
+elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^ppc\(64\)?$")
f9a98e
+    set(STRESS_TEST_REPEATS 20)
f9a98e
+    set(STRESS_TEST_THREADS 150)
f9a98e
+elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^armv7l$")
f9a98e
+    set(STRESS_TEST_REPEATS 10)
f9a98e
+    set(STRESS_TEST_THREADS 100)
f9a98e
+else()
f9a98e
+    set(STRESS_TEST_REPEATS 60)
f9a98e
+    set(STRESS_TEST_THREADS 600)
f9a98e
+endif()
f9a98e
 
f9a98e
 add_custom_target(
f9a98e
     run_thread_stress
f9a98e
-    COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=caught=java.lang.ArrayIndexOutOfBoundsException,journald=no ThreadStressTest
f9a98e
+    COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=caught=java.lang.ArrayIndexOutOfBoundsException,journald=no ThreadStressTest reps=${STRESS_TEST_REPEATS} threads=${STRESS_TEST_THREADS}
f9a98e
     DEPENDS ${TEST_JAVA_TARGETS}
f9a98e
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
f9a98e
 )
f9a98e
diff --git a/test/testdriver b/test/testdriver
f9a98e
index 9e5c2b8..b02bc5c 100644
f9a98e
--- a/test/testdriver
f9a98e
+++ b/test/testdriver
f9a98e
@@ -19,10 +19,12 @@ TMP_RESULT=`mktemp /tmp/abrt_java_connector.XXXXXXX`
f9a98e
 
f9a98e
 if [ -n "$5" ] && [ 1 -eq $5 ]; then
f9a98e
     tac $4 | awk \
f9a98e
-'BEGIN             { main = 0 }
f9a98e
+'BEGIN             { main = 0; pfx = "" }
f9a98e
 /^(Unc|C)aught/    { if (main == 1) { print $0; main = 0 } }
f9a98e
                    { if (main == 1) { print $0 } }
f9a98e
-/\s*at .*\.main\(/ { if (main == 0) { print $0; main = 1 } }' | tac > $TMP_RESULT
f9a98e
+/\s*at .*\.main\(/ { if (main == 0) { print pfx$0; main = 1 } }
f9a98e
+                   { pfx = "" }
f9a98e
+/^executable:/     { pfx = $0"\n" }' | tac > $TMP_RESULT
f9a98e
 else
f9a98e
     cp $4 $TMP_RESULT
f9a98e
 fi
f9a98e
-- 
f9a98e
1.8.3.1
f9a98e