mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-07 21:15:03 +00:00

Some checks are pending
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
* fix: make real onSave export conditions * fix: remove fix * feat: pass export tests * fix: revert bootstrap changes * feat: reduce num of exports * fix: diag tests
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def run_tests(test_files=None):
|
|
"""
|
|
Run the Neovim test suite with the specified test files.
|
|
If no test files are specified, it runs all tests in the 'spec' directory.
|
|
"""
|
|
init_lua = os.path.realpath(
|
|
os.path.join(__file__, "../../scripts/minimal_init.lua")
|
|
)
|
|
|
|
if test_files is None:
|
|
# all test files in the 'spec' directory
|
|
test_files = []
|
|
for root, _, files in os.walk(os.path.dirname(__file__)):
|
|
test_files.extend(
|
|
os.path.join(root, f) for f in files if f.endswith("spec.lua")
|
|
)
|
|
test_files = " ".join(test_files)
|
|
|
|
command = [
|
|
"nvim",
|
|
"--headless",
|
|
"--clean",
|
|
"-u",
|
|
init_lua,
|
|
"-c",
|
|
f'lua require("inanis").run{{ specs = vim.split("{test_files}", " "), minimal_init = "{init_lua}", sequential = vim.env.TEST_SEQUENTIAL ~= nil }}',
|
|
]
|
|
|
|
subprocess.run(command, check=True)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
# Check if any test files are provided as command line arguments
|
|
if len(sys.argv) > 1:
|
|
test_files = " ".join(sys.argv[1:])
|
|
else:
|
|
test_files = None
|
|
|
|
run_tests(test_files)
|