diff options
Diffstat (limited to 'poky/meta/lib/oeqa/runtime')
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/oe_syslog.py | 11 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/ssh.py | 4 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/stap.py | 22 | ||||
-rw-r--r-- | poky/meta/lib/oeqa/runtime/cases/weston.py | 6 |
4 files changed, 28 insertions, 15 deletions
diff --git a/poky/meta/lib/oeqa/runtime/cases/oe_syslog.py b/poky/meta/lib/oeqa/runtime/cases/oe_syslog.py index f3c2bedbaf..150b70d9f0 100644 --- a/poky/meta/lib/oeqa/runtime/cases/oe_syslog.py +++ b/poky/meta/lib/oeqa/runtime/cases/oe_syslog.py @@ -121,11 +121,16 @@ class SyslogTestConfig(OERuntimeTestCase): self.test_syslog_restart() - cmd = 'logger foobar && grep foobar /var/log/test' - status,output = self.target.run(cmd) - msg = 'Test log string not found. Output: %s ' % output + cmd = 'logger foobar' + status, output = self.target.run(cmd) + msg = 'Logger command failed, %s. Output: %s ' % (status, output) self.assertEqual(status, 0, msg=msg) + cmd = 'cat /var/log/test' + status, output = self.target.run(cmd) + if "foobar" not in output or status: + self.fail("'foobar' not found in logfile, status %s, contents %s" % (status, output)) + cmd = "sed -i 's#LOGFILE=/var/log/test##' /etc/syslog-startup.conf" self.target.run(cmd) self.test_syslog_restart() diff --git a/poky/meta/lib/oeqa/runtime/cases/ssh.py b/poky/meta/lib/oeqa/runtime/cases/ssh.py index 60a5fbbfbf..e31224b3af 100644 --- a/poky/meta/lib/oeqa/runtime/cases/ssh.py +++ b/poky/meta/lib/oeqa/runtime/cases/ssh.py @@ -13,7 +13,7 @@ class SSHTest(OERuntimeTestCase): def test_ssh(self): (status, output) = self.target.run('uname -a') self.assertEqual(status, 0, msg='SSH Test failed: %s' % output) - (status, output) = self.target.run('cat /etc/masterimage') - msg = "This isn't the right image - /etc/masterimage " \ + (status, output) = self.target.run('cat /etc/controllerimage') + msg = "This isn't the right image - /etc/controllerimage " \ "shouldn't be here %s" % output self.assertEqual(status, 1, msg=msg) diff --git a/poky/meta/lib/oeqa/runtime/cases/stap.py b/poky/meta/lib/oeqa/runtime/cases/stap.py index 615c290ce6..480eaabf2d 100644 --- a/poky/meta/lib/oeqa/runtime/cases/stap.py +++ b/poky/meta/lib/oeqa/runtime/cases/stap.py @@ -14,11 +14,19 @@ class StapTest(OERuntimeTestCase): @OEHasPackage(['gcc-symlinks']) @OEHasPackage(['kernel-devsrc']) def test_stap(self): - cmd = 'make -C /usr/src/kernel scripts prepare' - status, output = self.target.run(cmd, 900) - self.assertEqual(status, 0, msg='\n'.join([cmd, output])) + try: + cmd = 'make -j -C /usr/src/kernel scripts prepare' + status, output = self.target.run(cmd, 900) + self.assertEqual(status, 0, msg='\n'.join([cmd, output])) - cmd = 'stap -v --disable-cache -DSTP_NO_VERREL_CHECK -s1 -e \'probe oneshot { print("Hello, "); println("world!") }\'' - status, output = self.target.run(cmd, 900) - self.assertEqual(status, 0, msg='\n'.join([cmd, output])) - self.assertIn('Hello, world!', output, msg='\n'.join([cmd, output])) + cmd = 'stap -v -p4 -m stap-hello --disable-cache -DSTP_NO_VERREL_CHECK -e \'probe oneshot { print("Hello, "); println("SystemTap!") }\'' + status, output = self.target.run(cmd, 900) + self.assertEqual(status, 0, msg='\n'.join([cmd, output])) + + cmd = 'staprun -v -R -b1 stap-hello.ko' + self.assertEqual(status, 0, msg='\n'.join([cmd, output])) + self.assertIn('Hello, SystemTap!', output, msg='\n'.join([cmd, output])) + except: + status, dmesg = self.target.run('dmesg') + if status == 0: + print(dmesg) diff --git a/poky/meta/lib/oeqa/runtime/cases/weston.py b/poky/meta/lib/oeqa/runtime/cases/weston.py index b3a7c2776d..b81cc299ef 100644 --- a/poky/meta/lib/oeqa/runtime/cases/weston.py +++ b/poky/meta/lib/oeqa/runtime/cases/weston.py @@ -10,7 +10,7 @@ import threading import time class WestonTest(OERuntimeTestCase): - weston_log_file = '/tmp/weston.log' + weston_log_file = '/tmp/weston-2.log' @classmethod def tearDownClass(cls): @@ -31,13 +31,13 @@ class WestonTest(OERuntimeTestCase): return output.split(" ") def get_weston_command(self, cmd): - return 'export XDG_RUNTIME_DIR=/run/user/0; export WAYLAND_DISPLAY=wayland-0; %s' % cmd + return 'export XDG_RUNTIME_DIR=/run/user/`id -u weston`; export WAYLAND_DISPLAY=wayland-1; %s' % cmd def run_weston_init(self): if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']: self.target.run('systemd-run --collect --unit=weston-ptest.service --uid=0 -p PAMName=login -p TTYPath=/dev/tty6 -E XDG_RUNTIME_DIR=/tmp -E WAYLAND_DISPLAY=wayland-0 /usr/bin/weston --socket=wayland-1 --log=%s' % self.weston_log_file) else: - self.target.run(self.get_weston_command('openvt -- weston --socket=wayland-1 --log=%s' % self.weston_log_file)) + self.target.run(self.get_weston_command('openvt -- weston --socket=wayland-2 --log=%s' % self.weston_log_file)) def get_new_wayland_processes(self, existing_wl_processes): try_cnt = 0 |