From aed6e5980ee16d19a4fb84ba97cb7e782c0594cf Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Tue, 15 May 2018 19:22:14 +0900 Subject: multiInit is disabled if travis-ci and gcc --- .travis.yml | 2 +- Makefile | 3 +++ test/bls_c384_test.cpp | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3fad5ba..64fdf43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,5 +13,5 @@ script: - git clone --depth 1 https://github.com/herumi/bls.git - cd bls - make - - make test + - make test DISABLE_THREAD_TEST=1 - make test_go diff --git a/Makefile b/Makefile index e0dd399..1847b0b 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,9 @@ endif ifneq ($(MCL_MAX_BIT_SIZE),) CFLAGS+=-DMCL_MAX_BIT_SIZE=$(MCL_MAX_BIT_SIZE) endif +ifeq ($(DISABLE_THREAD_TEST),1) + CFLAGS+=-DDISABLE_THREAD_TEST +endif sample_test: $(EXE_DIR)/bls_smpl.exe python bls_smpl.py diff --git a/test/bls_c384_test.cpp b/test/bls_c384_test.cpp index b4a3acb..aa2d85e 100644 --- a/test/bls_c384_test.cpp +++ b/test/bls_c384_test.cpp @@ -72,6 +72,7 @@ void blsOrderTest(const char *curveOrder, const char *fieldOrder) CYBOZU_TEST_EQUAL(buf, fieldOrder); } +#if !(defined(DISABLE_THREAD_TEST) && defined(__GCC_IEC_559)) #if defined(CYBOZU_CPP_VERSION) && CYBOZU_CPP_VERSION >= CYBOZU_CPP_VERSION_CPP11 #include #include @@ -90,9 +91,10 @@ struct Thread { t.reset(new std::thread(func, p1, p2)); } }; + CYBOZU_TEST_AUTO(multipleInit) { - const size_t n = 10; + const size_t n = 100; { std::vector vt(n); for (size_t i = 0; i < n; i++) { @@ -111,6 +113,7 @@ CYBOZU_TEST_AUTO(multipleInit) #endif } #endif +#endif void blsSerializeTest() { -- cgit v1.2.3