summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdkext
diff options
context:
space:
mode:
authorAníbal Limón <limon.anibal@gmail.com>2016-01-31 10:02:03 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 16:06:23 +0000
commit92d0cc582c5504ba6cdc2e82eb234b99debb7690 (patch)
treebd53fb73b63749721c6cdafd907ccbcf05583e1a /meta/lib/oeqa/sdkext
parenta619ea293acfdf5700030c27056312bc4b898e97 (diff)
downloadpoky-92d0cc582c5504ba6cdc2e82eb234b99debb7690.tar.gz
oeqa/sdkext: Add devtool basic tests for eSDK.
Add simple myapp application is a C app that prints hello world and exit. Add devtool test for that this app to the workspace, build and reset it. (From OE-Core rev: 2ec513c00ab2ae0f7df631d32f8f248446c90184) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdkext')
-rw-r--r--meta/lib/oeqa/sdkext/devtool.py25
-rw-r--r--meta/lib/oeqa/sdkext/files/myapp/Makefile10
-rw-r--r--meta/lib/oeqa/sdkext/files/myapp/myapp.c9
3 files changed, 44 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdkext/devtool.py b/meta/lib/oeqa/sdkext/devtool.py
new file mode 100644
index 0000000000..0262ed30fa
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/devtool.py
@@ -0,0 +1,25 @@
1import shutil
2
3from oeqa.oetest import oeSDKExtTest
4from oeqa.utils.decorators import *
5
6class DevtoolTest(oeSDKExtTest):
7
8 @classmethod
9 def setUpClass(self):
10 self.myapp_src = os.path.join(self.tc.sdkextfilesdir, "myapp")
11 self.myapp_dst = os.path.join(self.tc.sdktestdir, "myapp")
12 shutil.copytree(self.myapp_src, self.myapp_dst)
13
14 def test_devtool_add_reset(self):
15 self._run('devtool add myapp %s' % self.myapp_dst)
16 self._run('devtool reset myapp')
17
18 def test_devtool_build(self):
19 self._run('devtool add myapp %s' % self.myapp_dst)
20 self._run('devtool build myapp')
21 self._run('devtool reset myapp')
22
23 @classmethod
24 def tearDownClass(self):
25 shutil.rmtree(self.myapp_dst)
diff --git a/meta/lib/oeqa/sdkext/files/myapp/Makefile b/meta/lib/oeqa/sdkext/files/myapp/Makefile
new file mode 100644
index 0000000000..abd91bea68
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/files/myapp/Makefile
@@ -0,0 +1,10 @@
1all: myapp
2
3myapp: myapp.o
4 $(CC) $(LDFLAGS) $< -o $@
5
6myapp.o: myapp.c
7 $(CC) $(CFLAGS) -c $< -o $@
8
9clean:
10 rm -rf myapp.o myapp
diff --git a/meta/lib/oeqa/sdkext/files/myapp/myapp.c b/meta/lib/oeqa/sdkext/files/myapp/myapp.c
new file mode 100644
index 0000000000..f0b63f03f3
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/files/myapp/myapp.c
@@ -0,0 +1,9 @@
1#include <stdio.h>
2
3int
4main(int argc, char *argv[])
5{
6 printf("Hello world\n");
7
8 return 0;
9}