summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa/sdkext
diff options
context:
space:
mode:
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 @@
+import shutil
+
+from oeqa.oetest import oeSDKExtTest
+from oeqa.utils.decorators import *
+
+class DevtoolTest(oeSDKExtTest):
+
+ @classmethod
+ def setUpClass(self):
+ self.myapp_src = os.path.join(self.tc.sdkextfilesdir, "myapp")
+ self.myapp_dst = os.path.join(self.tc.sdktestdir, "myapp")
+ shutil.copytree(self.myapp_src, self.myapp_dst)
+
+ def test_devtool_add_reset(self):
+ self._run('devtool add myapp %s' % self.myapp_dst)
+ self._run('devtool reset myapp')
+
+ def test_devtool_build(self):
+ self._run('devtool add myapp %s' % self.myapp_dst)
+ self._run('devtool build myapp')
+ self._run('devtool reset myapp')
+
+ @classmethod
+ def tearDownClass(self):
+ 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 @@
+all: myapp
+
+myapp: myapp.o
+ $(CC) $(LDFLAGS) $< -o $@
+
+myapp.o: myapp.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+clean:
+ 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 @@
+#include <stdio.h>
+
+int
+main(int argc, char *argv[])
+{
+ printf("Hello world\n");
+
+ return 0;
+}