mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 09:22:27 +00:00
Add glue code for accessing the YNL library which lives under tools/net and YAML spec files from under Documentation/. Automatically figure out if tests are run in tree or not. Since we'll want to use this library both from net and drivers/net test targets make the library a target as well, and automatically include it when net or drivers/net are included. Making net/lib a target ensures that we end up with only one copy of it, and saves us some path guessing. Add a tiny bit of formatting support to be able to output KTAP from the start. Reviewed-by: Petr Machata <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
10 lines
251 B
Python
10 lines
251 B
Python
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
KSFT_DIR = (Path(__file__).parent / "../../..").resolve()
|
|
KSRC = (Path(__file__).parent / "../../../../../..").resolve()
|
|
|
|
KSFT_MAIN_NAME = Path(sys.argv[0]).with_suffix("").name
|