From 741258051e6f03d75e7b758af7ba4c1d84741baf Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 12 Aug 2019 12:58:10 -0700 Subject: [PATCH 1/5] this should work better --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 457210adc..a002fd7a5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,9 +14,10 @@ parallel 'centos7': { checkout scm stage('Build Centos 7') { - sh '''rm -rf build/ + sh '''scl enable devtoolset-8 -- bash + rm -rf build/ mkdir build && cd build - CC=clang CXX=clang++ cmake .. + cmake .. make -j4 ''' } From 0ead65ad2d91cbcf0925801f9773e9aa4936237a Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 12 Aug 2019 13:11:43 -0700 Subject: [PATCH 2/5] change this --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a002fd7a5..8ab797e0a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ parallel 'centos7': { checkout scm stage('Build Centos 7') { - sh '''scl enable devtoolset-8 -- bash + sh '''. /opt/rh/devtoolset-8/enable rm -rf build/ mkdir build && cd build cmake .. From 7d41d267a3da038e454930971f14f632b5984e12 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 12 Aug 2019 13:18:21 -0700 Subject: [PATCH 3/5] silencing warnings for code paths that will never be hit --- node/Identity.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/Identity.cpp b/node/Identity.cpp index 83800384e..f54d90e67 100644 --- a/node/Identity.cpp +++ b/node/Identity.cpp @@ -243,7 +243,7 @@ char *Identity::toString(bool includePrivate,char buf[ZT_IDENTITY_STRING_BUFFER_ } *p = (char)0; return buf; - } + } break; case P384: { char *p = buf; Utils::hex10(_address.toInt(),p); @@ -262,6 +262,7 @@ char *Identity::toString(bool includePrivate,char buf[ZT_IDENTITY_STRING_BUFFER_ return buf; } break; } + return nullptr; } bool Identity::fromString(const char *str) From c7d1eb71da0e085b89493cccc04ef9bfdd57cd67 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 12 Aug 2019 13:25:14 -0700 Subject: [PATCH 4/5] build & run selftest as part of jenkins --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f72081e8..4a9088011 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,3 +125,7 @@ endif(BUILD_CENTRAL_CONTROLLER) add_executable(${PROJECT_NAME} ${src} ${headers}) target_link_libraries(${PROJECT_NAME} ${libs}) + + +add_executable(zerotier-selftest selftest.cpp) +target_link_libraries(zerotier-selftest ${libs}) From b6eaec12785895fc5a5d62b179589c35b2bd710f Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 12 Aug 2019 13:26:34 -0700 Subject: [PATCH 5/5] run selftest --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8ab797e0a..455115cb4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,6 +19,7 @@ parallel 'centos7': { mkdir build && cd build cmake .. make -j4 + ./zerotier-selftest ''' } }