diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index dff8f9e5..92c22c81 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -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} diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 00000000..d6a853a6 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,2 @@ +**/bin/ +**/lib/ diff --git a/test/simulator/Makefile b/test/simulator/Makefile index fbba1c2d..3e33f767 100644 --- a/test/simulator/Makefile +++ b/test/simulator/Makefile @@ -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