diff options
author | Karel Kočí <cynerd@email.cz> | 2017-11-19 21:23:04 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-11-19 21:23:04 +0100 |
commit | f0ad502e4651243d6a96194b3393bd460c0f7fc9 (patch) | |
tree | 4f912c24b5943bd93b5a3378df75f9611de6779b /tests | |
parent | 2c6562fa78e884d66b8c2a306f020101e8803f2e (diff) | |
download | qtmips-f0ad502e4651243d6a96194b3393bd460c0f7fc9.tar.gz qtmips-f0ad502e4651243d6a96194b3393bd460c0f7fc9.tar.bz2 qtmips-f0ad502e4651243d6a96194b3393bd460c0f7fc9.zip |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/machine-unit-tests/Makefile | 5 | ||||
-rw-r--r-- | tests/machine-unit-tests/data.S | 6 | ||||
-rwxr-xr-x | tests/machine-unit-tests/test.sh | 2 | ||||
-rw-r--r-- | tests/t-registers/Makefile | 5 | ||||
-rw-r--r-- | tests/test.sh | 5 |
5 files changed, 21 insertions, 2 deletions
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() { |