Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1] gitlab-ci: integration testting connectors
@ 2020-05-21 15:29 Oleg Piskunov
  2020-05-21 16:09 ` Sergey Bronnikov
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Piskunov @ 2020-05-21 15:29 UTC (permalink / raw)
  To: tarantool-patches; +Cc: Alexander Turenko

[-- Attachment #1: Type: text/plain, Size: 5816 bytes --]



- Adding new stage "integration_test" for integration
  testing connectors and modules with Tarantool.
- Adding testing connectors in Tarantool
  development cycle:
  - tarantool-python
  - asynctnt-python
  - tarantool-php
  - tarantool-java
  - tarantool-go
  - viciious-go
 
Closes #4856
---
 
Github:  https://github.com/tarantool/tarantool/tree/opiskunov/gh-4856-integration-test-connectors
Issue:  https://github.com/tarantool/tarantool/issues/4856

 .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++
 .travis.mk     | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 95 insertions(+), 1 deletion(-)
 
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 256b368..3ab0103 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
 stages:
   - test
+  - integration_test
   - perf
   - cleanup
 
@@ -183,6 +184,46 @@ freebsd_12_release:
   script:
     - ${GITLAB_MAKE} vms_test_freebsd
 
+# ###################
+# Integration testing
+# ###################
+
+release_connector_python_asynctnt_test:
+  <<: *docker_test_definition
+  stage: integration_test
+  script:
+    - ${GITLAB_MAKE} test_connector_python_asynctnt
+
+release_connector_python_tarantool_test:
+  <<: *docker_test_definition
+  stage: integration_test
+  script:
+    - ${GITLAB_MAKE} test_connector_python_tarantool
+
+release_connector_go_tarantool_test:
+  <<: *docker_test_definition
+  stage: integration_test
+  script:
+    - ${GITLAB_MAKE} test_connector_go_tarantool
+
+release_connector_go_viciious_test:
+  <<: *docker_test_definition
+  stage: integration_test
+  script:
+    - ${GITLAB_MAKE} test_connector_go_viciious
+
+release_connector_php_tarantool_test:
+  <<: *docker_test_definition
+  stage: integration_test
+  script:
+    - ${GITLAB_MAKE} test_connector_php_tarantool
+
+release_connector_java_tarantool_test:
+  <<: *docker_test_definition
+  stage: integration_test
+  script:
+    - ${GITLAB_MAKE} test_connector_java_tarantool
+
 # ####
 # Perf
 # ####
diff --git a/.travis.mk b/.travis.mk
index 063537f..024351e 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -77,7 +77,7 @@ deps_buster_clang_8: deps_debian
 # Release
 
 build_debian:
-       cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
+       cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON -DENABLE_DIST=ON ${CMAKE_EXTRA_PARAMS}
        make -j
 
 test_debian_no_deps: build_debian
@@ -87,6 +87,59 @@ test_debian: deps_debian test_debian_no_deps
 
 test_debian_clang8: deps_debian deps_buster_clang_8 test_debian_no_deps
 
+# Integration testing
+
+test_connector_python_asynctnt: build_debian
+       make install
+       apt-get install -y python3-pip python3-dev pandoc python3-setuptools
+       git clone --depth=1  --recurse-submodules https://github.com/igorcoding/asynctnt.git asynctnt-python
+       cd asynctnt-python && pip3 install -r requirements.txt && export PYTHON=python3 \
+               && make && pip3 install -e . && make quicktest
+
+test_connector_python_tarantool: build_debian
+       make install
+       git clone --depth=1 https://github.com/tarantool/tarantool-python.git tarantool-python
+       cd tarantool-python && pip install -r requirements.txt && python setup.py install \
+               && python setup.py test
+
+test_connector_go_tarantool: build_debian
+       make install
+       wget --progress=dot:mega https://dl.google.com/go/go1.10.linux-amd64.tar.gz
+       tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
+       chmod -R a+rwx /usr/local/go
+       export PATH=/usr/local/go/bin:$$PATH && export GOPATH=/usr/local/go/go-tarantool \
+               && go get github.com/tarantool/go-tarantool \
+               && cd /usr/local/go/go-tarantool/src/github.com/tarantool/go-tarantool \
+               && mkdir snap xlog && (tarantool config.lua &) && go test -v .
+
+test_connector_go_viciious: build_debian
+       make install
+       wget --progress=dot:mega https://dl.google.com/go/go1.10.linux-amd64.tar.gz
+       tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
+       chmod -R a+rwx /usr/local/go
+       export PATH=/usr/local/go/bin:$$PATH && export GOPATH=/usr/local/go/go-tarantool \
+               && export GOBIN=$$GOPATH/bin && go get github.com/viciious/go-tarantool \
+               && cd /usr/local/go/go-tarantool/src/github.com/viciious/go-tarantool \
+               && mkdir log && export TNT_LOG_DIR=`pwd`/log && go test -v .
+
+test_connector_php_tarantool: build_debian
+       make install
+       apt-get update && apt-get install -y lsb-release
+       wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
+       echo "deb https://packages.sury.org/php/ $$(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
+       apt-get update && apt-get install -y php7.4 php7.4-dev php7.4-xml
+       curl -SsLf -o /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-9.phar
+       chmod a+x /usr/local/bin/phpunit
+       git clone --depth=1 https://github.com/tarantool/tarantool-php.git --branch=php7-v2 tarantool-php
+       cd tarantool-php && phpize && ./configure \
+               && make && make install && /usr/bin/python test-run.py
+
+test_connector_java_tarantool: build_debian
+       make install
+       apt-get update && apt-get install -y openjdk-8-jre openjdk-8-jdk
+       git clone --depth=1 https://github.com/tarantool/tarantool-java.git tarantool-java
+       cd tarantool-java && ./mvnw clean test && ./mvnw clean verify
+
 # Debug with coverage
 
 build_coverage_debian:
--
1.8.3.1
 

[-- Attachment #2: Type: text/html, Size: 7888 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH v1] gitlab-ci: integration testting connectors
  2020-05-21 15:29 [Tarantool-patches] [PATCH v1] gitlab-ci: integration testting connectors Oleg Piskunov
@ 2020-05-21 16:09 ` Sergey Bronnikov
  2020-05-26  9:58   ` Oleg Piskunov
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Bronnikov @ 2020-05-21 16:09 UTC (permalink / raw)
  To: Oleg Piskunov; +Cc: tarantool-patches, Alexander Turenko

Hi, Oleg

Thanks for the patch! See my coments inline.

On 18:29 Thu 21 May , Oleg Piskunov wrote:
> 
> 
> - Adding new stage "integration_test" for integration
>   testing connectors and modules with Tarantool.
> - Adding testing connectors in Tarantool
>   development cycle:
>   - tarantool-python
>   - asynctnt-python
>   - tarantool-php
>   - tarantool-java
>   - tarantool-go
>   - viciious-go
>  
> Closes #4856
> ---
>  
> Github:  https://github.com/tarantool/tarantool/tree/opiskunov/gh-4856-integration-test-connectors
> Issue:  https://github.com/tarantool/tarantool/issues/4856
> 
>  .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++
>  .travis.mk     | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 95 insertions(+), 1 deletion(-)
>  
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 256b368..3ab0103 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -1,5 +1,6 @@
>  stages:
>    - test
> +  - integration_test
>    - perf
>    - cleanup
>  
> @@ -183,6 +184,46 @@ freebsd_12_release:
>    script:
>      - ${GITLAB_MAKE} vms_test_freebsd
>  
> +# ###################
> +# Integration testing
> +# ###################
> +
> +release_connector_python_asynctnt_test:
> +  <<: *docker_test_definition
> +  stage: integration_test
> +  script:
> +    - ${GITLAB_MAKE} test_connector_python_asynctnt
> +
> +release_connector_python_tarantool_test:
> +  <<: *docker_test_definition
> +  stage: integration_test
> +  script:
> +    - ${GITLAB_MAKE} test_connector_python_tarantool
> +
> +release_connector_go_tarantool_test:
> +  <<: *docker_test_definition
> +  stage: integration_test
> +  script:
> +    - ${GITLAB_MAKE} test_connector_go_tarantool
> +
> +release_connector_go_viciious_test:
> +  <<: *docker_test_definition
> +  stage: integration_test
> +  script:
> +    - ${GITLAB_MAKE} test_connector_go_viciious
> +
> +release_connector_php_tarantool_test:
> +  <<: *docker_test_definition
> +  stage: integration_test
> +  script:
> +    - ${GITLAB_MAKE} test_connector_php_tarantool
> +
> +release_connector_java_tarantool_test:
> +  <<: *docker_test_definition
> +  stage: integration_test
> +  script:
> +    - ${GITLAB_MAKE} test_connector_java_tarantool
> +
>  # ####
>  # Perf
>  # ####
> diff --git a/.travis.mk b/.travis.mk
> index 063537f..024351e 100644
> --- a/.travis.mk
> +++ b/.travis.mk
> @@ -77,7 +77,7 @@ deps_buster_clang_8: deps_debian
>  # Release
>  
>  build_debian:
> -       cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
> +       cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON -DENABLE_DIST=ON ${CMAKE_EXTRA_PARAMS}

Why do we need ENABLE_WERROR here?

>         make -j
>  
>  test_debian_no_deps: build_debian
> @@ -87,6 +87,59 @@ test_debian: deps_debian test_debian_no_deps
>  
>  test_debian_clang8: deps_debian deps_buster_clang_8 test_debian_no_deps
>  
> +# Integration testing
> +
> +test_connector_python_asynctnt: build_debian
> +       make install

Let's create a separate target for tarantool installation and add it to
dependence. Same for targets below.

> +       apt-get install -y python3-pip python3-dev pandoc python3-setuptools
> +       git clone --depth=1  --recurse-submodules https://github.com/igorcoding/asynctnt.git asynctnt-python
> +       cd asynctnt-python && pip3 install -r requirements.txt && export PYTHON=python3 \
> +               && make && pip3 install -e . && make quicktest
> +
> +test_connector_python_tarantool: build_debian
> +       make install
> +       git clone --depth=1 https://github.com/tarantool/tarantool-python.git tarantool-python
> +       cd tarantool-python && pip install -r requirements.txt && python setup.py install \
> +               && python setup.py test
> +
> +test_connector_go_tarantool: build_debian
> +       make install
> +       wget --progress=dot:mega https://dl.google.com/go/go1.10.linux-amd64.tar.gz
> +       tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
> +       chmod -R a+rwx /usr/local/go
> +       export PATH=/usr/local/go/bin:$$PATH && export GOPATH=/usr/local/go/go-tarantool \
> +               && go get github.com/tarantool/go-tarantool \
> +               && cd /usr/local/go/go-tarantool/src/github.com/tarantool/go-tarantool \
> +               && mkdir snap xlog && (tarantool config.lua &) && go test -v .
> +
> +test_connector_go_viciious: build_debian
> +       make install
> +       wget --progress=dot:mega https://dl.google.com/go/go1.10.linux-amd64.tar.gz
> +       tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
> +       chmod -R a+rwx /usr/local/go
> +       export PATH=/usr/local/go/bin:$$PATH && export GOPATH=/usr/local/go/go-tarantool \
> +               && export GOBIN=$$GOPATH/bin && go get github.com/viciious/go-tarantool \
> +               && cd /usr/local/go/go-tarantool/src/github.com/viciious/go-tarantool \
> +               && mkdir log && export TNT_LOG_DIR=`pwd`/log && go test -v .
> +
> +test_connector_php_tarantool: build_debian
> +       make install
> +       apt-get update && apt-get install -y lsb-release
> +       wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
> +       echo "deb https://packages.sury.org/php/ $$(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
> +       apt-get update && apt-get install -y php7.4 php7.4-dev php7.4-xml
> +       curl -SsLf -o /usr/local/bin/phpunit https://phar.phpunit.de/phpunit-9.phar
> +       chmod a+x /usr/local/bin/phpunit
> +       git clone --depth=1 https://github.com/tarantool/tarantool-php.git --branch=php7-v2 tarantool-php
> +       cd tarantool-php && phpize && ./configure \
> +               && make && make install && /usr/bin/python test-run.py
> +
> +test_connector_java_tarantool: build_debian
> +       make install
> +       apt-get update && apt-get install -y openjdk-8-jre openjdk-8-jdk
> +       git clone --depth=1 https://github.com/tarantool/tarantool-java.git tarantool-java
> +       cd tarantool-java && ./mvnw clean test && ./mvnw clean verify

The same question as for vshard - why should we test tarantool against
unreleased versions of connectors?

> +
>  # Debug with coverage
>  
>  build_coverage_debian:
> --
> 1.8.3.1
>  

-- 
sergeyb@

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH v1] gitlab-ci: integration testting connectors
  2020-05-21 16:09 ` Sergey Bronnikov
