Skip to content

Commit ec7b5c1

Browse files
committed
Run Qt5 client sample test
1 parent fabe021 commit ec7b5c1

File tree

5 files changed

+63
-0
lines changed

5 files changed

+63
-0
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ before_install:
9494
# - Rely on `kerl` for [pre-compiled versions available](https://docs.travis-ci.com/user/languages/erlang#Choosing-OTP-releases-to-test-against). Rely on installation path chosen by [`travis-erlang-builder`](https://github.com/travis-ci/travis-erlang-builder/blob/e6d016b1a91ca7ecac5a5a46395bde917ea13d36/bin/compile#L18).
9595
# - . ~/otp/18.2.1/activate && erl -version
9696
#- curl -f -L -o ./rebar3 https://s3.amazonaws.com/rebar3/rebar3 && chmod +x ./rebar3 && ./rebar3 version && export PATH="${TRAVIS_BUILD_DIR}:$PATH"
97+
# install Qt 5.10
98+
- sudo add-apt-repository --yes ppa:beineri/opt-qt-5.10.1-trusty
99+
- sudo apt-get update -qq
100+
- sudo apt-get install qt510-meta-minimal
101+
- source /opt/qt510/bin/qt510-env.sh
102+
- qmake -v
97103

98104
# show host table to confirm petstore.swagger.io is mapped to localhost
99105
- cat /etc/hosts

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,7 @@
10241024
<modules>
10251025
<!-- clients -->
10261026
<module>samples/client/petstore/c</module>
1027+
<module>samples/client/petstore/cpp-qt5</module>
10271028
<!--<module>samples/client/petstore/dart-jaguar/openapi</module>
10281029
<module>samples/client/petstore/dart-jaguar/flutter_petstore/openapi</module>-->
10291030
<!--<module>samples/client/petstore/dart2/petstore</module>-->
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
mkdir build
6+
cd build
7+
# project
8+
qmake ../PetStore/PetStore.pro
9+
10+
make
11+
12+
./PetStore
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<project>
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>org.openapitools</groupId>
4+
<artifactId>CppQt5PetstoreClientTests</artifactId>
5+
<packaging>pom</packaging>
6+
<version>1.0-SNAPSHOT</version>
7+
<name>Qt5 OpenAPI Petstore Client</name>
8+
<build>
9+
<plugins>
10+
<plugin>
11+
<artifactId>maven-dependency-plugin</artifactId>
12+
<executions>
13+
<execution>
14+
<phase>package</phase>
15+
<goals>
16+
<goal>copy-dependencies</goal>
17+
</goals>
18+
<configuration>
19+
<outputDirectory>${project.build.directory}</outputDirectory>
20+
</configuration>
21+
</execution>
22+
</executions>
23+
</plugin>
24+
<plugin>
25+
<groupId>org.codehaus.mojo</groupId>
26+
<artifactId>exec-maven-plugin</artifactId>
27+
<version>1.2.1</version>
28+
<executions>
29+
<execution>
30+
<id>pet-test</id>
31+
<phase>integration-test</phase>
32+
<goals>
33+
<goal>exec</goal>
34+
</goals>
35+
<configuration>
36+
<executable>./build-and-test.bash</executable>
37+
</configuration>
38+
</execution>
39+
</executions>
40+
</plugin>
41+
</plugins>
42+
</build>
43+
</project>

0 commit comments

Comments
 (0)