public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob 036ef3d485229adf8ab3c6f3d7221c573f814e48 653 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
 
#! /usr/bin/python3

# SPDX-License-Identifier: GPL-2.0-or-later
#
# avocado/common.py - Avocado test helper routines
#
# Copyright Red Hat
# Author: David Gibson <david@gibson.dropbear.id.au>

import avocado
from avocado.utils.process import system_output, CmdError


class BaseTest(avocado.Test):
    # Fairly short timeout by default
    timeout = 5.0

    def hostx(self, cmd, **kwargs):
        return system_output(cmd, **kwargs)


#
# Tests for the test infrastructure itself
#

class HostExecTests(BaseTest):
    def test_true(self):
        self.hostx('true')

    def test_false(self):
        self.assertRaises(CmdError, self.hostx, 'false')

debug log:

solving 036ef3d ...
found 036ef3d in https://archives.passt.top/passt-dev/20230420011108.494181-5-david@gibson.dropbear.id.au/

applying [1/1] https://archives.passt.top/passt-dev/20230420011108.494181-5-david@gibson.dropbear.id.au/
diff --git a/avocado/common.py b/avocado/common.py
new file mode 100644
index 0000000..036ef3d

Checking patch avocado/common.py...
Applied patch avocado/common.py cleanly.

index at:
100644 036ef3d485229adf8ab3c6f3d7221c573f814e48	avocado/common.py

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).