Turn on unit testing and fix test outputs

Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
This commit is contained in:
Matej Habrnal 2017-09-11 13:27:16 +02:00
commit 05aeeb9597
2 changed files with 8 additions and 65 deletions

View file

@ -1,59 +0,0 @@
From 093339ce9047eee2173af575d3256095755bd5ab Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Mon, 4 Sep 2017 09:57:24 +0200
Subject: [PATCH] Fix test outputs for armv7l
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
test/outputs/Linux-armv7l/run_test.log.in | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/outputs/Linux-armv7l/run_test.log.in b/test/outputs/Linux-armv7l/run_test.log.in
index b92de6b..eaafbdd 100644
--- a/test/outputs/Linux-armv7l/run_test.log.in
+++ b/test/outputs/Linux-armv7l/run_test.log.in
@@ -1,4 +1,4 @@
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open0()
Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory)
at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
@@ -7,7 +7,7 @@ Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such
at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class]
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
executable: @CMAKE_BINARY_DIR@/test/Test.class
-Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open()
+Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open0()
Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
at java.io.FileInputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
at java.io.FileInputStream.open(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class]
@@ -16,7 +16,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss
at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class]
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
executable: @CMAKE_BINARY_DIR@/test/Test.class
-Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open()
+Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open0()
Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied)
at java.io.FileOutputStream.open0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
at java.io.FileOutputStream.open(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class]
@@ -26,7 +26,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss
at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class]
at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class]
executable: @CMAKE_BINARY_DIR@/test/Test.class
-Caught exception java.net.UnknownHostException in method java.net.InetAddress$2.lookupAllHostAddr()
+Caught exception java.net.UnknownHostException in method java.net.Inet6AddressImpl.lookupAllHostAddr()
Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$2.class]
@@ -53,7 +53,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy
at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class]
at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class]
executable: @CMAKE_BINARY_DIR@/test/Test.class
-Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect()
+Caught exception java.net.ConnectException in method java.net.PlainSocketImpl.socketConnect()
Exception in thread "main" java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class]
--
2.13.5

View file

@ -3,7 +3,7 @@
Name: abrt-java-connector
Version: 1.1.0
Release: 13%{?dist}
Release: 14%{?dist}
Summary: JNI Agent library converting Java exceptions to ABRT problems
Group: System Environment/Libraries
@ -41,7 +41,6 @@ Patch0013: 0013-Correct-includes-for-ABRT.patch
Patch0014: 0014-Drop-pedantic-from-CFLAGS.patch
Patch0015: 0015-Rename-log-to-log_warning.patch
Patch0016: 0016-Update-the-test-results.patch
Patch0017: 0017-Fix-test-outputs-for-armv7l.patch
%description
JNI library providing an agent capable to process both caught and uncaught
@ -87,13 +86,16 @@ make install DESTDIR=%{buildroot}
%check
#make test || {
# cat Testing/Temporary/LastTest.log
# exit 1
#}
make test || {
cat Testing/Temporary/LastTest.log
exit 1
}
%changelog
* Mon Sep 11 2017 Matej Habrnal <mhabrnal@redhat.com> - 1.1.0-14
- turn on unit testing and fix test outputs
* Mon Aug 28 2017 Matej Habrnal <mhabrnal@redhat.com> - 1.1.0-13
- Rename log() to log_warning()
- Update the test results