1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

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>
This commit is contained in:
Aníbal Limón
2016-01-31 10:02:03 -06:00
committed by Richard Purdie
parent a619ea293a
commit 92d0cc582c
3 changed files with 44 additions and 0 deletions
+25
View File
@@ -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)
+10
View File
@@ -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
+9
View File
@@ -0,0 +1,9 @@
#include <stdio.h>
int
main(int argc, char *argv[])
{
printf("Hello world\n");
return 0;
}