diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-12-07 13:35:43 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-23 12:05:20 +0000 |
commit | 5f57fd0b08f01a5d50787186f64d62d901a71ce0 (patch) | |
tree | 95396cf5ce652eab60b8c9dd550af0e4b78828ac /meta/lib/oeqa/runtime | |
parent | bfe20fd23cb1efec9289ba5a2486234e6c8a0549 (diff) | |
download | poky-5f57fd0b08f01a5d50787186f64d62d901a71ce0.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]
(From OE-Core rev: f80c21b46f69c42ff0853bf8abd01cf0c082c346)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r-- | meta/lib/oeqa/runtime/context.py | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/files/hellomod.c | 19 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/files/hellomod_makefile | 8 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/files/testmakefile | 5 |
4 files changed, 34 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py index 496730ddbe..10a8872871 100644 --- a/meta/lib/oeqa/runtime/context.py +++ b/meta/lib/oeqa/runtime/context.py | |||
@@ -9,6 +9,8 @@ from oeqa.runtime.loader import OERuntimeTestLoader | |||
9 | 9 | ||
10 | class OERuntimeTestContext(OETestContext): | 10 | class OERuntimeTestContext(OETestContext): |
11 | loaderClass = OERuntimeTestLoader | 11 | loaderClass = OERuntimeTestLoader |
12 | runtime_files_dir = os.path.join( | ||
13 | os.path.dirname(os.path.abspath(__file__)), "files") | ||
12 | 14 | ||
13 | def __init__(self, td, logger, target, packages_manifest): | 15 | def __init__(self, td, logger, target, packages_manifest): |
14 | super(OERuntimeTestContext, self).__init__(td, logger) | 16 | super(OERuntimeTestContext, self).__init__(td, logger) |
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 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/kernel.h> | ||
3 | #include <linux/init.h> | ||
4 | |||
5 | static int __init hello_init(void) | ||
6 | { | ||
7 | printk(KERN_INFO "Hello world!\n"); | ||
8 | return 0; | ||
9 | } | ||
10 | |||
11 | static void __exit hello_cleanup(void) | ||
12 | { | ||
13 | printk(KERN_INFO "Cleaning up hellomod.\n"); | ||
14 | } | ||
15 | |||
16 | module_init(hello_init); | ||
17 | module_exit(hello_cleanup); | ||
18 | |||
19 | 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 @@ | |||
1 | obj-m := hellomod.o | ||
2 | KDIR := /usr/src/kernel | ||
3 | |||
4 | all: | ||
5 | $(MAKE) -C $(KDIR) M=$(PWD) modules | ||
6 | |||
7 | clean: | ||
8 | $(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 @@ | |||
1 | test: test.o | ||
2 | gcc -o test test.o -lm | ||
3 | test.o: test.c | ||
4 | gcc -c test.c | ||
5 | |||