fix: testsuite
This commit is contained in:
parent
a3998358ea
commit
de9173a71f
3 changed files with 18 additions and 11 deletions
|
|
@ -24,10 +24,8 @@ bin_PROGRAMS = 42sh
|
||||||
|
|
||||||
# ================ TESTS ================
|
# ================ TESTS ================
|
||||||
|
|
||||||
check-local: $(bin_PROGRAMS) # $(check_PROGRAMS)
|
check:
|
||||||
./../tests/functional/run-tests.sh
|
../tests/wrap.sh # "$(COVERAGE)" "$(OUTPUT_FILE)"
|
||||||
|
|
||||||
#./testsuite
|
|
||||||
|
|
||||||
# ------------- Unit tests --------------
|
# ------------- Unit tests --------------
|
||||||
|
|
||||||
|
|
@ -45,13 +43,13 @@ testsuite_LDADD = $(42sh_LDADD) -lcriterion
|
||||||
|
|
||||||
# ------------- asan debug --------------
|
# ------------- asan debug --------------
|
||||||
|
|
||||||
check_PROGRAMS += debug
|
# check_PROGRAMS += debug
|
||||||
|
|
||||||
#debug_CFLAGS = $(42sh_CFLAGS)
|
#debug_CFLAGS = $(42sh_CFLAGS)
|
||||||
#debug_CFLAGS += -fsanitize=address -g
|
#debug_CFLAGS += -fsanitize=address -g
|
||||||
|
|
||||||
debug_SOURCES = $(42sh_SOURCES)
|
# debug_SOURCES = $(42sh_SOURCES)
|
||||||
|
#
|
||||||
debug_CPPFLAGS = $(42sh_CPPFLAGS)
|
# debug_CPPFLAGS = $(42sh_CPPFLAGS)
|
||||||
|
#
|
||||||
debug_LDADD = $(42sh_LDADD)
|
# debug_LDADD = $(42sh_LDADD)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
# Variables #
|
# Variables #
|
||||||
###################
|
###################
|
||||||
|
|
||||||
executable="../../src/42sh"
|
executable="$BIN_PATH"
|
||||||
ref_executable="dash"
|
ref_executable="dash"
|
||||||
|
|
||||||
tmp_script="/tmp/test_script.sh"
|
tmp_script="/tmp/test_script.sh"
|
||||||
|
|
@ -242,6 +242,9 @@ summarize() {
|
||||||
echo -e $BWhite "\n\n""===========" $UWhite"Summary"$Color_Off "\n"
|
echo -e $BWhite "\n\n""===========" $UWhite"Summary"$Color_Off "\n"
|
||||||
echo -e " Passed $coverage_color$passed_tests/$total_tests$Color_Off tests ($coverage_color$tests_percentage$Color_Off%)"
|
echo -e " Passed $coverage_color$passed_tests/$total_tests$Color_Off tests ($coverage_color$tests_percentage$Color_Off%)"
|
||||||
echo -e " Got $BRed$timeouts_count timeout(s)$Color_Off"
|
echo -e " Got $BRed$timeouts_count timeout(s)$Color_Off"
|
||||||
|
if [ "$OUTPUT_FILE" != "" ];
|
||||||
|
then echo $tests_percentage > "$OUTPUT_FILE";
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
tests/wrap.sh
Executable file
6
tests/wrap.sh
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
if [ "$COVERAGE" = "yes" ]; #coverage
|
||||||
|
then ./testsuite && ../tests/functional/run-tests.sh
|
||||||
|
else ../tests/functional/run-tests.sh
|
||||||
|
fi
|
||||||
|
echo bin path: "$BIN_PATH"
|
||||||
|
echo output file: "$OUTPUT_FILE"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue