From f0ad502e4651243d6a96194b3393bd460c0f7fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 19 Nov 2017 21:23:04 +0100 Subject: Another huge pile of work for about two months Well I should commit every change instead of this madness. I am not documenting changes as all this is just improvements and implementation progression. --- tests/machine-unit-tests/Makefile | 5 +++++ tests/machine-unit-tests/data.S | 6 ++++++ tests/machine-unit-tests/test.sh | 2 ++ tests/t-registers/Makefile | 5 +++++ tests/test.sh | 5 +++-- 5 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 tests/machine-unit-tests/Makefile create mode 100644 tests/machine-unit-tests/data.S create mode 100644 tests/t-registers/Makefile (limited to 'tests') diff --git a/tests/machine-unit-tests/Makefile b/tests/machine-unit-tests/Makefile new file mode 100644 index 0000000..18f7932 --- /dev/null +++ b/tests/machine-unit-tests/Makefile @@ -0,0 +1,5 @@ +include ../test.mk + +SRC_data = data.S + +$(eval $(call MIPS_ELF,data)) diff --git a/tests/machine-unit-tests/data.S b/tests/machine-unit-tests/data.S new file mode 100644 index 0000000..d61d81d --- /dev/null +++ b/tests/machine-unit-tests/data.S @@ -0,0 +1,6 @@ +.text +.globl _start + +_start: + addi $1, $0, 6 + j _start diff --git a/tests/machine-unit-tests/test.sh b/tests/machine-unit-tests/test.sh index 2f06965..8378eff 100755 --- a/tests/machine-unit-tests/test.sh +++ b/tests/machine-unit-tests/test.sh @@ -9,5 +9,7 @@ qtmips_make sub-qtmips_machine-tests # Build test data mips_make_test +cd "$TEST_DIR" + # Run unit tests qtmips_run qtmips_machine/tests/tst_machine || echo_fail "Test $TEST_NAME failed!" diff --git a/tests/t-registers/Makefile b/tests/t-registers/Makefile new file mode 100644 index 0000000..b8278d1 --- /dev/null +++ b/tests/t-registers/Makefile @@ -0,0 +1,5 @@ +MAKEFLAGS += --no-builtin-rules + +SRC = registers.S + +include ../test.mk diff --git a/tests/test.sh b/tests/test.sh index aad0f5a..34b42e3 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -66,10 +66,11 @@ TEST_DIR="$TEST_DIR_ROOT/$TEST_NAME" qtmips_make() { mkdir -p "$BUILD_DIR" - pushd "$BUILD_DIR" >/dev/null + local ORIG="$(pwd)" + cd "$BUILD_DIR" /usr/lib64/qt5/bin/qmake "$PROJECT_ROOT" || echo_fail "QtMips qmake failed!" make "$@" || echo_fail "QtMips build failed! (target: $@)" - popd >/dev/null + cd "$ORIG" } qtmips_run() { -- cgit v1.2.3