Skip to content

Commit ae2950e

Browse files
Merge pull request #419 from treefrogframework/upd_testcase
Update testcases
2 parents 1b8244f + 195dc4a commit ae2950e

File tree

10 files changed

+634
-30
lines changed

10 files changed

+634
-30
lines changed

.github/workflows/actions.yml

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ jobs:
5858
make -j4
5959
./tmaketest.sh
6060
- name: releasetest
61-
working-directory: tools/test/releasetest
61+
working-directory: tools/test
6262
run: |
63-
./releasetest
63+
./testall.sh
6464
6565
build-ubuntu-sharedlink:
6666
runs-on: ubuntu-24.04
@@ -113,9 +113,9 @@ jobs:
113113
make -j4
114114
./tmaketest.sh
115115
- name: releasetest
116-
working-directory: tools/test/releasetest
116+
working-directory: tools/test
117117
run: |
118-
./releasetest
118+
./testall.sh
119119
120120
build-ubuntu22:
121121
runs-on: ubuntu-22.04
@@ -168,9 +168,9 @@ jobs:
168168
make -j4
169169
./tmaketest.sh
170170
- name: releasetest
171-
working-directory: tools/test/releasetest
171+
working-directory: tools/test
172172
run: |
173-
./releasetest
173+
./testall.sh
174174
175175
build-macos:
176176
runs-on: macos-latest
@@ -218,9 +218,9 @@ jobs:
218218
run: |
219219
./testall.sh
220220
- name: releasetest
221-
working-directory: tools/test/releasetest
221+
working-directory: tools/test
222222
run: |
223-
./releasetest
223+
./testall.sh
224224
225225
build-macos-sharedlink:
226226
runs-on: macos-latest
@@ -229,9 +229,10 @@ jobs:
229229
- name: Homebrew
230230
run: |
231231
which pkg-config || brew install pkg-config
232-
brew install qt6 jq mongo-c-driver gflags glog lz4 yarn
232+
brew install qt6 jq mongo-c-driver@1 gflags glog lz4 yarn
233233
- name: configure for debug
234234
run: |
235+
export PKG_CONFIG_PATH=$(echo "$(find -L "$(brew --prefix)/opt" -type d \( -path "*/lib/pkgconfig" -o -path "*/share/pkgconfig" \) 2>/dev/null)" | sort -u | paste -sd ":" -):$PKG_CONFIG_PATH
235236
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4 --enable-debug
236237
- name: build for debug
237238
run: |
@@ -241,6 +242,7 @@ jobs:
241242
sudo make -C tools install
242243
- name: configure
243244
run: |
245+
export PKG_CONFIG_PATH=$(echo "$(find -L "$(brew --prefix)/opt" -type d \( -path "*/lib/pkgconfig" -o -path "*/share/pkgconfig" \) 2>/dev/null)" | sort -u | paste -sd ":" -):$PKG_CONFIG_PATH
244246
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4
245247
- name: build
246248
run: |
@@ -262,9 +264,9 @@ jobs:
262264
run: |
263265
./testall.sh
264266
- name: releasetest
265-
working-directory: tools/test/releasetest
267+
working-directory: tools/test
266268
run: |
267-
./releasetest
269+
./testall.sh
268270
269271
build-macos14:
270272
runs-on: macos-14
@@ -273,9 +275,10 @@ jobs:
273275
- name: Homebrew
274276
run: |
275277
which pkg-config || brew install pkg-config
276-
brew install qt6 jq mongo-c-driver gflags glog lz4 yarn
278+
brew install qt6 jq mongo-c-driver@1 gflags glog lz4 yarn
277279
- name: configure for debug
278280
run: |
281+
export PKG_CONFIG_PATH=$(echo "$(find -L "$(brew --prefix)/opt" -type d \( -path "*/lib/pkgconfig" -o -path "*/share/pkgconfig" \) 2>/dev/null)" | sort -u | paste -sd ":" -):$PKG_CONFIG_PATH
279282
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4 --enable-debug
280283
- name: build for debug
281284
run: |
@@ -285,6 +288,7 @@ jobs:
285288
sudo make -C tools install
286289
- name: configure
287290
run: |
291+
export PKG_CONFIG_PATH=$(echo "$(find -L "$(brew --prefix)/opt" -type d \( -path "*/lib/pkgconfig" -o -path "*/share/pkgconfig" \) 2>/dev/null)" | sort -u | paste -sd ":" -):$PKG_CONFIG_PATH
288292
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4
289293
- name: build
290294
run: |
@@ -306,9 +310,9 @@ jobs:
306310
run: |
307311
./testall.sh
308312
- name: releasetest
309-
working-directory: tools/test/releasetest
313+
working-directory: tools/test
310314
run: |
311-
./releasetest
315+
./testall.sh
312316
313317
build-macos13:
314318
runs-on: macos-13
@@ -317,9 +321,10 @@ jobs:
317321
- name: Homebrew
318322
run: |
319323
which pkg-config || brew install pkg-config
320-
brew install qt6 jq mongo-c-driver gflags glog lz4 yarn
324+
brew install qt6 jq mongo-c-driver@1 gflags glog lz4 yarn
321325
- name: configure for debug
322326
run: |
327+
export PKG_CONFIG_PATH=$(echo "$(find -L "$(brew --prefix)/opt" -type d \( -path "*/lib/pkgconfig" -o -path "*/share/pkgconfig" \) 2>/dev/null)" | sort -u | paste -sd ":" -):$PKG_CONFIG_PATH
323328
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4 --enable-debug
324329
- name: build for debug
325330
run: |
@@ -329,6 +334,7 @@ jobs:
329334
sudo make -C tools install
330335
- name: configure
331336
run: |
337+
export PKG_CONFIG_PATH=$(echo "$(find -L "$(brew --prefix)/opt" -type d \( -path "*/lib/pkgconfig" -o -path "*/share/pkgconfig" \) 2>/dev/null)" | sort -u | paste -sd ":" -):$PKG_CONFIG_PATH
332338
./configure --prefix=/usr/local --enable-shared-mongoc --enable-shared-glog --enable-shared-lz4
333339
- name: build
334340
run: |
@@ -350,9 +356,9 @@ jobs:
350356
run: |
351357
./testall.sh
352358
- name: releasetest
353-
working-directory: tools/test/releasetest
359+
working-directory: tools/test
354360
run: |
355-
./releasetest
361+
./testall.sh
356362
357363
build-windows-qt68-msvc2022:
358364
runs-on: windows-latest
@@ -405,9 +411,10 @@ jobs:
405411
nmake
406412
nmake install
407413
- name: Release test
408-
working-directory: tools\test\releasetest
414+
shell: cmd
415+
working-directory: tools\test
409416
run: |
410-
.\releasetest.bat
417+
testall.bat
411418
412419
build-windows-qt68-msvc2019:
413420
runs-on: windows-latest
@@ -457,9 +464,10 @@ jobs:
457464
nmake
458465
nmake install
459466
- name: Release test
460-
working-directory: tools\test\releasetest
467+
shell: cmd
468+
working-directory: tools\test
461469
run: |
462-
.\releasetest.bat
470+
testall.bat
463471
464472
build-windows-qt65-msvc2019:
465473
runs-on: windows-latest
@@ -510,6 +518,7 @@ jobs:
510518
nmake
511519
nmake install
512520
- name: Release test
513-
working-directory: tools\test\releasetest
521+
shell: cmd
522+
working-directory: tools\test
514523
run: |
515-
.\releasetest.bat
524+
testall.bat

