mirror of
https://github.com/andreinechaev/nvcc4jupyter.git
synced 2026-06-15 11:40:48 +05:30
Mock the nsight compute tool with a bash script
This commit is contained in:
Vendored
+5
@@ -27,6 +27,11 @@ def fixtures_path(tests_path):
|
||||
return os.path.join(tests_path, "fixtures")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def scripts_path(fixtures_path: str):
|
||||
return os.path.join(fixtures_path, "scripts")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def compiler_cpp_17_fpath(fixtures_path: str):
|
||||
return os.path.join(fixtures_path, "compiler", "cpp_17.cu")
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# this is a mock of nsight compute cli tool that just executes the program
|
||||
# given as the last argument
|
||||
"${@: -1}"
|
||||
|
||||
echo "==WARNING== No kernels were profiled"
|
||||
@@ -37,6 +37,11 @@ def copy_source_to_group(
|
||||
return destination_fpath
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope="session")
|
||||
def before_all(scripts_path: str):
|
||||
os.environ["PATH"] = scripts_path + os.pathsep + os.environ["PATH"]
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope="function")
|
||||
def before_each(plugin: NVCCPlugin):
|
||||
shutil.rmtree(plugin.workdir, ignore_errors=True) # before test
|
||||
|
||||
Reference in New Issue
Block a user