[go: up one dir, main page]

File: run.py

package info (click to toggle)
txtorcon 24.8.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,036 kB
  • sloc: python: 17,607; makefile: 227; sh: 34
file content (29 lines) | stat: -rw-r--r-- 708 bytes parent folder | download
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
#!/usr/bin/env python

## this runs all the integration tests under here, exiting right away
## if any one does.
## FIXME can't I [ab]use trial or unittest for this??

import os
import sys
import subprocess

base_path = os.path.split(os.path.realpath(sys.argv[0]))[0]
print("PATH", base_path)

for d in os.listdir(base_path):
    path = os.path.join(base_path, d, 'host_run')
    if os.path.exists(path):
        print()
        print("Running Test:", d)
        print(path)
        print()
        ret = subprocess.check_call([path])
        if ret:
            print()
            print("Test FAILED")
            sys.exit(ret)
        print()
        print("Test successful.")
        print()
sys.exit(0)