Skip to content

Commit c5d0931

Browse files
rickrick
rick
authored and
rick
committed
add meson introspection parallel example
1 parent 0d704b0 commit c5d0931

27 files changed

+1106
-234
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ subprojects/*/
1212
screenshot.bmp
1313
tmp
1414
.vscode/
15+
test.tar
16+
deps-test/microui

.gitmodules

+9
Original file line numberDiff line numberDiff line change
@@ -397,3 +397,12 @@
397397
[submodule "submodules/catpath"]
398398
path = submodules/catpath
399399
url = https://github.com/WestleyR/catpath
400+
[submodule "submodules/str-truncate.c"]
401+
path = submodules/str-truncate.c
402+
url = https://github.com/stephenmathieson/str-truncate.c
403+
[submodule "submodules/path-normalize.c"]
404+
path = submodules/path-normalize.c
405+
url = https://github.com/stephenmathieson/path-normalize.c
406+
[submodule "submodules/rhash_md5.c"]
407+
path = submodules/rhash_md5.c
408+
url = https://github.com/pepaslabs/rhash_md5.c

Makefile

+7-14
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ TIDIED_FILES = deps*/*.c deps*/*.h term*/*.c term*/*.h ctable*/*.c ctable*/*.h *
2222
reproc-test/*.c reproc-test/*.h \
2323
list-test/*.c list-test/*.h \
2424
*-test/*.c *-test/*.h \
25+
intro*/*.c intro*/*.h \
2526
########################################################
2627
TRIGGER_FILE=.trigger.c
2728
##############################################################
@@ -39,10 +40,8 @@ uncrustify:
3940
@$(UNCRUSTIFY) -c etc/uncrustify.cfg --replace $(TIDIED_FILES)||true
4041
uncrustify-clean:
4142
@find . -type f -maxdepth 2 -name "*unc-back*"|xargs -I % unlink %
42-
4343
clean:
4444
@rm -rf build .cache
45-
4645
fix-dbg:
4746
@$(SED) 's|, % c);|, %c);|g' -i $(TIDIED_FILES)
4847
@$(SED) 's|, % u);|, %u);|g' -i $(TIDIED_FILES)
@@ -53,9 +52,9 @@ fix-dbg:
5352
do-meson:
5453
@eval cd . && { meson build || { meson build --reconfigure || { meson build --wipe; } && meson build; }; echo MESON OK; }
5554
do-ninja:
56-
@eval cd . && { ninja -C build; echo NINJA OK; }
55+
@ninja -C build
5756
do-ninja-test:
58-
@eval cd . && { passh ninja test -C build -v; echo NINJA TEST OK; }
57+
@passh ninja test -C build -v
5958
do-deps-test:
6059
@passh ./build/deps-test/deps-test -v
6160
do-sync:
@@ -77,16 +76,15 @@ do-nodemon:
7776
-w "chan-test/*.c" -w "chan-test/*.h" \
7877
-w "reproc-test/*.c" -w "reproc-test/*.h" \
7978
-w "*-test/*.c" -w "*-test/*.h" \
79+
-w "*/*.c" -w "*/*.h" \
8080
-w "introspect-test/*.c" -w "introspect-test/*.h" \
8181
-w "introspect/*.c" -w "introspect/*.h" \
8282
-w "term-tests-test" \
8383
-e Makefile,tpl,build,sh,c,h,Makefile \
84-
-x env -- bash -xc 'make'
85-
84+
-x env -- bash -c 'make||true'
8685
tests-log:
8786
@rm .test*.log 2>/dev/null||true
8887
@./build/deps-test/deps-test -l | tee $(TESTS_LIST_LOG_FILE) >/dev/null
89-
9088
tests-tests: tests-log
9189
@grep -v "^* Suite .*:" $(TESTS_LIST_LOG_FILE)\
9290
|cut -d: -f1|cut -d ' ' -f3|sort -u | tee $(TESTS_TESTS_LOG_FILE) >/dev/null
@@ -106,20 +104,16 @@ do-encode-tests: do-build do-tests tests-clean
106104
do-tests: tests-log tests-suite-tests tests-suites
107105
@rm .tests.json 2>/dev/null||true
108106
@./scripts/tests-encoder.sh > .tests.json && clear && jq -c < .tests.json
109-
110107
git-submodules-pull:
111108
@git submodule foreach git pull origin master --jobs=10
112-
113109
git-submodules-update:
114110
@git submodule update --init
115-
# --recursive
116-
117111
git-pull:
118112
@git pull --recurse-submodules
119-
120113
do-uncrustify: uncrustify uncrustify-clean fix-dbg
121114
do-build: do-meson do-ninja
122-
do-test: do-ninja-test do-deps-test
115+
do-test: do-ninja-test
116+
deps-test: do-deps-test
123117
test: do-test
124118
build: do-meson do-build
125119
ansi: all do-sync do-ansi-make
@@ -135,6 +129,5 @@ trigger:
135129
@touch $(TRIGGER_FILE)
136130
meson-introspect-targets:
137131
@meson introspect --targets -i meson.build
138-
139132
meson-binaries:
140133
@meson introspect --targets meson.build -i | jq 'map(select(.type == "executable").filename)|flatten|join("\n")' -Mrc

cgif-test/meson.build

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ cgif_test_deps = [
99
]
1010

1111
if get_option('enable-binaries')
12-
cgif_test_exec = executable('cgif-test',
13-
cgif_test_srcs,
14-
dependencies: cgif_test_deps,
15-
include_directories: cgif_test_inc,
16-
)
12+
# cgif_test_exec = executable('cgif-test',
13+
# cgif_test_srcs,
14+
# dependencies: cgif_test_deps,
15+
# include_directories: cgif_test_inc,
16+
#)
1717
if get_option('enable-binary-tests')
18-
test('cgif-test', cgif_test_exec, args: ['--test'])
18+
# test('cgif-test', cgif_test_exec, args: ['--test'])
1919
endif
2020
endif

chan-test/chan-test.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ typedef struct WORKER_T {
2323
#define E log_error
2424
#define DISPATCHED_JOBS_QTY 10
2525
#define JOBS_BUFFER_QTY 5
26-
#define WORKER_SLEEP_MS 50
26+
#define WORKER_SLEEP_MS 5
2727
//////////////////////////////////////////////////////////////////////////
2828
#define CREATE_JOBS_SUITE( \
2929
SUITE_NAME, \
@@ -49,8 +49,8 @@ typedef struct WORKER_T {
4949
PASS(); \
5050
} \
5151
//////////////////////////////////////////////////////////////////////////
52-
#define CREATE_JOBS_SUITES() \
53-
CREATE_JOBS_SUITE(s_chan_jobs, 100, 3, 100, 500) \
52+
#define CREATE_JOBS_SUITES() \
53+
CREATE_JOBS_SUITE(s_chan_jobs, 1, 3, 5, 10) \
5454
//////////////////////////////////////////////////////////////////////////
5555
#define RUN_TEST_SUITES() { do { \
5656
RUN_SUITE(s_chan_jobs); \

dbgp-test/meson.build

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ dbgp_test_dbgp = [
2121
]
2222

2323
if get_option('enable-binaries')
24-
dbgp_test_exec = executable('dbgp-test',
25-
dbgp_test_srcs,
26-
dependencies: dbgp_test_dbgp,
27-
include_directories: dbgp_include_dirs,
28-
)
24+
# dbgp_test_exec = executable('dbgp-test',
25+
# dbgp_test_srcs,
26+
# dependencies: dbgp_test_dbgp,
27+
# include_directories: dbgp_include_dirs,
28+
#)
2929
if get_option('enable-binary-tests')
30-
test('dbgp-test', dbgp_test_exec, args: [])
30+
# test('dbgp-test', dbgp_test_exec, args: [])
3131
endif
3232
endif

0 commit comments

Comments
 (0)