summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/files
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-12-07 13:35:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:03:56 +0000
commitf80c21b46f69c42ff0853bf8abd01cf0c082c346 (patch)
tree47fb4ab21ea8c027e1ff9ca8d27ca1b0c55de8ce /meta/lib/oeqa/runtime/files
parent8740803d0696a0e97b72210a56f4fbd3135826ed (diff)
downloadopenembedded-core-contrib-f80c21b46f69c42ff0853bf8abd01cf0c082c346.tar.gz
oeqa/runtime/files: Move runtime files from old directory
As part of the refactor we require to move the files used in runtime testing to the new directory. This also adds the path to the runtime test context. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Diffstat (limited to 'meta/lib/oeqa/runtime/files')
-rw-r--r--meta/lib/oeqa/runtime/files/hellomod.c19
-rw-r--r--meta/lib/oeqa/runtime/files/hellomod_makefile8
-rw-r--r--meta/lib/oeqa/runtime/files/testmakefile5
3 files changed, 32 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/files/hellomod.c b/meta/lib/oeqa/runtime/files/hellomod.c
new file mode 100644
index 0000000000..a383397e93
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/hellomod.c
@@ -0,0 +1,19 @@
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+static int __init hello_init(void)
+{
+ printk(KERN_INFO "Hello world!\n");
+ return 0;
+}
+
+static void __exit hello_cleanup(void)
+{
+ printk(KERN_INFO "Cleaning up hellomod.\n");
+}
+
+module_init(hello_init);
+module_exit(hello_cleanup);
+
+MODULE_LICENSE("GPL");
diff --git a/meta/lib/oeqa/runtime/files/hellomod_makefile b/meta/lib/oeqa/runtime/files/hellomod_makefile
new file mode 100644
index 0000000000..b92d5c8fe0
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/hellomod_makefile
@@ -0,0 +1,8 @@
+obj-m := hellomod.o
+KDIR := /usr/src/kernel
+
+all:
+ $(MAKE) -C $(KDIR) M=$(PWD) modules
+
+clean:
+ $(MAKE) -C $(KDIR) M=$(PWD) clean
diff --git a/meta/lib/oeqa/runtime/files/testmakefile b/meta/lib/oeqa/runtime/files/testmakefile
new file mode 100644
index 0000000000..ca1844e930
--- /dev/null
+++ b/meta/lib/oeqa/runtime/files/testmakefile
@@ -0,0 +1,5 @@
+test: test.o
+ gcc -o test test.o -lm
+test.o: test.c
+ gcc -c test.c
+