cmake: tests: small cleanup

- test-specific bits belong to tests/
- XML stuff should have .xml extension to make editors happy

Change-Id: I8df999977976a7b211ed33429164d1972e18c207
diff --git a/tests/example-schema.yang b/tests/example-schema.yang
new file mode 100644
index 0000000..498446e
--- /dev/null
+++ b/tests/example-schema.yang
@@ -0,0 +1,86 @@
+module example-schema {
+    prefix aha;
+    namespace "http://example.com";
+
+    leaf leafUInt8 {
+        type uint8;
+    }
+
+    leaf leafUInt16 {
+        type uint16;
+    }
+
+    leaf leafUInt32 {
+        type uint32;
+    }
+
+    leaf leafUInt64 {
+        type uint64;
+    }
+
+    leaf leafInt8 {
+        type int8;
+    }
+
+    leaf leafInt16 {
+        type int16;
+    }
+
+    leaf leafInt32 {
+        type int32;
+    }
+
+    leaf leafInt64 {
+        type int64;
+    }
+
+    leaf leafString {
+        type string;
+    }
+
+    leaf leafEnum {
+        type enumeration {
+            enum lol;
+            enum data;
+            enum coze;
+        }
+    }
+
+    leaf leafDecimal {
+        type decimal64 {
+            fraction-digits 9;
+        }
+    }
+
+    container pContainer {
+        presence true;
+    }
+
+    list person {
+        key 'name';
+        leaf name {
+            type string;
+        }
+    }
+
+    leaf bossPerson {
+        type leafref {
+            path '../aha:person/name';
+        }
+    }
+
+    grouping upAndDown {
+        leaf up {
+            type boolean;
+        }
+        leaf down {
+            type boolean;
+        }
+    }
+
+    uses upAndDown;
+
+    container lol {
+        uses upAndDown;
+    }
+}
diff --git a/tests/kill_daemons.sh b/tests/kill_daemons.sh
new file mode 100755
index 0000000..8c9ea91
--- /dev/null
+++ b/tests/kill_daemons.sh
@@ -0,0 +1,8 @@
+set -eux -o pipefail
+shopt -s failglob
+
+RET=0
+pkill -9 netopeer2 || RET=$?
+pkill -9 sysrepo-plugind || RET=$?
+pkill -9 sysrepod || RET=$?
+exit $RET
diff --git a/tests/netopeer-test-config.xml b/tests/netopeer-test-config.xml
new file mode 100644
index 0000000..5723dc3
--- /dev/null
+++ b/tests/netopeer-test-config.xml
@@ -0,0 +1,4 @@
+<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
+  <listen>
+  </listen>
+</netconf-server>
diff --git a/tests/netopeer_vars.hpp.in b/tests/netopeer_vars.hpp.in
new file mode 100644
index 0000000..6036e70
--- /dev/null
+++ b/tests/netopeer_vars.hpp.in
@@ -0,0 +1 @@
+#define NETOPEER_SOCKET_PATH "@NETOPEER_SOCKET_PATH@"
diff --git a/tests/start_daemons.sh.in b/tests/start_daemons.sh.in
new file mode 100755
index 0000000..cbcd25b
--- /dev/null
+++ b/tests/start_daemons.sh.in
@@ -0,0 +1,13 @@
+set -eux -o pipefail
+shopt -s failglob
+export ASAN_OPTIONS=verify_asan_link_order=false
+export UBSAN_OPTIONS=halt_on_error=1
+
+@CMAKE_CURRENT_SOURCE_DIR@/tests/kill_daemons.sh || true
+
+@SYSREPOD_EXECUTABLE@ -l3
+sleep 1
+@SYSREPO_PLUGIND_EXECUTABLE@ -l3
+sleep 1
+@NETOPEER2_EXECUTABLE@ -U -v2 -s @NETOPEER_SOCKET_PATH@
+sleep 5