Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kowalski <makowalski@nvidia.com>2022-04-17 00:32:48 +0300
committerRay Molenkamp <github@lazydodo.com>2022-04-17 00:32:48 +0300
commitb9f1b6480121e6f2102e887fb0f0cdc29622a1a3 (patch)
treeed1a414300478500df02517692ece7c9d7972271 /source/blender/io/usd/tests/usd_tests_common.h
parent98eb11156854e102a0405af1a64b2266eea22368 (diff)
USD/Ctest: Add basic USD-Imaging test.
This adds a basic unit test to check USD has been correctly build with imaging components to support building both with the old and new libs, it automatically adds the test when it detects a library with imaging enabled. (platform devs will have to pay attention it runs the test to validate the libs build correctly) For future use in the code it also defines a USD_HAS_IMAGING define one could check if we're building against an USD lib that has it (just because we build/ship with it, doesn't mean downstream builds will ship with it, so we'll have to be a little pro-active there) Reviewed By: sybren Differential Revision:https://developer.blender.org/D14456
Diffstat (limited to 'source/blender/io/usd/tests/usd_tests_common.h')
-rw-r--r--source/blender/io/usd/tests/usd_tests_common.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/io/usd/tests/usd_tests_common.h b/source/blender/io/usd/tests/usd_tests_common.h
new file mode 100644
index 00000000000..b298a253ddc
--- /dev/null
+++ b/source/blender/io/usd/tests/usd_tests_common.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2022 Blender Foundation. All rights reserved. */
+#pragma once
+
+#include <string>
+
+namespace blender::io::usd {
+
+/* Calls the function to load the USD plugins from the
+ * USD data directory under the Blender bin directory
+ * that was supplied as the --test-release-dir flag to ctest.
+ * Thus function must be called before instantiating a USD
+ * stage to avoid errors. The returned string is the path to
+ * the USD data files directory from which the plugins were
+ * loaded. If the USD data files directory can't be determined,
+ * plugin registration is skipped and the empty string is
+ * returned. */
+std::string register_usd_plugins_for_tests();
+
+} // namespace blender::io::usd