]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani-tests: include failing test in valgrind testing
[ocean] / csrc / oceani-tests.mdc
index 6bc40cba9004457b875c25935e34f84fe35ee5ba..fbc5a2f085e3af5f9ad2b2eaa4a928f24579e9fe 100644 (file)
@@ -35,6 +35,8 @@ arguments separated from the name by commas.  For each test, there is a section
 
        oceani_tests :=
        ## test list
+       oceani_valg_tests := $(oceani_tests)
+       ## combine test lists
 
        tests:: oceani_test_suite
        oceani_test_suite: oceani coverage_oceani
@@ -80,11 +82,11 @@ arguments separated from the name by commas.  For each test, there is a section
                @mv *.gcov coverage ; [ -f .gcov ] && mv .gcov coverage || true
                @rm -f .tmp*
 
-               @[ -n "$$SKIP_VALGRIND" ] || for T in $(oceani_tests); do \
+               @[ -n "$$SKIP_VALGRIND" ] || for T in $(oceani_valg_tests); do \
                    echo -n "Valgrind $$T.. "; \
                    i="$$IFS"; IFS=,; set $$T; IFS="$$i"; t=$$1; shift; \
-                   if ! valgrind --error-exitcode=1 --log-file=.tmp.valg ./oceani --section "test: $$t" oceani-tests.mdc $${1+"$$@"} \
-                        > /dev/null 2>&1 ; then \
+                   if valgrind --error-exitcode=42 --log-file=.tmp.valg ./oceani --section "test: $$t" oceani-tests.mdc $${1+"$$@"} \
+                        > /dev/null 2>&1 ; [ $$? -eq 42 ] ; then \
                       echo "FAILED"; cat .tmp.valg; exit 1; fi ; \
                    if grep 'LEAK SUMMARY' .tmp.valg > /dev/null; then \
                       echo "valgrind found LEAKS"; cat .tmp.valg ; exit 1 ; fi; \
@@ -713,6 +715,9 @@ separate file first, then run from there.
            ./coverage_oceani --section "test: $$t" oceani-tests.mdc > /dev/null 2>&1 ;\
        done || true
 
+###### combine test lists
+       oceani_valg_tests += $(oceani_failing_tests)
+
 ###### test list
        oceani_failing_tests := syn1
        oceani_failing_tests += tokerr