@ 2020-05-26  9:58   ` Oleg Piskunov
  0 siblings, 0 replies; 3+ messages in thread
From: Oleg Piskunov @ 2020-05-26  9:58 UTC (permalink / raw)
  To: Sergey Bronnikov; +Cc: tarantool-patches, Alexander Turenko

[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]


Sergey,
 
Thanks for the review.
I comented your suggestion below and applied changes into branch
https://github.com/tarantool/tarantool/tree/opiskunov/gh-4856-integration-test-connectors
I don’t send new patch cause, as we agreed, need to use test-run for testing connectors. 
  
>Четверг, 21 мая 2020, 19:10 +03:00 от Sergey Bronnikov <sergeyb@tarantool.org>:
> 
>Hi, Oleg
>
>Thanks for the patch! See my coments inline.
>
>>  # Release
>>  
>>  build_debian:
>> -       cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS}
>> +       cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON -DENABLE_DIST=ON ${CMAKE_EXTRA_PARAMS}
>
>Why do we need ENABLE_WERROR here?
I didn’t add ENABLE_WERROR here — it comes from release build. I have added DENABLE_DIST=ON, and we already discussed it in «vshard» thread.
>> +# Integration testing
>> +
>> +test_connector_python_asynctnt: build_debian
>> +       make install
>
>Let's create a separate target for tarantool installation and add it to
>dependence. Same for targets below.
Sure. will do.
>The same question as for vshard - why should we test tarantool against
>unreleased versions of connectors?
I have changed connectors version to the latest released:
 
 java ( https://github.com/tarantool/tarantool-java ) — tag: connector-1.9.4
 python ( https://github.com/tarantool/tarantool-python ) — tag: 0.6.6
 python ( https://github.com/igorcoding/asynctnt ) — tag: v1.2
 golang ( https://github.com/tarantool/go-tarantool ) — tag: v1.5
 golang ( https://github.com/viciious/go-tarantool ) — tag: v1.0
 php ( https://github.com/tarantool/tarantool-php ) — branch: php7-v2
 
--
Oleg Piskunov
 

[-- Attachment #2: Type: text/html, Size: 3386 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-26  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 15:29 [Tarantool-patches] [PATCH v1] gitlab-ci: integration testting connectors Oleg Piskunov
2020-05-21 16:09 ` Sergey Bronnikov
2020-05-26  9:58   ` Oleg Piskunov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox