summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}