diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/files')
-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/test.c | 26 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/files/test.pl | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/files/test.py | 6 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/files/testmakefile | 5 |
6 files changed, 66 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 @@ | |||
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/test.c b/meta/lib/oeqa/runtime/files/test.c new file mode 100644 index 0000000000..2d8389c92e --- /dev/null +++ b/meta/lib/oeqa/runtime/files/test.c | |||
@@ -0,0 +1,26 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <math.h> | ||
3 | #include <stdlib.h> | ||
4 | |||
5 | double convert(long long l) | ||
6 | { | ||
7 | return (double)l; | ||
8 | } | ||
9 | |||
10 | int main(int argc, char * argv[]) { | ||
11 | |||
12 | long long l = 10; | ||
13 | double f; | ||
14 | double check = 10.0; | ||
15 | |||
16 | f = convert(l); | ||
17 | printf("convert: %lld => %f\n", l, f); | ||
18 | if ( f != check ) exit(1); | ||
19 | |||
20 | f = 1234.67; | ||
21 | check = 1234.0; | ||
22 | printf("floorf(%f) = %f\n", f, floorf(f)); | ||
23 | if ( floorf(f) != check) exit(1); | ||
24 | |||
25 | return 0; | ||
26 | } | ||
diff --git a/meta/lib/oeqa/runtime/files/test.pl b/meta/lib/oeqa/runtime/files/test.pl new file mode 100644 index 0000000000..689c8f1635 --- /dev/null +++ b/meta/lib/oeqa/runtime/files/test.pl | |||
@@ -0,0 +1,2 @@ | |||
1 | $a = 9.01e+21 - 9.01e+21 + 0.01; | ||
2 | print ("the value of a is ", $a, "\n"); | ||
diff --git a/meta/lib/oeqa/runtime/files/test.py b/meta/lib/oeqa/runtime/files/test.py new file mode 100644 index 0000000000..f3a2273c52 --- /dev/null +++ b/meta/lib/oeqa/runtime/files/test.py | |||
@@ -0,0 +1,6 @@ | |||
1 | import os | ||
2 | |||
3 | os.system('touch /tmp/testfile.python') | ||
4 | |||
5 | a = 9.01e+21 - 9.01e+21 + 0.01 | ||
6 | print "the value of a is %s" % a | ||
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 | |||