Did I find the right examples for you? yes no

All Samples(61)  |  Call(61)  |  Derive(0)  |  Import(0)

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/logrotate.py   oe-core(Download)
    def test_1_logrotate_setup(self):
        (status, output) = self.target.run('mkdir /home/root/logrotate_dir')
        self.assertEqual(status, 0, msg = "Could not create logrotate_dir. Output: %s" % output)
        (status, output) = self.target.run("sed -i 's#wtmp {#wtmp {\\n    olddir /home/root/logrotate_dir#' /etc/logrotate.conf")
        self.assertEqual(status, 0, msg = "Could not write to logrotate.conf file. Status and output: %s and %s)" % (status, output))
 
    @skipUnlessPassed("test_1_logrotate_setup")
    def test_2_logrotate(self):
        (status, output) = self.target.run('logrotate -f /etc/logrotate.conf')
        self.assertEqual(status, 0, msg = "logrotate service could not be reloaded. Status and output: %s and %s" % (status, output))

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/gcc.py   oe-core(Download)
    def test_gcc_compile(self):
        (status, output) = self.target.run('gcc /tmp/test.c -o /tmp/test -lm')
        self.assertEqual(status, 0, msg="gcc compile failed, output: %s" % output)
        (status, output) = self.target.run('/tmp/test')
        self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
 
    def test_gpp_compile(self):
        (status, output) = self.target.run('g++ /tmp/test.c -o /tmp/test -lm')
        self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
    def test_gpp_compile(self):
        (status, output) = self.target.run('g++ /tmp/test.c -o /tmp/test -lm')
        self.assertEqual(status, 0, msg="g++ compile failed, output: %s" % output)
        (status, output) = self.target.run('/tmp/test')
        self.assertEqual(status, 0, msg="running compiled file failed, output %s" % output)
 
    def test_make(self):
        (status, output) = self.target.run('cd /tmp; make -f testmakefile')
        self.assertEqual(status, 0, msg="running make failed, output %s" % output)

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/connman.py   oe-core(Download)
    def test_connmand_help(self):
        (status, output) = self.target.run('/usr/sbin/connmand --help')
        self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
 
 

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/python.py   oe-core(Download)
    def test_python_exists(self):
        (status, output) = self.target.run('which python')
        self.assertEqual(status, 0, msg="Python binary not in PATH or not on target.")
 
    def test_python_stdout(self):
        (status, output) = self.target.run('python /tmp/test.py')
        self.assertEqual(status, 0, msg="Exit status was not 0. Output: %s" % output)
        self.assertEqual(output, "the value of a is 0.01", msg="Incorrect output: %s" % output)
    def test_python_testfile(self):
        (status, output) = self.target.run('ls /tmp/testfile.python')
        self.assertEqual(status, 0, msg="Python test file generate failed.")
 
 

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/pam.py   oe-core(Download)
    def test_pam(self):
        (status, output) = self.target.run('login --help')
        self.assertEqual(status, 1, msg = "login command does not work as expected. Status and output:%s and %s" %(status, output))
        (status, output) = self.target.run('passwd --help')
        self.assertEqual(status, 6, msg = "passwd command does not work as expected. Status and output:%s and %s" %(status, output))
        (status, output) = self.target.run('su --help')
        self.assertEqual(status, 2, msg = "su command does not work as expected. Status and output:%s and %s" %(status, output))
        (status, output) = self.target.run('useradd --help')
        self.assertEqual(status, 2, msg = "useradd command does not work as expected. Status and output:%s and %s" %(status, output))

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/vnc.py   oe-core(Download)
    def test_vnc(self):
        (status, output) = self.target.run('x11vnc -display :0 -bg -o x11vnc.log')
        self.assertEqual(status, 0, msg="x11vnc server failed to start: %s" % output)
        port = re.search('PORT=[0-9]*', output)
        self.assertTrue(port, msg="Listening port not specified in command output: %s" %output)
 
        vncport = port.group(0).split('=')[1]
        (status, output) = self.target.run('netstat -ntl | grep ":%s"' % vncport)
        self.assertEqual(status, 0, msg="x11vnc server not running on port %s\n\n%s" % (vncport, self.target.run('netstat -ntl; cat x11vnc.log')[1]))

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/syslog.py   oe-core(Download)
    def test_syslog_help(self):
        (status,output) = self.target.run('/sbin/syslogd --help')
        self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
 
    @skipUnlessPassed("test_syslog_help")
    def test_syslog_running(self):
        (status,output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -i [s]yslogd')
        self.assertEqual(status, 0, msg="no syslogd process, ps output: %s" % self.target.run(oeRuntimeTest.pscmd)[1])
    def test_syslog_logger(self):
        (status,output) = self.target.run('logger foobar && test -e /var/log/messages && grep foobar /var/log/messages || logread | grep foobar')
        self.assertEqual(status, 0, msg="Test log string not found in /var/log/messages. Output: %s " % output)
 
    @skipUnlessPassed("test_syslog_running")
    def test_syslog_startup_config(self):
        self.target.run('echo "LOGFILE=/var/log/test" >> /etc/syslog-startup.conf')
        (status,output) = self.target.run('/etc/init.d/syslog restart')
        self.assertEqual(status, 0, msg="Could not restart syslog service. Status and output: %s and %s" % (status,output))
        (status,output) = self.target.run('logger foobar && grep foobar /var/log/test')
        self.assertEqual(status, 0, msg="Test log string not found. Output: %s " % output)

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/rpm.py   oe-core(Download)
    def test_rpm_help(self):
        (status, output) = self.target.run('rpm --help')
        self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
 
    @skipUnlessPassed('test_rpm_help')
    def test_rpm_query(self):
        (status, output) = self.target.run('rpm -q rpm')
        self.assertEqual(status, 0, msg="status and output: %s and %s" % (status,output))
    def test_rpm_install(self):
        (status, output) = self.target.run('rpm -ivh /tmp/rpm-doc.rpm')
        self.assertEqual(status, 0, msg="Failed to install rpm-doc package: %s" % output)
 
    @skipUnlessPassed('test_rpm_install')
    def test_rpm_remove(self):
        (status,output) = self.target.run('rpm -e rpm-doc')
        self.assertEqual(status, 0, msg="Failed to remove rpm-doc package: %s" % output)

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/skeletoninit.py   oe-core(Download)
    def test_skeleton_availability(self):
        (status, output) = self.target.run('ls /etc/init.d/skeleton')
        self.assertEqual(status, 0, msg = "skeleton init script not found. Output:\n%s " % output)
        (status, output) =  self.target.run('ls /usr/sbin/skeleton-test')
        self.assertEqual(status, 0, msg = "skeleton-test not found. Output:\n%s" % output)
    def test_skeleton_script(self):
        output1 = self.target.run("/etc/init.d/skeleton start")[1]
        (status, output2) = self.target.run(oeRuntimeTest.pscmd + ' | grep [s]keleton-test')
        self.assertEqual(status, 0, msg = "Skeleton script could not be started:\n%s\n%s" % (output1, output2))
 

src/o/e/oe-core-HEAD/meta/lib/oeqa/runtime/perl.py   oe-core(Download)
    def test_perl_exists(self):
        (status, output) = self.target.run('which perl')
        self.assertEqual(status, 0, msg="Perl binary not in PATH or not on target.")
 
    def test_perl_works(self):
        (status, output) = self.target.run('perl /tmp/test.pl')
        self.assertEqual(status, 0, msg="Exit status was not 0. Output: %s" % output)
        self.assertEqual(output, "the value of a is 0.01", msg="Incorrect output: %s" % output)

  1 | 2 | 3  Next