diff --git a/build/cmake/build.sh b/build/cmake/build.sh index 4b98e3e06a3..091da6761ac 100644 --- a/build/cmake/build.sh +++ b/build/cmake/build.sh @@ -168,6 +168,40 @@ deb() { return ${__res} } +test-fast() { + local __res=0 + for _ in 1 + do + ctest -j`nproc` + __res=$? + if [ ${__res} -ne 0 ] + then + break + fi + done + return ${__res} +} + +test() { + local __res=0 + for _ in 1 + do + build + __res=$? + if [ ${__res} -ne 0 ] + then + break + fi + test-fast + __res=$? + if [ ${__res} -ne 0 ] + then + break + fi + done + return ${__res} +} + main() { local __res=0 for _ in 1 @@ -219,6 +253,12 @@ main() { rpm deb ;; + test-fast) + test-fast + ;; + test) + test + ;; * ) echo "ERROR: Command not found ($command)" __res=1 diff --git a/build/cmake/docker-compose.yml b/build/cmake/docker-compose.yml index 3b97858a797..592a2bc327a 100644 --- a/build/cmake/docker-compose.yml +++ b/build/cmake/docker-compose.yml @@ -51,6 +51,15 @@ services: <<: *build-setup command: scl enable devtoolset-7 rh-ruby24 rh-python36 python27 -- bash ../src/build/cmake/build.sh package-fast + test-fast: &test-fast + <<: *build-setup + command: scl enable devtoolset-7 rh-ruby24 rh-python36 python27 -- bash ../src/build/cmake/build.sh test-fast + + test: &test + <<: *build-setup + command: scl enable devtoolset-7 rh-ruby24 rh-python36 python27 -- bash ../src/build/cmake/build.sh test + shell: <<: *build-setup command: scl enable devtoolset-7 rh-ruby24 rh-python36 python27 -- bash +