File: test_maemo.py

package info (click to toggle)
pypy 5.6.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 97,040 kB
  • ctags: 185,069
  • sloc: python: 1,147,862; ansic: 49,642; cpp: 5,245; asm: 5,169; makefile: 529; sh: 481; xml: 232; lisp: 45
file content (37 lines) | stat: -rw-r--r-- 1,155 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

""" File containing maemo platform tests
"""

import py
from rpython.tool.udir import udir
from rpython.translator.platform.maemo import Maemo, check_scratchbox
from rpython.translator.platform.test.test_platform import TestPlatform as BasicTest
from rpython.translator.tool.cbuild import ExternalCompilationInfo

class TestMaemo(BasicTest):
    platform = Maemo()
    strict_on_stderr = False

    def setup_class(cls):
        py.test.skip("TestMaemo: tests skipped for now")
        check_scratchbox()

    def test_includes_outside_scratchbox(self):
        cfile = udir.join('test_includes_outside_scratchbox.c')
        cfile.write('''
        #include <stdio.h>
        #include "test.h"
        int main()
        {
            printf("%d\\n", XXX_STUFF);
            return 0;
        }
        ''')
        includedir = py.path.local(__file__).dirpath().join('include')
        eci = ExternalCompilationInfo(include_dirs=(includedir,))
        executable = self.platform.compile([cfile], eci)
        res = self.platform.execute(executable)
        self.check_res(res)

    def test_environment_inheritance(self):
        py.test.skip("FIXME")