Skip to content

Commit

Permalink
finished renames
Browse files Browse the repository at this point in the history
  • Loading branch information
mattelser committed Sep 26, 2023
1 parent 7796442 commit ec00124
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 28 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,12 @@ install(
EXCLUDE_FROM_ALL)

install(
TARGETS cesium.omniverse.tests.plugin
TARGETS cesium.omniverse.cpp.tests.plugin
ARCHIVE DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install
LIBRARY DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install
RUNTIME DESTINATION ${KIT_EXTENSION_TESTS_BIN_PATH} COMPONENT install)
install(
TARGETS cesium.omniverse.tests.plugin
TARGETS cesium.omniverse.cpp.tests.plugin
RUNTIME_DEPENDENCIES
DIRECTORIES
${INSTALL_SEARCH_PATHS}
Expand All @@ -694,13 +694,13 @@ install(
EXCLUDE_FROM_ALL)

install(
TARGETS CesiumOmniverseTestsPythonBindings
TARGETS CesiumOmniverseCppTestsPythonBindings
ARCHIVE DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install
LIBRARY DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install
RUNTIME DESTINATION ${KIT_EXTENSION_TESTS_BINDINGS_PATH} COMPONENT install)

install(
TARGETS CesiumOmniverseTestsPythonBindings
TARGETS CesiumOmniverseCppTestsPythonBindings
RUNTIME_DEPENDENCIES
DIRECTORIES
${INSTALL_SEARCH_PATHS}
Expand Down
2 changes: 1 addition & 1 deletion apps/cesium.omniverse.cpp.tests.runner.kit
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ app = true

[dependencies]
"cesium.omniverse.dev" = {}
"cesium.omniverse.tests" = {}
"cesium.omniverse.cpp.tests" = {}

[settings]
app.window.title = "Cesium for Omniverse Tests App"
Expand Down
4 changes: 2 additions & 2 deletions cesiumOmniverseCppTestsExtension/bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ setup_python_module(
# Use the same Python version as Omniverse (Python 3.10)
"${PROJECT_SOURCE_DIR}/extern/nvidia/_build/target-deps/python"
TARGET_NAME
CesiumOmniverseTestsPythonBindings
CesiumOmniverseCppTestsPythonBindings
SOURCES
${SOURCES}
LIBRARIES
cesium.omniverse.tests.plugin
cesium.omniverse.cpp.tests.plugin
CXX_FLAGS
${CESIUM_OMNI_CXX_FLAGS}
CXX_FLAGS_DEBUG
Expand Down
20 changes: 10 additions & 10 deletions cesiumOmniverseCppTestsExtension/bindings/PythonBindings.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#include "CesiumOmniverseTests.h"
#include "CesiumOmniverseCppTests.h"

#include <carb/BindingsPythonUtils.h>

// NOLINTNEXTLINE
CARB_BINDINGS("cesium.omniverse.tests.python")
DISABLE_PYBIND11_DYNAMIC_CAST(cesium::omniverse::tests::ICesiumOmniverseTestsInterface)
CARB_BINDINGS("cesium.omniverse.cpp.tests.python")
DISABLE_PYBIND11_DYNAMIC_CAST(cesium::omniverse::tests::ICesiumOmniverseCppTestsInterface)

PYBIND11_MODULE(CesiumOmniverseTestsPythonBindings, m) {
PYBIND11_MODULE(CesiumOmniverseCppTestsPythonBindings, m) {

using namespace cesium::omniverse::tests;

m.doc() = "pybind11 cesium.omniverse.tests bindings";
m.doc() = "pybind11 cesium.omniverse.cpp.tests bindings";

// clang-format off
carb::defineInterfaceClass<ICesiumOmniverseTestsInterface>(
m, "ICesiumOmniverseTestsInterface", "acquire_cesium_omniverse_tests_interface", "release_cesium_omniverse_tests_interface")
.def("run_all_tests", &ICesiumOmniverseTestsInterface::run_all_tests)
.def("on_startup", &ICesiumOmniverseTestsInterface::onStartup)
.def("on_shutdown", &ICesiumOmniverseTestsInterface::onShutdown);
carb::defineInterfaceClass<ICesiumOmniverseCppTestsInterface>(
m, "ICesiumOmniverseCppTestsInterface", "acquire_cesium_omniverse_tests_interface", "release_cesium_omniverse_tests_interface")
.def("run_all_tests", &ICesiumOmniverseCppTestsInterface::run_all_tests)
.def("on_startup", &ICesiumOmniverseCppTestsInterface::onStartup)
.def("on_shutdown", &ICesiumOmniverseCppTestsInterface::onShutdown);
// clang-format on
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace cesium::omniverse::tests {

class ICesiumOmniverseTestsInterface {
class ICesiumOmniverseCppTestsInterface {
public:
CARB_PLUGIN_INTERFACE("cesium::omniverse::tests::ICesiumOmniverseTestsInterface", 0, 0);
CARB_PLUGIN_INTERFACE("cesium::omniverse::tests::ICesiumOmniverseCppTestsInterface", 0, 0);
/**
* @brief Call this on extension startup.
*
Expand Down
4 changes: 2 additions & 2 deletions cesiumOmniverseCppTestsExtension/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ get_property(ADDITIONAL_LIBRARIES GLOBAL PROPERTY NVIDIA_ADDITIONAL_LIBRARIES_PR
# cmake-format: off
setup_lib(
TARGET_NAME
cesium.omniverse.tests.plugin
cesium.omniverse.cpp.tests.plugin
TYPE
# Carbonite Plugins needs to be shared libraries
SHARED
SOURCES
${SOURCES}
INCLUDE_DIRS
"${PROJECT_SOURCE_DIR}/cesiumOmniverseTestsExtension/include"
"${PROJECT_SOURCE_DIR}/cesiumOmniverseCppTestsExtension/include"
LIBRARIES
CesiumOmniverseCore
doctest::doctest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS

#include "CesiumOmniverseTests.h"
#include "CesiumOmniverseCppTests.h"

#include "cesium/omniverse/Context.h"
#include "cesium/omniverse/LoggerSink.h"
Expand Down Expand Up @@ -52,7 +52,7 @@ static void handler(const doctest::AssertData& ad) {

namespace cesium::omniverse::tests {

class CesiumOmniverseTestsPlugin final : public ICesiumOmniverseTestsInterface {
class CesiumOmniverseCppTestsPlugin final : public ICesiumOmniverseCppTestsInterface {
public:
void onStartup(const char* cesiumExtensionLocation) noexcept override {
Context::onStartup(cesiumExtensionLocation);
Expand Down Expand Up @@ -85,15 +85,15 @@ class CesiumOmniverseTestsPlugin final : public ICesiumOmniverseTestsInterface {
} // namespace cesium::omniverse::tests

const struct carb::PluginImplDesc pluginImplDesc = {
"cesium.omniverse.tests.plugin",
"cesium.omniverse.cpp.tests.plugin",
"Cesium Omniverse Tests Plugin.",
"Cesium",
carb::PluginHotReload::eDisabled,
"dev"};

// NOLINTBEGIN
CARB_PLUGIN_IMPL(pluginImplDesc, cesium::omniverse::tests::CesiumOmniverseTestsPlugin)
CARB_PLUGIN_IMPL(pluginImplDesc, cesium::omniverse::tests::CesiumOmniverseCppTestsPlugin)
CARB_PLUGIN_IMPL_DEPS(omni::fabric::IFabric, omni::fabric::IStageReaderWriter)
// NOLINTEND

void fillInterface([[maybe_unused]] cesium::omniverse::tests::CesiumOmniverseTestsPlugin& iface) {}
void fillInterface([[maybe_unused]] cesium::omniverse::tests::CesiumOmniverseCppTestsPlugin& iface) {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class ICesiumOmniverseCppTestsInterface:
def __init__(self, *args, **kwargs) -> None: ...
def on_shutdown(self) -> None: ...
def on_startup(self, arg0: str) -> None: ...
def run_all_tests(self, arg0: int) -> None: ...

def acquire_cesium_omniverse_tests_interface(
plugin_name: str = ..., library_path: str = ...
) -> ICesiumOmniverseCppTestsInterface: ...
def release_cesium_omniverse_tests_interface(arg0: ICesiumOmniverseCppTestsInterface) -> None: ...
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .CesiumOmniverseTestsPythonBindings import * # noqa: F401 F403
from .CesiumOmniverseCppTestsPythonBindings import * # noqa: F401 F403
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .bindings import acquire_cesium_omniverse_tests_interface, release_cesium_omniverse_tests_interface


class CesiumOmniverseTestsExtension(omni.ext.IExt):
class CesiumOmniverseCppTestsExtension(omni.ext.IExt):
def __init__(self):
super().__init__()

Expand Down

0 comments on commit ec00124

Please sign in to comment.