Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refine ten_runtime smoke test folder structure #436

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"request": "launch",
"program": "${workspaceFolder}/out/linux/x64/tests/standalone/ten_runtime_smoke_test",
"args": [
"--gtest_filter=PropertyTest.SetObject"
"--gtest_filter=PropertyTest.TwoExtensionsSetObject"
],
"cwd": "${workspaceFolder}/out/linux/x64/tests/standalone/",
"env": {
Expand Down
28 changes: 27 additions & 1 deletion tests/ten_runtime/smoke/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,41 @@ ten_executable("ten_runtime_smoke_test") {

deps += [
"audio_frame_test",
"basic",
"cmd_conversion",
"cmd_result_test",
"command",
"concurrent",
"data_test",
"extension_test",
"dest",
"engine",
"error",
"extension",
"extension_group",
"graph",
"graph_name",
"graph_test",
"lock",
"log_test",
"msg_property",
"msg_test",
"multi_dest",
"notify_test",
"outer_thread",
"path",
"predefined_graph",
"prepare_to_stop",
"property",
"resp_handler",
"result_conversion",
"return",
"same_thread_ext_on_xxx",
"standalone_test",
"start_graph",
"suspend_resume",
"ten_env_call_timing",
"ten_proxy",
"timer",
"video_frame_test",
]

Expand Down Expand Up @@ -77,6 +99,10 @@ ten_executable("ten_runtime_smoke_test") {
"//third_party/googlemock",
"//third_party/googletest",
]

if (ten_enable_libwebsockets && ten_enable_curl) {
deps += [ "http_server_extension" ]
}
}

group("smoke") {
Expand Down
2 changes: 1 addition & 1 deletion tests/ten_runtime/smoke/audio_frame_test/basic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "ten_runtime/msg/audio_frame/audio_frame.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down
2 changes: 1 addition & 1 deletion tests/ten_runtime/smoke/audio_frame_test/from_json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "ten_utils/lib/thread.h"
#include "ten_utils/macro/check.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

#define SAMPLE_RATE 16000
#define NUM_OF_CHANNELS 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
#include <nlohmann/json.hpp>
#include <string>
#include <thread>
#include <vector>

#include "gtest/gtest.h"
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "ten_utils/macro/macros.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

using namespace std::placeholders;

Expand Down Expand Up @@ -148,7 +147,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(

} // namespace

TEST(ExtensionTest, BasicExtensionsInitDependency) { // NOLINT
TEST(BasicTest, ExtensionsInitDependency) { // NOLINT
// Start app.
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -65,7 +65,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_hello_world_1__test_extension,

} // namespace

TEST(ExtensionTest, BasicHelloWorld1) { // NOLINT
TEST(BasicTest, HelloWorld1) { // NOLINT
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
//
#include <nlohmann/json.hpp>
#include <string>
#include <vector>

#include "gtest/gtest.h"
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -63,7 +62,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_hello_world_2__extension,

} // namespace

TEST(ExtensionTest, BasicHelloWorld2) { // NOLINT
TEST(BasicTest, HelloWorld2) { // NOLINT
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -108,7 +108,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_loop__extension_2, test_extension_2);

} // namespace

TEST(ExtensionTest, BasicLoop) { // NOLINT
TEST(BasicTest, Loop) { // NOLINT
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -114,7 +114,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_loop_cmd__extension_2,

} // namespace

TEST(ExtensionTest, BasicLoopCmd) { // NOLINT
TEST(BasicTest, LoopCmd) { // NOLINT
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -113,7 +113,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_loop_cmd_snapshot__extension_2,

} // namespace

TEST(ExtensionTest, BasicLoopCmdSnapShot) { // NOLINT
TEST(BasicTest, LoopCmdSnapShot) { // NOLINT
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "ten_utils/lib/thread.h"
#include "ten_utils/macro/check.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -85,7 +85,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(

} // namespace

TEST(ExtensionTest, BasicMsgPropertyToPropStore) { // NOLINT
TEST(BasicTest, MsgPropertyToPropStore) { // NOLINT
// Start app.
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "ten_utils/lib/time.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/common/constant.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -124,7 +124,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_multi_app__extension_2,

} // namespace

TEST(ExtensionTest, BasicMultiApp) { // NOLINT
TEST(BasicTest, MultiApp) { // NOLINT
ten_thread_t *app1_thread = nullptr;
ten_thread_t *app2_thread = nullptr;
std::unique_ptr<ten::msgpack_tcp_client_t> client = nullptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "ten_utils/lib/time.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/common/constant.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -123,7 +123,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(

} // namespace

TEST(ExtensionTest, BasicMultiAppCloseThroughEngine) { // NOLINT
TEST(BasicTest, MultiAppCloseThroughEngine) { // NOLINT
// Start app.
auto *app_thread_2 =
ten_thread_create("app thread 2", app_thread_2_main, nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
//
#include <nlohmann/json.hpp>
#include <string>
#include <vector>

#include "gtest/gtest.h"
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -78,7 +77,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_multi_extension__extension_2,

} // namespace

TEST(ExtensionTest, BasicMultiExtension) { // NOLINT
TEST(BasicTest, MultiExtension) { // NOLINT
// Start app.
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
//
#include <nlohmann/json.hpp>
#include <string>
#include <vector>

#include "gtest/gtest.h"
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -78,7 +77,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_multi_extension_group__extension_2,

} // namespace

TEST(ExtensionTest, BasicMultiExtensionGroup) { // NOLINT
TEST(BasicTest, MultiExtensionGroup) { // NOLINT
// Start app.
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -62,7 +62,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_no_init_extension_group__extension,

} // namespace

TEST(ExtensionTest, BasicNoInitExtensionGroup) { // NOLINT
TEST(BasicTest, NoInitExtensionGroup) { // NOLINT
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "ten_utils/lib/time.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/common/constant.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -166,7 +166,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(

} // namespace

TEST(ExtensionTest, BasicThrowExceptionInExtension) { // NOLINT
TEST(BasicTest, ThrowExceptionInExtension) { // NOLINT
// Start app.
auto *app_3_thread =
ten_thread_create("app thread 3", app_thread_3_main, nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -77,7 +77,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(basic_two_extensions__test_extension_2,

} // namespace

TEST(ExtensionTest, BasicTwoExtensions) { // NOLINT
TEST(BasicTest, TwoExtensions) { // NOLINT
// Start app.
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "include_internal/ten_runtime/binding/cpp/ten.h"
#include "ten_utils/lib/thread.h"
#include "tests/common/client/cpp/msgpack_tcp.h"
#include "tests/ten_runtime/smoke/extension_test/util/binding/cpp/check.h"
#include "tests/ten_runtime/smoke/util/binding/cpp/check.h"

namespace {

Expand Down Expand Up @@ -75,7 +75,7 @@ TEN_CPP_REGISTER_ADDON_AS_EXTENSION(

} // namespace

TEST(ExtensionTest, BasicTwoStandaloneExtension1) { // NOLINT
TEST(BasicTest, TwoStandaloneExtension1) { // NOLINT
// Start app.
auto *app_thread =
ten_thread_create("app thread", test_app_thread_main, nullptr);
Expand Down
Loading
Loading