From 8d3640b90dca79f7a79b3a62de5cf5326577434e Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Wed, 9 Nov 2016 14:57:40 -0600 Subject: oeqa: Move common files to oeqa/files instead of runtime only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those files are used by runtime and sdk test cases, so move to base directory of oeqa module. [YOCTO #10599] (From OE-Core rev: ec73e8a3d3149f3866b7bfc06f169c6e05e2d338) Signed-off-by: Aníbal Limón Signed-off-by: Mariano Lopez Signed-off-by: Richard Purdie --- meta/lib/oeqa/files/test.c | 26 ++++++++++++++++++++++++++ meta/lib/oeqa/files/test.cpp | 3 +++ meta/lib/oeqa/files/test.pl | 2 ++ meta/lib/oeqa/files/test.py | 6 ++++++ 4 files changed, 37 insertions(+) create mode 100644 meta/lib/oeqa/files/test.c create mode 100644 meta/lib/oeqa/files/test.cpp create mode 100644 meta/lib/oeqa/files/test.pl create mode 100644 meta/lib/oeqa/files/test.py (limited to 'meta/lib/oeqa/files') diff --git a/meta/lib/oeqa/files/test.c b/meta/lib/oeqa/files/test.c new file mode 100644 index 0000000000..2d8389c92e --- /dev/null +++ b/meta/lib/oeqa/files/test.c @@ -0,0 +1,26 @@ +#include +#include +#include + +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/meta/lib/oeqa/files/test.cpp b/meta/lib/oeqa/files/test.cpp new file mode 100644 index 0000000000..9e1a76473d --- /dev/null +++ b/meta/lib/oeqa/files/test.cpp @@ -0,0 +1,3 @@ +#include + +int main() {} \ No newline at end of file diff --git a/meta/lib/oeqa/files/test.pl b/meta/lib/oeqa/files/test.pl new file mode 100644 index 0000000000..689c8f1635 --- /dev/null +++ b/meta/lib/oeqa/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/meta/lib/oeqa/files/test.py b/meta/lib/oeqa/files/test.py new file mode 100644 index 0000000000..f389225d72 --- /dev/null +++ b/meta/lib/oeqa/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) -- cgit v1.2.3-54-g00ecf