Skip to content

Commit

Permalink
Testsuite control condition for Unix-only (#1657)
Browse files Browse the repository at this point in the history
* Test control condition for Unix-only

* Fix test post-merge
  • Loading branch information
mosteo committed Oct 8, 2024
1 parent 95374c3 commit 574a045
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions testsuite/drivers/driver/base_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(self, env: e3.env.Env, test_env: Dict[str, Any]):
# Hardcode OSes
for osname in ["windows", "linux", "macos"]:
self.skip[f"skip_{osname}"] = not getattr(drivers.helpers, f"on_{osname}")()
self.skip[f"skip_unix"] = drivers.helpers.on_windows()

@property
def test_control_creator(self):
Expand Down
1 change: 1 addition & 0 deletions testsuite/skels/global-index/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
driver: python-script
build_mode: both # one of shared, sandboxed, both (default)
control: # Used to disable test depending on one of: (see no-skel/test.yaml)
indexes:
basic_index:
in_fixtures: true
1 change: 1 addition & 0 deletions testsuite/skels/local-index/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
driver: python-script
build_mode: both # one of shared, sandboxed, both (default)
control: # Used to disable test depending on one of: (see no-skel/test.yaml)
indexes:
my_index:
in_fixtures: false
Expand Down
2 changes: 2 additions & 0 deletions testsuite/skels/no-index/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ control: # Used to disable test depending on one of:
- [SKIP, "skip_network", "Network-requiring tests disabled"]
- [SKIP, "skip_linux", "Test is Linux-only"]
- [SKIP, "skip_macos", "Test is macOS-only"]
- [SKIP, "skip_unix", "Test is Unix-only"]
- [SKIP, "skip_windows", "Test is Windows-only"]
# These have to be interpreted as: "skip (if not running under) condition"
indexes:
compiler_only_index: {}
# Note that shared builds require a detected compiler to be able to compute
Expand Down
5 changes: 1 addition & 4 deletions testsuite/tests/install/softlinks/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@

import os
import shutil
import subprocess
import sys

from drivers.alr import crate_dirname, run_alr
from drivers.alr import run_alr, crate_dirname
from drivers.helpers import contents, on_windows


Expand Down
2 changes: 2 additions & 0 deletions testsuite/tests/install/softlinks/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
driver: python-script
control:
- [SKIP, "skip_unix", "Test is Unix-only"]
indexes:
my_index:
in_fixtures: false

0 comments on commit 574a045

Please sign in to comment.