Fix simulator tests, sort of.

They can be run individually, but if run all together the output will be
split up by build output. Unset VERBOSE to see the ouput more compactly.

Signed-off-by: Eric Paniagua <epaniagua@google.com>
epan/build/justlib
Eric Paniagua 4 years ago
parent 1c8503edbe
commit 3160dface7

@ -583,7 +583,6 @@ build_gtest_gmock() {
run_simulator_tests() {
(cd "${BOARD_HARDWARE_PATH}/keyboardio" && make prepare-virtual)
build_gtest_gmock
kaleidoscope_dir="$(dirname "$0")/.."
cd "${kaleidoscope_dir}/test/simulator"
${MAKE:-make}

2
test/.gitignore vendored

@ -0,0 +1,2 @@
**/bin/
**/lib/

@ -1,3 +1,5 @@
BIN_DIR=bin
LIB_DIR=lib
TEST_DIRS = $(dir $(wildcard */tests.h))
all: ${TEST_DIRS}
@ -11,7 +13,11 @@ Makefile: ${TEST_DIRS}
echo 'Unable to find tests file "$@/tests.h"'; \
else \
echo "Running test in $@"; \
env LOCAL_CFLAGS='-DTESTING_INCLUDE_FILE="$@/tests.h" "-I$(PWD)/$@"' VERBOSE=1 $(MAKE) -f delegate.mk; \
rm -rf "${BIN_DIR}" "${LIB_DIR}"; \
mkdir -p "${BIN_DIR}" "${LIB_DIR}"; \
env LIBONLY=yes LOCAL_CFLAGS='-DTESTING_INCLUDE_FILE="$@/tests.h" "-I$(PWD)/$@"' OUTPUT_PATH="${PWD}/${LIB_DIR}" VERBOSE=1 $(MAKE) -f delegate.mk; \
g++ -o "${BIN_DIR}/sketch" -lpthread -g -w -lm -lXtst -lX11 "${LIB_DIR}/sketch-latest.a"; \
"./${BIN_DIR}/sketch" -t; \
fi
.PHONY: FORCE

Loading…
Cancel
Save