Moved sim/ to test/simulator
All test code will be in test/. The simulator will be a subdirectory and
separate for all of the other unit test code.
Change-Id: I18c787c8180a93e09b91c74968284062391d915d
diff --git a/meson.build b/meson.build
index 802f682..7a569b6 100644
--- a/meson.build
+++ b/meson.build
@@ -6,10 +6,11 @@
'cpp_std=c++11'
])
-incdir = include_directories('./')
+incdir = [ include_directories('src') ]
-build_simulator = get_option('tests')
+build_tests = get_option('tests')
-if not build_simulator.disabled()
- subdir('sim')
+if not build_tests.disabled()
+ incdir += include_directories('test')
+ subdir('test')
endif
diff --git a/sim/meson.build b/sim/meson.build
deleted file mode 100644
index fe3fa32..0000000
--- a/sim/meson.build
+++ /dev/null
@@ -1,8 +0,0 @@
-tests = ['openpower-libhei-sim']
-
-sim_sources = ['hei_sim_main.cpp',
- '../src/hei_isolator.cpp']
-
-foreach t : tests
- test(t, executable(t.underscorify(), sim_sources, include_directories : incdir))
-endforeach
diff --git a/sim/hei_user_defines.hpp b/test/hei_user_defines.hpp
similarity index 100%
rename from sim/hei_user_defines.hpp
rename to test/hei_user_defines.hpp
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 0000000..6cc59ae
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,3 @@
+# build simulator
+subdir('simulator')
+
diff --git a/sim/hei_sim_main.cpp b/test/simulator/hei_sim_main.cpp
similarity index 73%
rename from sim/hei_sim_main.cpp
rename to test/simulator/hei_sim_main.cpp
index 7ddf7b4..41ffe7f 100644
--- a/sim/hei_sim_main.cpp
+++ b/test/simulator/hei_sim_main.cpp
@@ -1,5 +1,4 @@
-
-#include "../src/hei_isolator.hpp"
+#include "hei_isolator.hpp"
int main()
{
diff --git a/test/simulator/meson.build b/test/simulator/meson.build
new file mode 100644
index 0000000..4f72f2e
--- /dev/null
+++ b/test/simulator/meson.build
@@ -0,0 +1,10 @@
+sim_sources = [
+ 'hei_sim_main.cpp',
+ '../../src/hei_isolator.cpp'
+]
+
+sim = executable('simulator', sim_sources, \
+ include_directories: incdir)
+
+test('simulator', sim)
+