Exemple #1
0
#!/usr/bin/env python3
import sys

timeout = 5

binaries = [
    "taste-simulate-leon3 output.rtems/binaries/demo_c_leon3_rtems.exe",
    "work/binaries/demo_c"
]

expected = [[
    '[Startup] Expected output: "Hello, world..." every 2 seconds',
    '[TASTE] Initialization completed for function Simple_C_Function'
], 'Hello, world...', 'Hello, world...', 'Hello, world...', 'Hello, world...']

sys.path.append("..")
import commonRegression
result = commonRegression.test(binaries, expected, timeout)
sys.exit(result)
Exemple #2
0
    "\[B\] Startup",
    "\[B\] ping! \(0\)",
    "\[B\] ping! \(1\)",
    "\[B\] ping! \(2\)",
    "\[B\] ping! \(3\)",
    "\[B\] ping! \(4\)",
    "\[B\] ping! \(5\)",
    "\[B\] ping! \(6\)",
    "\[B\] ping! \(7\)",
    "\[B\] ping! \(8\)",
    "\[B\] ping! \(9\)",
]

p = None
try:
    p = subprocess.Popen("binary.linux.pohic/binaries/pinger",
                         stdout=subprocess.PIPE)
    if p == None:
        sys.exit(1)
except:
    sys.exit(1)
result = commonRegression.test(["binary.linux.pohic/binaries/pingee"],
                               expected, timeout)
if 0 != result:
    p.kill()
    sys.exit(1)
p.kill()
p.wait()
commonRegression.g_child.terminate(force=True)
sys.exit(result)
Exemple #3
0
#!/usr/bin/env python3
import sys, os, time, pexpect, subprocess
sys.path.append(os.path.abspath(".."))
import commonRegression

timeout = 15

expected = [[
    '''[INFO] Checking ['og.pr']''',
    "[INFO] Parsing complete. Summary, found 0 warnings and 6 errors",
    '''[ERROR] "a" is an IN parameter (read-only)''',
    '''[ERROR] "so" is an IN parameter (read-only)''',
    '''[ERROR] "ch" is an IN parameter (read-only)''',
    '''[ERROR] "seq" is an IN parameter (read-only)''',
    '''[ERROR] "seq" is an IN parameter (read-only)''',
    '''[ERROR] "seq" is an IN parameter (read-only)'''
]]

result = commonRegression.test(["opengeode --check og.pr"], expected, timeout)
if 0 != result:
    sys.exit(1)
commonRegression.g_child.terminate(force=True)
Exemple #4
0
expected = [
    ["[TASTE] Initialization completed for function B", "[B] Startup"],
    "[B] ping! (0)",
    "[B] ping! (1)",
    "[B] ping! (2)",
    "[B] ping! (3)",
    "[B] ping! (4)",
    "[B] ping! (5)",
    "[B] ping! (6)",
    "[B] ping! (7)",
    "[B] ping! (8)",
    "[B] ping! (9)",
]

p = None
try:
    p = subprocess.Popen("work/binaries/pinger", stdout=subprocess.PIPE)
    if p == None:
        sys.exit(1)
except:
    sys.exit(1)
result = commonRegression.test(["work/binaries/pingee"], expected, timeout)
if 0 != result:
    p.kill()
    sys.exit(1)
p.kill()
p.wait()
commonRegression.g_child.terminate(force=True)
sys.exit(result)
Exemple #5
0
#!/usr/bin/env python3
import sys, os, time, pexpect, subprocess

sys.path.append(os.path.abspath(".."))
import commonRegression

timeout = 15

expected = [
    "Testing parallel states...", "[1] Startup",
    "[2] Entering  Parallel states",
    ["[-] State B starting", "[-] State A starting"], "[-] Received any_one",
    "[3] Action 1 START", "[-] Received any_one", "[4] Action 1 DONE",
    "[-] Received any_two", "[5] Action 2 START", "[-] Received any_two",
    "[6] Action 2 DONE", "[7] Quitting"
]

result = commonRegression.test(["./test_ada"], expected, timeout)
if 0 != result:
    sys.exit(1)
commonRegression.g_child.terminate(force=True)
Exemple #6
0
#!/usr/bin/env python
import sys, os, time, pexpect, subprocess
sys.path.append(os.path.abspath(".."))
import commonRegression

timeout = 15

expected = [["init of displayer done", "init of router done"],
            ["init of displayer done", "init of router done"],
            "cyclicdisplayer", "cyclicdisplayer"]

result = commonRegression.test(["work/binaries/mypartition"], expected,
                               timeout)
if 0 != result:
    sys.exit(1)
commonRegression.g_child.terminate(force=True)