public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob 9ee13a0fb03b258b173bb0f1c6409336e79a9f67 1184 bytes (raw)

 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
#!/usr/bin/env python3

import os
import sys


def check_avocado_version():
    minimum_version = 106.0

    def error_out():
        print(
            f"Avocado version {minimum_version} or later is required.\n"
            f"You may install it with: \n"
            f"   python3 -m pip install avocado-framework",
            file=sys.stderr,
        )
        sys.exit(1)

    try:
        from avocado import VERSION

        if (float(VERSION)) < minimum_version:
            error_out()
    except ImportError:
        error_out()


check_avocado_version()
from avocado.core.job import Job
from avocado.core.suite import TestSuite


def main():
    repo_root_path = os.path.dirname(os.path.dirname(__file__))
    test_root_path = os.path.join(repo_root_path, "test")

    suitename = sys.argv[1]
    references = [os.path.join(test_root_path, x) for x in sys.argv[2:]]

    os.chdir(test_root_path)

    config = {
        "resolver.references": references,
        "runner.identifier_format": "{args}",
    }
    suite = TestSuite.from_config(config, name=suitename)
    with Job(config, [suite]) as j:
        return j.run()


if __name__ == "__main__":
    sys.exit(main())

debug log:

solving 9ee13a0f ...
found 9ee13a0f in https://archives.passt.top/passt-dev/20240826020942.545155-4-david@gibson.dropbear.id.au/
found 2c8822c6 in https://archives.passt.top/passt-dev/20240826020942.545155-3-david@gibson.dropbear.id.au/
found 37db17c3 in https://archives.passt.top/passt-dev/20240719065907.3539211-2-david@gibson.dropbear.id.au/ ||
	https://archives.passt.top/passt-dev/20240826020942.545155-2-david@gibson.dropbear.id.au/ ||
	https://archives.passt.top/passt-dev/20240805123701.1720730-4-david@gibson.dropbear.id.au/

applying [1/3] https://archives.passt.top/passt-dev/20240719065907.3539211-2-david@gibson.dropbear.id.au/
diff --git a/test/run_avocado b/test/run_avocado
new file mode 100755
index 00000000..37db17c3

Checking patch test/run_avocado...
Applied patch test/run_avocado cleanly.

skipping https://archives.passt.top/passt-dev/20240826020942.545155-2-david@gibson.dropbear.id.au/ for 37db17c3
skipping https://archives.passt.top/passt-dev/20240805123701.1720730-4-david@gibson.dropbear.id.au/ for 37db17c3
index at:
100755 37db17c39ce632f7c99cf652cbbece2d9e7421bb	test/run_avocado

applying [2/3] https://archives.passt.top/passt-dev/20240826020942.545155-3-david@gibson.dropbear.id.au/
diff --git a/test/run_avocado b/test/run_avocado
index 37db17c3..2c8822c6 100755


applying [3/3] https://archives.passt.top/passt-dev/20240826020942.545155-4-david@gibson.dropbear.id.au/
diff --git a/test/run_avocado b/test/run_avocado
index 2c8822c6..9ee13a0f 100755

Checking patch test/run_avocado...
Applied patch test/run_avocado cleanly.
Checking patch test/run_avocado...
Applied patch test/run_avocado cleanly.

index at:
100755 9ee13a0fb03b258b173bb0f1c6409336e79a9f67	test/run_avocado

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).