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