Skip to content
Snippets Groups Projects
Commit 0e0457ce authored by Avi Kivity's avatar Avi Kivity
Browse files

tests: move unit tests to an independent test (via testrunner.so)

parent d1a46355
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,7 @@ tests += tests/tst-bsd-evh.so tests/tst-bsd-callout.so tests/tst-bsd-netisr.so \
tests/tst-bsd-netdriver.so tests/tst-virtionet.so
tests += tests/tst-fpu.so
tests += tests/tst-tracepoint.so
tests += tests/tst-unit-tests.so
tests/hello/Hello.class: javabase=tests/hello
......@@ -102,6 +103,7 @@ tests/tst-bsd-netdriver.so: tests/tst-bsd-netdriver.o
tests/tst-virtionet.so: tests/tst-virtionet.o
tests/tst-fpu.so: tests/tst-fpu.o
tests/tst-tracepoint.so: tests/tst-tracepoint.o
tests/tst-unit-tests.so: tests/tst-hub.o
all: loader.img loader.bin usr.img
......@@ -223,8 +225,6 @@ objects += core/kprintf.o
objects += core/trace.o
objects += core/poll.o
unittests:= tests/tst-hub.o
include $(src)/fs/build.mak
include $(src)/libc/build.mak
......@@ -245,7 +245,7 @@ libgcc_s.a = $(shell find $(gccbase) -name libgcc.a | grep -v /32/)
libgcc_eh.a = $(shell find $(gccbase) -name libgcc_eh.a | grep -v /32/)
loader.elf: arch/x64/boot.o arch/x64/loader.ld loader.o runtime.o $(drivers) \
$(objects) $(unittests) dummy-shlib.so \
$(objects) dummy-shlib.so \
bootfs.bin
$(call quiet, $(LD) -o $@ \
-Bdynamic --export-dynamic --eh-frame-hdr --enable-new-dtags \
......
......@@ -22,7 +22,6 @@
#include "drivers/clock.hh"
#include "drivers/clockevent.hh"
#include "barrier.hh"
#include "tests/tst-hub.hh"
#include "arch.hh"
#include "osv/trace.hh"
......@@ -181,9 +180,6 @@ void* do_main_thread(void *_args)
{
auto args = static_cast<argblock*>(_args);
//Tests malloc and free using threads.
unit_tests::tests::instance().execute_tests();
// Enumerate PCI devices
pci::pci_device_enumeration();
......
......@@ -40,3 +40,10 @@ void tests::execute_tests() {
instance().run();
}
int main(int ac, char** av)
{
unit_tests::tests::instance().execute_tests();
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment