Skip to content

Commit

Permalink
integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
twobraids committed Dec 10, 2015
1 parent 1a6ae3f commit 83f61d6
Show file tree
Hide file tree
Showing 62 changed files with 796,981 additions and 0 deletions.
44 changes: 44 additions & 0 deletions scripts/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ function cleanup() {
rm -rf ./primaryCrashStore/ ./processedCrashStore/
rm -rf ./crashes/
rm -rf ./submissions
rm -rf ./correlations

echo "INFO: Terminating background jobs"
echo " any kill usage errors below may be ignored"
Expand Down Expand Up @@ -527,5 +528,48 @@ do

done

# start correlations integration tests
echo "INFO: starting up *** correlations test *** "
echo " * in this test, we ensure the correlations reports app produces the correct output in json form"

mkdir ./correlations

socorro correlations \
--source.crashstorage_class=socorro.collector.submitter_app.SubmitterFileSystemWalkerSource \
--source.search_root=testcrash/processed \
--new_crash_source.new_crash_source_class="" \
--global.correlations.path=./correlations \
--global.correlations.core.output_class=socorro.analysis.correlations.core_count_rule.JsonFileOutputForCoreCounts \
--global.correlations.interesting.output_class=socorro.analysis.correlations.interesting_rule.JsonFileOutputForInterestingModules \
--producer_consumer.number_of_threads=10 \
--destination.crashstorage_class=socorro.external.crashstorage_base.NullCrashStorage \
--global.correlation.min_count_for_inclusion=1 \
> correlations.log 2>&1

if [ $? = 1 ]
then
echo "ERROR: correlations logged errors"
echo "***** BEGIN correlation log *****"
cat correlations.log
echo "***** END correlation log *****"
fatal 1 "ERROR: correlations produced unexpected output"
fi

check_for_logged_fatal_errors $? correlations

diff ./correlations/20151130 ./testcrash/correlations-integration-correct-output >correlation.diff
if [ $? = 1 ]
then
# something went wrong
echo "ERROR: correlations produced unexpected output"
echo "***** BEGIN correlation log *****"
cat correlations.log
echo "***** BEGIN correlation diff *****"
cat correlation.diff
echo "***** END correlation diff *****"
fatal 1 "ERROR: correlations produced unexpected output"
fi
echo "*** correlations *** PASSES INTEGRATION TESTS"

echo "If you are reading this, then ALL the integration tests passed!"
exit 0
1 change: 1 addition & 0 deletions socorro/unittest/lib/test_transform_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ def test_rules_in_config(self):

def test_rules_close(self):
config = DotDict()
config.logger = Mock().s
config.chatty_rules = False
config.chatty = False
config.tag = 'test.rule'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Linux": {
"count": 1,
"signatures": {
"js_compare_strings|SIGSEGV": {
"cores": {
"arm with 0 cores": {
"in_os_count": 1,
"in_os_ratio": 1.0,
"in_sig_count": 1,
"in_sig_ratio": 1.0,
"rounded_in_os_ratio": 100,
"rounded_in_sig_ratio": 100
}
},
"count": 1,
"name": "js_compare_strings|SIGSEGV"
}
}
},
"date_key": "151130",
"notes": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Linux": {
"count": 1,
"signatures": {
"js_compare_strings|SIGSEGV": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Linux": {
"count": 1,
"signatures": {
"js_compare_strings|SIGSEGV": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Linux": {
"count": 1,
"signatures": {
"js_compare_strings|SIGSEGV": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Linux": {
"count": 1,
"signatures": {
"js_compare_strings|SIGSEGV": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Linux": {
"count": 1,
"signatures": {
"libflashplayer.so@0x798f4d|SIGSEGV": {
"cores": {
"x86 with 1 cores": {
"in_os_count": 1,
"in_os_ratio": 1.0,
"in_sig_count": 1,
"in_sig_ratio": 1.0,
"rounded_in_os_ratio": 100,
"rounded_in_sig_ratio": 100
}
},
"count": 1,
"name": "libflashplayer.so@0x798f4d|SIGSEGV"
}
}
},
"date_key": "151130",
"notes": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Linux": {
"count": 1,
"signatures": {
"libflashplayer.so@0x798f4d|SIGSEGV": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Linux": {
"count": 1,
"signatures": {
"libflashplayer.so@0x798f4d|SIGSEGV": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Linux": {
"count": 1,
"signatures": {
"libflashplayer.so@0x798f4d|SIGSEGV": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Linux": {
"count": 1,
"signatures": {
"libflashplayer.so@0x798f4d|SIGSEGV": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Windows NT": {
"count": 1,
"signatures": {
"BaseThreadInitThunk|EXCEPTION_ACCESS_VIOLATION_EXEC": {
"cores": {
"x86 with 2 cores": {
"in_os_count": 1,
"in_os_ratio": 1.0,
"in_sig_count": 1,
"in_sig_ratio": 1.0,
"rounded_in_os_ratio": 100,
"rounded_in_sig_ratio": 100
}
},
"count": 1,
"name": "BaseThreadInitThunk|EXCEPTION_ACCESS_VIOLATION_EXEC"
}
}
},
"date_key": "151130",
"notes": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Windows NT": {
"count": 1,
"signatures": {
"BaseThreadInitThunk|EXCEPTION_ACCESS_VIOLATION_EXEC": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Windows NT": {
"count": 1,
"signatures": {
"BaseThreadInitThunk|EXCEPTION_ACCESS_VIOLATION_EXEC": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Windows NT": {
"count": 1,
"signatures": {
"BaseThreadInitThunk|EXCEPTION_ACCESS_VIOLATION_EXEC": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Windows NT": {
"count": 1,
"signatures": {
"BaseThreadInitThunk|EXCEPTION_ACCESS_VIOLATION_EXEC": {
"count": 1,
"modules": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Windows NT": {
"count": 1,
"signatures": {
"shutdownhang | WaitForSingleObjectEx | WaitForSingleObject | PR_Wait | mozilla::ReentrantMonitor::Wait | nsThread::ProcessNextEvent | NS_ProcessNextEvent | mozilla::MediaShutdownManager::Shutdown|EXCEPTION_BREAKPOINT": {
"cores": {
"x86 with 4 cores": {
"in_os_count": 1,
"in_os_ratio": 1.0,
"in_sig_count": 1,
"in_sig_ratio": 1.0,
"rounded_in_os_ratio": 100,
"rounded_in_sig_ratio": 100
}
},
"count": 1,
"name": "shutdownhang | WaitForSingleObjectEx | WaitForSingleObject | PR_Wait | mozilla::ReentrantMonitor::Wait | nsThread::ProcessNextEvent | NS_ProcessNextEvent | mozilla::MediaShutdownManager::Shutdown|EXCEPTION_BREAKPOINT"
}
}
},
"date_key": "151130",
"notes": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"date_key": "151130",
"notes": [],
"os_counters": {
"Windows NT": {
"count": 1,
"signatures": {
"shutdownhang | WaitForSingleObjectEx | WaitForSingleObject | PR_Wait | mozilla::ReentrantMonitor::Wait | nsThread::ProcessNextEvent | NS_ProcessNextEvent | mozilla::MediaShutdownManager::Shutdown|EXCEPTION_BREAKPOINT": {
"count": 1,
"modules": {}
}
}
}
}
}
Loading

0 comments on commit 83f61d6

Please sign in to comment.