diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-03-21 14:47:43 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-03-21 14:47:43 +0200 |
commit | 39107e18d5603046bbb301538986e5334547d42a (patch) | |
tree | 9851fa4affe668d24101b8b18c86d11be9153304 /tests | |
parent | Merge pull request #5250 (diff) | |
parent | crypto: fix PaX issue on NetBSD with CNv4 JIT (diff) | |
download | monero-39107e18d5603046bbb301538986e5334547d42a.tar.xz |
Merge pull request #5251
7632dede crypto: fix PaX issue on NetBSD with CNv4 JIT (moneromooo-monero)
89b1630e gtest: build fix for NetBSD (moneromooo-monero)
fa43b547 tests: handle any cmake detected python interpreter (moneromooo-monero)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/block_weight/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | tests/block_weight/block_weight.py | 2 | ||||
-rwxr-xr-x | tests/block_weight/compare.py | 15 | ||||
-rw-r--r-- | tests/gtest/include/gtest/internal/gtest-port-arch.h | 2 | ||||
-rw-r--r-- | tests/gtest/include/gtest/internal/gtest-port.h | 3 |
5 files changed, 17 insertions, 7 deletions
diff --git a/tests/block_weight/CMakeLists.txt b/tests/block_weight/CMakeLists.txt index b0d716ea0..a59c9c1fc 100644 --- a/tests/block_weight/CMakeLists.txt +++ b/tests/block_weight/CMakeLists.txt @@ -42,4 +42,4 @@ target_link_libraries(block_weight add_test( NAME block_weight - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/compare.py ${CMAKE_CURRENT_SOURCE_DIR}/block_weight.py ${CMAKE_CURRENT_BINARY_DIR}/block_weight) + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/compare.py ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/block_weight.py ${CMAKE_CURRENT_BINARY_DIR}/block_weight) diff --git a/tests/block_weight/block_weight.py b/tests/block_weight/block_weight.py index 06aaabb02..d6fd494e3 100755 --- a/tests/block_weight/block_weight.py +++ b/tests/block_weight/block_weight.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Simulate a maximal block attack on the Monero network # This uses the scheme proposed by ArticMine # Written by Sarang Nother diff --git a/tests/block_weight/compare.py b/tests/block_weight/compare.py index c6be05206..e058a7079 100755 --- a/tests/block_weight/compare.py +++ b/tests/block_weight/compare.py @@ -3,10 +3,17 @@ import sys import subprocess -print 'running: ', sys.argv[1] -S0 = subprocess.check_output(sys.argv[1], stderr=subprocess.STDOUT) -print 'running: ', sys.argv[2] -S1 = subprocess.check_output(sys.argv[2], stderr=subprocess.STDOUT) +if len(sys.argv) == 4: + first = [sys.argv[1], sys.argv[2]] + second = [sys.argv[3]] +else: + first = [sys.argv[1]] + second = [sys.argv[2]] + +print 'running: ', first +S0 = subprocess.check_output(first, stderr=subprocess.STDOUT) +print 'running: ', second +S1 = subprocess.check_output(second, stderr=subprocess.STDOUT) print 'comparing' if S0 != S1: sys.exit(1) diff --git a/tests/gtest/include/gtest/internal/gtest-port-arch.h b/tests/gtest/include/gtest/internal/gtest-port-arch.h index 74ab94905..83022c82c 100644 --- a/tests/gtest/include/gtest/internal/gtest-port-arch.h +++ b/tests/gtest/include/gtest/internal/gtest-port-arch.h @@ -88,6 +88,8 @@ # define GTEST_OS_OPENBSD 1 #elif defined __QNX__ # define GTEST_OS_QNX 1 +#elif defined(__NetBSD__) +# define GTEST_OS_NETBSD 1 #endif // __CYGWIN__ #endif // GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_ARCH_H_ diff --git a/tests/gtest/include/gtest/internal/gtest-port.h b/tests/gtest/include/gtest/internal/gtest-port.h index cb0639b4b..2896dfe64 100644 --- a/tests/gtest/include/gtest/internal/gtest-port.h +++ b/tests/gtest/include/gtest/internal/gtest-port.h @@ -790,7 +790,8 @@ using ::std::tuple_size; (GTEST_OS_MAC && !GTEST_OS_IOS) || \ (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \ GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \ - GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD) + GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || \ + GTEST_OS_NETBSD) # define GTEST_HAS_DEATH_TEST 1 #endif |