From d0d775a23dbd38bab5421204fc88f280b0d853bf Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 21 Aug 2018 22:28:43 +0200 Subject: [PATCH] Experiments with pipe tests --- source/tests/CarlaPipeUtils.cpp | 22 ++++++++++++++++++---- source/tests/Makefile | 15 +++++++++++++-- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/source/tests/CarlaPipeUtils.cpp b/source/tests/CarlaPipeUtils.cpp index 6a69a2ab2..7a5468fce 100644 --- a/source/tests/CarlaPipeUtils.cpp +++ b/source/tests/CarlaPipeUtils.cpp @@ -1,6 +1,6 @@ /* * Carla Utility Tests - * Copyright (C) 2013-2016 Filipe Coelho + * Copyright (C) 2013-2018 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -16,7 +16,7 @@ */ #include "CarlaPipeUtils.hpp" -#include "juce_core/juce_core.h" +#include "../modules/water/files/File.h" // ----------------------------------------------------------------------- @@ -65,21 +65,30 @@ int main(int argc, const char* argv[]) p.unlockPipe(); carla_msleep(500); + carla_stderr2("CLIENT idle start"); std::fflush(stdout); + p.idlePipe(); + carla_stderr2("CLIENT idle end"); std::fflush(stdout); + carla_msleep(500); } else { carla_stdout("SERVER STARTED %i", argc); + std::fflush(stdout); - using juce::File; - using juce::String; + using water::File; + using water::String; String path = File(File::getSpecialLocation(File::currentExecutableFile)).getFullPathName(); +#ifdef CARLA_OS_WINDOWS + path = "wine " + path; +#endif + CarlaPipeServer2 p; const bool ok = p.startPipeServer(path.toRawUTF8(), "/home/falktx/Videos", "/home/falktx"); CARLA_SAFE_ASSERT_RETURN(ok,1); @@ -89,9 +98,14 @@ int main(int argc, const char* argv[]) p.unlockPipe(); carla_msleep(500); + carla_stderr2("SERVER idle start"); + std::fflush(stdout); + p.idlePipe(); carla_stderr2("SERVER idle end"); + std::fflush(stdout); + carla_msleep(500); } diff --git a/source/tests/Makefile b/source/tests/Makefile index 4a6605e1f..ef8c2a1e9 100644 --- a/source/tests/Makefile +++ b/source/tests/Makefile @@ -10,22 +10,33 @@ CLANG ?= clang CXXLANG ?= clang++ MODULEDIR=../../build/modules/Debug +MODULEDIR=../../build/modules/Release WINECXX ?= wineg++ # -------------------------------------------------------------- -BASE_FLAGS = -Wall -Wextra -Werror -pipe -DBUILDING_CARLA -DREAL_BUILD -DDEBUG -O0 -g +BASE_FLAGS = -Wall -Wextra -Werror -pipe -DBUILDING_CARLA -DREAL_BUILD BASE_FLAGS += -I. -I../backend -I../includes -I../modules -I../utils BASE_FLAGS += -Wcast-align -Wmissing-declarations # BASE_FLAGS += -Wcast-qual -Wconversion -Wsign-conversion -Wundef BASE_FLAGS += -Wformat -Wformat-security -Wredundant-decls -Wshadow -Wstrict-overflow -fstrict-overflow -Wwrite-strings BASE_FLAGS += -Wpointer-arith -Wabi -Winit-self -Wuninitialized -Wunused-parameter # -Wfloat-equal + +LINK_FLAGS = + ifneq ($(CC),clang-3.4) BASE_FLAGS += -Wlogical-op -Wunsafe-loop-optimizations endif +ifeq ($(DEBUG),true) +BASE_FLAGS += -DDEBUG -O0 -g +else +BASE_FLAGS += -O3 -ffast-math -mtune=generic -msse -msse2 -mfpmath=sse -fdata-sections -ffunction-sections +LINK_FLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed -Wl,--strip-all +endif + # -------------------------------------------------------------- ANSI_FLAGS = $(BASE_FLAGS) -DBUILD_ANSI_TEST @@ -136,7 +147,7 @@ ifneq ($(WIN32),true) endif CarlaPipeUtils.exe: CarlaPipeUtils.cpp ../utils/CarlaPipeUtils.cpp - $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(MODULEDIR)/juce_core.a -lole32 -lshlwapi -lversion -lwsock32 -lwininet -lwinmm -lws2_32 -lpthread + $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@ $(MODULEDIR)/water.a -lole32 -lshlwapi -lversion -lwsock32 -lwininet -lwinmm -lws2_32 -lpthread -static CarlaUtils1: CarlaUtils1.cpp ../utils/*.hpp $(CXX) $< $(PEDANTIC_CXX_FLAGS) -o $@