diff options
Diffstat (limited to 'yocto-poky/meta/lib/oeqa/runtime/files')
-rw-r--r-- | yocto-poky/meta/lib/oeqa/runtime/files/hellomod.c | 19 | ||||
-rw-r--r-- | yocto-poky/meta/lib/oeqa/runtime/files/hellomod_makefile | 8 | ||||
-rw-r--r-- | yocto-poky/meta/lib/oeqa/runtime/files/test.c | 26 | ||||
-rw-r--r-- | yocto-poky/meta/lib/oeqa/runtime/files/test.cpp | 3 | ||||
-rw-r--r-- | yocto-poky/meta/lib/oeqa/runtime/files/test.pl | 2 | ||||
-rw-r--r-- | yocto-poky/meta/lib/oeqa/runtime/files/test.py | 6 | ||||
-rw-r--r-- | yocto-poky/meta/lib/oeqa/runtime/files/testmakefile | 5 |
7 files changed, 69 insertions, 0 deletions
diff --git a/yocto-poky/meta/lib/oeqa/runtime/files/hellomod.c b/yocto-poky/meta/lib/oeqa/runtime/files/hellomod.c new file mode 100644 index 000000000..a383397e9 --- /dev/null +++ b/yocto-poky/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/yocto-poky/meta/lib/oeqa/runtime/files/hellomod_makefile b/yocto-poky/meta/lib/oeqa/runtime/files/hellomod_makefile new file mode 100644 index 000000000..b92d5c8fe --- /dev/null +++ b/yocto-poky/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/yocto-poky/meta/lib/oeqa/runtime/files/test.c b/yocto-poky/meta/lib/oeqa/runtime/files/test.c new file mode 100644 index 000000000..2d8389c92 --- /dev/null +++ b/yocto-poky/meta/lib/oeqa/runtime/files/test.c @@ -0,0 +1,26 @@ +#include <stdio.h> +#include <math.h> +#include <stdlib.h> + +double convert(long long l) +{ + return (double)l; +} + +int main(int argc, char * argv[]) { + + long long l = 10; + double f; + double check = 10.0; + + f = convert(l); + printf("convert: %lld => %f\n", l, f); + if ( f != check ) exit(1); + + f = 1234.67; + check = 1234.0; + printf("floorf(%f) = %f\n", f, floorf(f)); + if ( floorf(f) != check) exit(1); + + return 0; +} diff --git a/yocto-poky/meta/lib/oeqa/runtime/files/test.cpp b/yocto-poky/meta/lib/oeqa/runtime/files/test.cpp new file mode 100644 index 000000000..9e1a76473 --- /dev/null +++ b/yocto-poky/meta/lib/oeqa/runtime/files/test.cpp @@ -0,0 +1,3 @@ +#include <limits> + +int main() {}
\ No newline at end of file diff --git a/yocto-poky/meta/lib/oeqa/runtime/files/test.pl b/yocto-poky/meta/lib/oeqa/runtime/files/test.pl new file mode 100644 index 000000000..689c8f163 --- /dev/null +++ b/yocto-poky/meta/lib/oeqa/runtime/files/test.pl @@ -0,0 +1,2 @@ +$a = 9.01e+21 - 9.01e+21 + 0.01; +print ("the value of a is ", $a, "\n"); diff --git a/yocto-poky/meta/lib/oeqa/runtime/files/test.py b/yocto-poky/meta/lib/oeqa/runtime/files/test.py new file mode 100644 index 000000000..f3a2273c5 --- /dev/null +++ b/yocto-poky/meta/lib/oeqa/runtime/files/test.py @@ -0,0 +1,6 @@ +import os + +os.system('touch /tmp/testfile.python') + +a = 9.01e+21 - 9.01e+21 + 0.01 +print "the value of a is %s" % a diff --git a/yocto-poky/meta/lib/oeqa/runtime/files/testmakefile b/yocto-poky/meta/lib/oeqa/runtime/files/testmakefile new file mode 100644 index 000000000..ca1844e93 --- /dev/null +++ b/yocto-poky/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 + |