summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-01-26 20:35:48 +0100
committerSven Gothel <[email protected]>2021-01-26 20:35:48 +0100
commit520335897fa99fb8bd2f718f0ace5b1beae45e70 (patch)
tree2d3a1ef182863800fc205d658f484b8bd72d5647 /test
parent9162302ee3408dee2db4caa671962ce36c6b3fa0 (diff)
Adapt to jaulib changes: Jar naming convention (dash, not underscore for extras) ..; direct-bt-fat* includes jaulib-fat (standalone)
direct-bt-fat.jar is with Tinyb direct-bt-fat2.jar is ex Tinyb (merely testing size and encapsulation)
Diffstat (limited to 'test')
-rw-r--r--test/direct_bt/CMakeLists.txt8
-rw-r--r--test/ieee11073/CMakeLists.txt7
-rw-r--r--test/java/CMakeLists.txt14
-rw-r--r--test/java/manifest.txt.in4
-rw-r--r--test/java/test/org/direct_bt/TestEUI48.java6
-rw-r--r--test/java/test/org/direct_bt/VersionInfo.java18
6 files changed, 28 insertions, 29 deletions
diff --git a/test/direct_bt/CMakeLists.txt b/test/direct_bt/CMakeLists.txt
index f20c0b70..716f942d 100644
--- a/test/direct_bt/CMakeLists.txt
+++ b/test/direct_bt/CMakeLists.txt
@@ -15,16 +15,8 @@ set( TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES} )
foreach( name ${TARGETS_IDIOMATIC_EXAMPLES} )
add_executable(${name} ${name}.cpp)
-endforeach()
-
-set(ALL_EXAMPLE_TARGETS
- ${TARGETS_IDIOMATIC_EXAMPLES}
-)
-
-foreach(name ${ALL_EXAMPLE_TARGETS})
target_link_libraries(${name} direct_bt catch2)
add_dependencies(${name} direct_bt catch2)
add_test (NAME ${name} COMMAND ${name})
endforeach()
-
diff --git a/test/ieee11073/CMakeLists.txt b/test/ieee11073/CMakeLists.txt
index 2ba595ae..4615b4d9 100644
--- a/test/ieee11073/CMakeLists.txt
+++ b/test/ieee11073/CMakeLists.txt
@@ -13,13 +13,6 @@ set( TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES} )
foreach( name ${TARGETS_IDIOMATIC_EXAMPLES} )
add_executable(${name} ${name}.cpp)
-endforeach()
-
-set(ALL_EXAMPLE_TARGETS
- ${TARGETS_IDIOMATIC_EXAMPLES}
-)
-
-foreach(name ${ALL_EXAMPLE_TARGETS})
target_link_libraries(${name} direct_bt catch2)
add_dependencies(${name} direct_bt catch2)
add_test (NAME ${name} COMMAND ${name})
diff --git a/test/java/CMakeLists.txt b/test/java/CMakeLists.txt
index 9ef771d3..81f170fa 100644
--- a/test/java/CMakeLists.txt
+++ b/test/java/CMakeLists.txt
@@ -4,7 +4,7 @@ find_jar(JUNIT_JAR
NAMES junit4 junit
PATHS "/usr/share/java")
-set(direct_bt_test_jar_file ${CMAKE_CURRENT_BINARY_DIR}/direct_bt_test.jar CACHE FILEPATH "direct_bt test jar file" FORCE)
+set(direct_bt_test_jar_file ${CMAKE_CURRENT_BINARY_DIR}/direct_bt-test.jar CACHE FILEPATH "direct_bt test jar file" FORCE)
file(GLOB_RECURSE TEST_JAVA_SOURCES "*.java")
@@ -14,9 +14,9 @@ add_jar(direct_bt_test
${TEST_JAVA_SOURCES}
INCLUDE_JARS ${jaulib_fat_jar_file} ${direct_bt_fat_jar_file} ${jaulib_test_jar_file} ${JUNIT_JAR}
MANIFEST ${CMAKE_CURRENT_BINARY_DIR}/manifest.txt
- OUTPUT_NAME direct_bt_test
+ OUTPUT_NAME direct_bt-test
)
-add_dependencies(direct_bt_test jaulib_fat_jar direct_bt_fat_jar jaulib_test)
+add_dependencies(direct_bt_test direct_bt_fat_jar jaulib_test)
install (FILES ${direct_bt_test_jar_file} DESTINATION ${CMAKE_INSTALL_LIBDIR}/../lib/java)
@@ -24,13 +24,9 @@ string( REPLACE ".java" "" TEST_JAVA_FILES2 "${TEST_JAVA_FILES}" )
string( REPLACE "/" "." BASENAMES_IDIOMATIC_EXAMPLES "${TEST_JAVA_FILES2}" )
set( TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES} )
-set(ALL_EXAMPLE_TARGETS
- ${TARGETS_IDIOMATIC_EXAMPLES}
-)
-
-foreach(name ${ALL_EXAMPLE_TARGETS})
+foreach(name ${TARGETS_IDIOMATIC_EXAMPLES})
add_test (NAME ${name} COMMAND ${JAVA_RUNTIME}
- -cp ${JUNIT_JAR}:${jaulib_fat_jar_file}:${direct_bt_fat_jar_file}:${jaulib_test_jar_file}:${direct_bt_test_jar_file}
+ -cp ${JUNIT_JAR}:${direct_bt_fat_jar_file}:${jaulib_test_jar_file}:${direct_bt_test_jar_file}
org.junit.runner.JUnitCore ${name})
endforeach()
diff --git a/test/java/manifest.txt.in b/test/java/manifest.txt.in
index b3cbad8b..21590365 100644
--- a/test/java/manifest.txt.in
+++ b/test/java/manifest.txt.in
@@ -21,5 +21,5 @@ Extension-Name: org.direct_bt.test
Trusted-Library: true
Permissions: all-permissions
Application-Library-Allowable-Codebase: *
-Class-Path: jaulib_fat.jar direct_bt_fat.jar jaulib_test.jar
-Main-Class: org.jau.util.TestVersionInfo
+Class-Path: direct_bt-fat.jar jaulib-test.jar
+Main-Class: test.org.direct_bt.VersionInfo
diff --git a/test/java/test/org/direct_bt/TestEUI48.java b/test/java/test/org/direct_bt/TestEUI48.java
index e3551665..aa9dec9a 100644
--- a/test/java/test/org/direct_bt/TestEUI48.java
+++ b/test/java/test/org/direct_bt/TestEUI48.java
@@ -34,16 +34,16 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
-import org.junit.Test;
+import jau.test.junit.util.JunitTracer;
+
import org.direct_bt.BTException;
import org.direct_bt.BTFactory;
import org.direct_bt.BTManager;
import org.direct_bt.EUI48;
import org.direct_bt.EUI48Sub;
-import org.jau.junit.util.JunitTracer;
import org.junit.Assert;
-
import org.junit.FixMethodOrder;
+import org.junit.Test;
import org.junit.runners.MethodSorters;
/**
diff --git a/test/java/test/org/direct_bt/VersionInfo.java b/test/java/test/org/direct_bt/VersionInfo.java
new file mode 100644
index 00000000..7f87f079
--- /dev/null
+++ b/test/java/test/org/direct_bt/VersionInfo.java
@@ -0,0 +1,18 @@
+package test.org.direct_bt;
+
+import java.io.IOException;
+
+import org.direct_bt.DirectBTVersion;
+import org.jau.util.VersionUtil;
+
+public class VersionInfo {
+ public static void main(final String args[]) throws IOException {
+ System.err.println(VersionUtil.getPlatformInfo());
+ System.err.println("Version Info:");
+ System.err.println(DirectBTVersion.getInstance());
+ System.err.println("");
+ System.err.println("Full Manifest:");
+ System.err.println(DirectBTVersion.getInstance().getFullManifestInfo(null));
+ }
+
+}