diff options
author | Sven Gothel <[email protected]> | 2022-07-21 15:52:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-07-21 15:52:39 +0200 |
commit | 6b3ea99178f6a7cb1b7ae6213c4529f149baa2e2 (patch) | |
tree | f3a8a8b88092cf70d8e3ded9c0c4f8b17ee18dc3 | |
parent | 1053aeda0e253ebf31b062988bf559cc53ce44b7 (diff) |
test/java: Enforce UTF-8 file.encoding for unit tests
-rw-r--r-- | test/java/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/java/CMakeLists.txt b/test/java/CMakeLists.txt index 2c8ddd9..a50e418 100644 --- a/test/java/CMakeLists.txt +++ b/test/java/CMakeLists.txt @@ -60,7 +60,7 @@ string( REPLACE "/" "." BASENAMES_IDIOMATIC_EXAMPLES "${TEST_JAVA_FILES2}" ) set( TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES} ) foreach(name ${TARGETS_IDIOMATIC_EXAMPLES}) - add_test (NAME ${name} COMMAND ${JAVA_RUNTIME} + add_test (NAME ${name} COMMAND ${JAVA_RUNTIME} -Dfile.encoding=UTF-8 -cp ${JUNIT_JAR}:${jaulib_fat_jar_file}:${jaulib_test_jar_file} org.junit.runner.JUnitCore ${name}) endforeach() @@ -76,7 +76,7 @@ IF( ( TEST_WITH_SUDO ) AND ( "${OS_NAME}" STREQUAL "linux" ) ) foreach( name ${TARGETS_IDIOMATIC_TESTSUDO} ) add_test (NAME ${name} COMMAND sudo -E /sbin/capsh --caps=cap_sys_admin,cap_setuid,cap_setgid+eip\ cap_setpcap+ep --keep=1 --user=$ENV{USER} --addamb=cap_sys_admin,cap_setuid,cap_setgid+eip - -- -c "ulimit -c unlimited; ${JAVA_RUNTIME} -cp ${JUNIT_JAR}:${jaulib_fat_jar_file}:${jaulib_test_jar_file} org.junit.runner.JUnitCore ${name}") + -- -c "ulimit -c unlimited; ${JAVA_RUNTIME} -Dfile.encoding=UTF-8 -cp ${JUNIT_JAR}:${jaulib_fat_jar_file}:${jaulib_test_jar_file} org.junit.runner.JUnitCore ${name}") endforeach() ELSE() message(STATUS "Testsudo* disabled: TEST_WITH_SUDO ${TEST_WITH_SUDO}, OS_NAME ${OS_NAME}") |