Skip to content

Commit

Permalink
remove unused tests (#1057)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomadamatkinson committed Jun 3, 2024
1 parent ef01d2e commit c6844fa
Show file tree
Hide file tree
Showing 21 changed files with 13 additions and 1,041 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/external.yml

This file was deleted.

5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ add_subdirectory(components)
# Add vulkan framework
add_subdirectory(framework)

if(VKB_BUILD_TESTS)
# Add vulkan tests
add_subdirectory(tests)
endif()

if(VKB_BUILD_SAMPLES)
# Add vulkan samples
add_subdirectory(samples)
Expand Down
25 changes: 4 additions & 21 deletions app/apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,8 @@ foreach(SAMPLE_ID ${TOTAL_SAMPLE_ID_LIST})
endif()
endforeach()

set(TEST_INCLUDE_FILES)
set(TEST_INFO_LIST)
set(TEST_APP_INFO_LIST)

foreach(TEST_ID ${TOTAL_TEST_ID_LIST})
if (TARGET ${TEST_ID})
list(APPEND TEST_INCLUDE_FILES "#include \"${TEST_ID}/${TEST_ID}.h\"")
list(APPEND TEST_INFO_LIST "\tTestInfo{ \"${TEST_ID}\", create_${TEST_ID}_test },")
list(APPEND APP_INFO_LIST "\tAppInfo{ \"${TEST_ID}\", create_${TEST_ID}_test },")
endif()
endforeach()

list(JOIN SAMPLE_INCLUDE_FILES "\n" SAMPLE_INCLUDE_FILES)
list(JOIN SAMPLE_INFO_LIST "\n" SAMPLE_INFO_LIST)
list(JOIN TEST_INCLUDE_FILES "\n" TEST_INCLUDE_FILES)
list(JOIN TEST_INFO_LIST "\n" TEST_INFO_LIST)
list(JOIN TEST_APP_INFO_LIST "\n" TEST_APP_INFO_LIST)
list(JOIN APP_INFO_LIST "\n" APP_INFO_LIST)

configure_file(apps.cpp.in apps.cpp)
Expand All @@ -79,12 +64,10 @@ add_library(${PROJECT_NAME} STATIC ${SRC})
target_link_libraries(${PROJECT_NAME} PUBLIC framework)
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/samples
${CMAKE_SOURCE_DIR}/tests/system_test/sub_tests
${CMAKE_SOURCE_DIR}/tests/system_test/test_framework)
${CMAKE_SOURCE_DIR}/samples)

# Link all samples and tests
set(PROJECT_ID_LIST ${TOTAL_SAMPLE_ID_LIST} ${TOTAL_TEST_ID_LIST})
# Link all samples
set(PROJECT_ID_LIST ${TOTAL_SAMPLE_ID_LIST})
foreach(ID ${PROJECT_ID_LIST})
if(TARGET ${ID})
get_target_property(TARGET_TYPE ${ID} TYPE)
Expand All @@ -105,4 +88,4 @@ if (IOS)
"-framework IOKit"
"-framework IOSurface"
)
endif ()
endif ()
22 changes: 2 additions & 20 deletions app/apps/apps.cpp.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2021, Arm Limited and Contributors
/* Copyright (c) 2020-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand All @@ -20,8 +20,6 @@

@SAMPLE_INCLUDE_FILES@

@TEST_INCLUDE_FILES@

namespace apps
{
std::vector<AppInfo> apps = {
Expand All @@ -32,10 +30,6 @@ std::vector<SampleInfo> samples = {
@SAMPLE_INFO_LIST@
};

std::vector<TestInfo> tests = {
@TEST_INFO_LIST@
};

AppInfo *get_app(const std::string &id)
{
for (auto &app : apps)
Expand Down Expand Up @@ -125,16 +119,4 @@ SampleInfo * get_sample(const std::string &id) {
return nullptr;
}

std::vector<AppInfo *> get_tests()
{
std::vector<AppInfo *> app_ptrs;

for (auto &app : tests)
{
app_ptrs.push_back(&app);
}

return app_ptrs;
}

} // namespace apps
} // namespace apps
33 changes: 7 additions & 26 deletions app/apps/apps.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020-2021, Arm Limited and Contributors
/* Copyright (c) 2020-2024, Arm Limited and Contributors
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -29,7 +29,7 @@
*
* Vulkan Samples currently has two types of apps, Samples and Tests. These apps work from the same interface AppInfo.
* Samples and Tests are categorised into namespaces samples and tests respectively. Each name space has a method to retrieve
* the AppInfo interface version of the app (tests::get_apps, samples::get_apps).
* the AppInfo interface version of the app (tests::get_apps, samples::get_apps).
*
*/

Expand Down Expand Up @@ -70,48 +70,29 @@ class SampleInfo : public AppInfo
std::vector<std::string> tags;
};

/*
* Tests - Used to test Vulkan Samples functionality
*/

class TestInfo : public AppInfo
{
public:
TestInfo(const std::string &id, const CreateFunc &create) :
AppInfo(id, create)
{}
};

/**
* @brief Get a specific app
*
*
* @param id ID of a specific app
* @return const std::vector<AppInfo *>
* @return const std::vector<AppInfo *>
*/
AppInfo *get_app(const std::string &id);

/**
* @brief Get all apps
*
*
* @return const std::vector<AppInfo *> A list of all apps
*/
std::vector<AppInfo *> get_apps();

/**
* @brief Get all samples
*
*
* @param categories If not empty the lists will include samples that match on of the categories requested
* @param tags If not empty the lists will include samples that match on of the tags requested
* @return std::vector<AppInfo *> A list of samples
*/
std::vector<AppInfo *> get_samples(const std::vector<std::string> &categories = {}, const std::vector<std::string> &tags = {});

SampleInfo *get_sample(const std::string &id);

/**
* @brief Get all tests
*
* @return std::vector<AppInfo *> A list of Tests
*/
std::vector<AppInfo *> get_tests();
} // namespace apps
} // namespace apps
22 changes: 0 additions & 22 deletions tests/CMakeLists.txt

This file was deleted.

36 changes: 0 additions & 36 deletions tests/external_project/CMakeLists.txt

This file was deleted.

100 changes: 0 additions & 100 deletions tests/generate_sample/generate_sample_test.py

This file was deleted.

Loading

0 comments on commit c6844fa

Please sign in to comment.