mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 14:22:11 +02:00
Restoring manual tests to solution, removing dead tests
This commit is contained in:
parent
6e16109fa4
commit
f206456cdd
5 changed files with 9 additions and 96 deletions
|
@ -180,6 +180,7 @@ add_subdirectory(tools)
|
||||||
|
|
||||||
if (BUILD_TESTS)
|
if (BUILD_TESTS)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
|
add_subdirectory(tests-manual)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_INSTALLER)
|
if (BUILD_INSTALLER)
|
||||||
|
|
8
tests-manual/CMakeLists.txt
Normal file
8
tests-manual/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# add the manual test directories
|
||||||
|
file(GLOB TEST_SUBDIRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*")
|
||||||
|
foreach(DIR ${TEST_SUBDIRS})
|
||||||
|
if((IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${DIR}") AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${DIR}/CMakeLists.txt"))
|
||||||
|
set(TEST_PROJ_NAME ${DIR})
|
||||||
|
add_subdirectory(${DIR})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
|
@ -1,22 +0,0 @@
|
||||||
|
|
||||||
set(TARGET_NAME qt59)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4049 /ignore:4217")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
setup_memory_debugger()
|
|
||||||
|
|
||||||
# This is not a testcase -- just set it up as a regular hifi project
|
|
||||||
setup_hifi_project(Gui)
|
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
|
|
||||||
|
|
||||||
|
|
||||||
# link in the shared libraries
|
|
||||||
link_hifi_libraries(shared networking)
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
add_dependency_external_projects(wasapi)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
package_libraries_for_deployment()
|
|
|
@ -1,73 +0,0 @@
|
||||||
//
|
|
||||||
// Created by Bradley Austin Davis on 2017/06/06
|
|
||||||
// Copyright 2013-2017 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <mutex>
|
|
||||||
|
|
||||||
#include <QtCore/QCoreApplication>
|
|
||||||
|
|
||||||
#include <NodeList.h>
|
|
||||||
#include <AccountManager.h>
|
|
||||||
#include <AddressManager.h>
|
|
||||||
#include <MessagesClient.h>
|
|
||||||
|
|
||||||
#include <BuildInfo.h>
|
|
||||||
|
|
||||||
|
|
||||||
class Qt59TestApp : public QCoreApplication {
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
Qt59TestApp(int argc, char* argv[]);
|
|
||||||
~Qt59TestApp();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void finish(int exitCode);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Qt59TestApp::Qt59TestApp(int argc, char* argv[]) :
|
|
||||||
QCoreApplication(argc, argv)
|
|
||||||
{
|
|
||||||
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
|
||||||
DependencyManager::set<AccountManager>([&] { return QString("Mozilla/5.0 (HighFidelityACClient)"); });
|
|
||||||
DependencyManager::set<AddressManager>();
|
|
||||||
DependencyManager::set<NodeList>(NodeType::Agent, 0);
|
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
|
||||||
nodeList->startThread();
|
|
||||||
auto messagesClient = DependencyManager::set<MessagesClient>();
|
|
||||||
messagesClient->startThread();
|
|
||||||
QTimer::singleShot(1000, [this] { finish(0); });
|
|
||||||
}
|
|
||||||
|
|
||||||
Qt59TestApp::~Qt59TestApp() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Qt59TestApp::finish(int exitCode) {
|
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
|
||||||
|
|
||||||
// send the domain a disconnect packet, force stoppage of domain-server check-ins
|
|
||||||
nodeList->getDomainHandler().disconnect();
|
|
||||||
nodeList->setIsShuttingDown(true);
|
|
||||||
nodeList->getPacketReceiver().setShouldDropPackets(true);
|
|
||||||
|
|
||||||
// remove the NodeList from the DependencyManager
|
|
||||||
DependencyManager::destroy<NodeList>();
|
|
||||||
QCoreApplication::exit(exitCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
|
||||||
setupHifiApplication("Qt59Test");
|
|
||||||
|
|
||||||
Qt59TestApp app(argc, argv);
|
|
||||||
|
|
||||||
return app.exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "main.moc"
|
|
|
@ -1 +0,0 @@
|
||||||
# This folder contains code for testing the QML UI using Qt Creator. It is not intended to be included in the CMake project
|
|
Loading…
Reference in a new issue