include/headers.pri

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ HEADER_FILES += tjsinstance.h
199199
HEADER_FILES += treactcomponent.h
200200
HEADER_FILES += tmemcached.h
201201
HEADER_FILES += tmemcacheddriver.h
202+
HEADER_FILES += tsystemlogger.h
202203
HEADER_FILES += tstdoutsystemlogger.h
203204
HEADER_FILES += tstderrsystemlogger.h
204205

src/tcommandlineinterface.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
public: \
1919
Thread() : TActionThread(0), returnCode(0) { } \
2020
volatile int returnCode; \
21-
\
2221
protected: \
2322
virtual void run() \
2423
{ \

src/tftest.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
public: \
2828
Thread() : TActionThread(0), returnCode(0) { } \
2929
volatile int returnCode; \
30-
\
3130
protected: \
3231
virtual void run() \
3332
{ \
@@ -56,7 +55,6 @@
5655
Thread thread; \
5756
thread.start(); \
5857
thread.wait(); \
59-
_exit(thread.returnCode); \
6058
return thread.returnCode; \
6159
}
6260

tools/test/hmac/hmac.pro

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
TARGET = hmac
2+
CONFIG += console testcase
3+
CONFIG -= app_bundle
4+
QT += network sql qml testlib
5+
QT -= gui
6+
DEFINES += TF_DLL
7+
8+
CONFIG += c++20
9+
windows:QMAKE_CXXFLAGS += /Zc:__cplusplus /std:c++20
10+
11+
windows {
12+
INCLUDEPATH += $$quote($$(TFDIR)\\include)
13+
LIBS += -L$$quote($$(TFDIR)\\bin)
14+
CONFIG(debug, debug|release) {
15+
LIBS += -ltreefrogd2
16+
} else {
17+
LIBS += -ltreefrog2
18+
}
19+
} else {
20+
unix:LIBS += -Wl,-rpath,. -Wl,-rpath,/usr/lib -L/usr/lib -ltreefrog
21+
unix:INCLUDEPATH += /usr/include/treefrog
22+
linux-*:LIBS += -lrt
23+
}
24+
25+
SOURCES = main.cpp

0 commit comments

Comments
 (0)