aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/oeqa/runtime/cases/mono.py14
-rw-r--r--lib/oeqa/runtime/files/helloyoctosummit.cs17
2 files changed, 30 insertions, 1 deletions
diff --git a/lib/oeqa/runtime/cases/mono.py b/lib/oeqa/runtime/cases/mono.py
index f7e738e..df02fd9 100644
--- a/lib/oeqa/runtime/cases/mono.py
+++ b/lib/oeqa/runtime/cases/mono.py
@@ -19,10 +19,12 @@ class MonoCompileTest(OERuntimeTestCase):
cls.tc.target.copyTo(src, dst)
src = os.path.join(files_dir, 'helloworldgtk.cs')
cls.tc.target.copyTo(src, dst)
+ src = os.path.join(files_dir, 'helloyoctosummit.cs')
+ cls.tc.target.copyTo(src, dst)
@classmethod
def tearDownClass(cls):
- files = '/tmp/helloworld.cs /tmp/helloworld.exe /tmp/helloworldform.cs /tmp/helloworldform.exe /tmp/helloworldgtk.cs /tmp/helloworldgtk.exe'
+ files = '/tmp/helloworld.cs /tmp/helloworld.exe /tmp/helloworldform.cs /tmp/helloworldform.exe /tmp/helloworldgtk.cs /tmp/helloworldgtk.exe /tmp/helloyoctosummit.cs /tmp/helloyoctosummit.exe'
cls.tc.target.run('rm %s' % files)
@OETestDepends(['ssh.SSHTest.test_ssh'])
@@ -36,6 +38,16 @@ class MonoCompileTest(OERuntimeTestCase):
self.assertEqual(output, 'HelloWorld', msg=msg)
@OETestDepends(['ssh.SSHTest.test_ssh'])
+ def test_executable_compile_and_run_cmdline(self):
+ status, output = self.target.run('mcs /tmp/helloyoctosummit.cs -out:/tmp/helloyoctosummit.exe')
+ msg = 'mcs compile failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+ status, output = self.target.run('mono /tmp/helloyoctosummit.exe')
+ msg = 'running compiled file failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+ self.assertEqual(output, 'Hello Yocto Summit', msg=msg)
+
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
def test_executable_compile_and_run_winform(self):
# if not oeRuntimeTest.hasFeature("x11"):
# skipModule("No x11 feature in image")
diff --git a/lib/oeqa/runtime/files/helloyoctosummit.cs b/lib/oeqa/runtime/files/helloyoctosummit.cs
new file mode 100644
index 0000000..9b9d743
--- /dev/null
+++ b/lib/oeqa/runtime/files/helloyoctosummit.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HelloWorld
+{
+ public class Program
+ {
+ public static int Main(string[] args)
+ {
+ Console.WriteLine("Hello Yocto Summit");
+
+ return 0;
+ }
+ }
+}