@@ -71,14 +71,29 @@ sub_rebuild() {
7171 docker-compose -f docker-compose.yml build --force-rm --no-cache cli
7272}
7373
74- # Build MetaCall Docker Compose with Sanitizer for testing (link manually dockerignore files)
74+ # Build MetaCall Docker Compose for testing (link manually dockerignore files)
7575sub_test () {
7676 # Disable BuildKit as workaround due to log limits (TODO: https://github.com/docker/buildx/issues/484)
7777 export DOCKER_BUILDKIT=0
7878
7979 ln -sf tools/deps/.dockerignore .dockerignore
8080 docker-compose -f docker-compose.yml -f docker-compose.test.yml build --force-rm deps
8181
82+ ln -sf tools/dev/.dockerignore .dockerignore
83+ docker-compose -f docker-compose.yml -f docker-compose.test.yml build --force-rm dev
84+ }
85+
86+ # Build MetaCall Docker Compose with Sanitizer for testing (link manually dockerignore files)
87+ sub_test_sanitizer () {
88+ # Disable BuildKit as workaround due to log limits (TODO: https://github.com/docker/buildx/issues/484)
89+ export DOCKER_BUILDKIT=0
90+
91+ # Enable build with sanitizer
92+ export METACALL_BUILD_SANITIZER=sanitizer
93+
94+ ln -sf tools/deps/.dockerignore .dockerignore
95+ docker-compose -f docker-compose.yml -f docker-compose.test.yml build --force-rm deps
96+
8297 ln -sf tools/dev/.dockerignore .dockerignore
8398 docker-compose -f docker-compose.yml -f docker-compose.test.yml build --force-rm dev | tee /tmp/metacall-test-output
8499
@@ -99,7 +114,7 @@ sub_test() {
99114
100115 if [ -z " ${BEGIN} " ] || [ -z " ${END} " ]; then
101116 echo " ERROR! CTest failed to print properly the output, run tests again:"
102- echo " Recompiling everything: docker rmi metacall/core:dev && ./docker-compose.sh test"
117+ echo " Recompiling everything: docker rmi metacall/core:dev && ./docker-compose.sh test-sanitizer "
103118 echo " Without recompiling (needs to be built successfully previously): docker run --rm -it metacall/core:dev sh -c \" cd build && ctest -j$( getconf _NPROCESSORS_ONLN) --output-on-failure\" "
104119 else
105120 BEGIN=$(( BEGIN + 1 ))
@@ -226,6 +241,7 @@ sub_help() {
226241 echo " build"
227242 echo " rebuild"
228243 echo " test"
244+ echo " test-sanitizer"
229245 echo " cache"
230246 echo " push"
231247 echo " pack"
@@ -245,6 +261,9 @@ case "$1" in
245261 test)
246262 sub_test
247263 ;;
264+ test-sanitizer)
265+ sub_test_sanitizer
266+ ;;
248267 cache)
249268 sub_cache
250269 ;;
0 commit comments