test: Skip meson integration tests if SYSTEMD_INTEGRATION_TESTS != 1
We cannot mark a test suite as excluded by default in meson. Instead, let's require that SYSTEMD_INTEGRATION_TESTS=1 and skip any integration test if it's not set. This is effectively the same as excluding it by default. If the integration-test option is enabled, we'll set the environment variable by default, just like we do with SYSTEMD_SLOW_TESTS and the slow-tests meson option.
This commit is contained in:
@@ -38,6 +38,10 @@ ExecStart=false
|
||||
|
||||
|
||||
def main():
|
||||
if not bool(int(os.getenv("SYSTEMD_INTEGRATION_TESTS", "0"))):
|
||||
print("SYSTEMD_INTEGRATION_TESTS=1 not found in environment, skipping", file=sys.stderr)
|
||||
exit(77)
|
||||
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--meson-source-dir', required=True, type=Path)
|
||||
parser.add_argument('--meson-build-dir', required=True, type=Path)
|
||||
|
||||
Reference in New Issue
Block a user