Browse Source

tests: create subdir "framework"

LIB-12
heck 1 year ago
parent
commit
07b4ee6e97
12 changed files with 51 additions and 37 deletions
  1. +1
    -1
      src/Makefile
  2. +2
    -0
      src/adapter_group.h
  3. +13
    -6
      test/Makefile
  4. +3
    -3
      test/framework/framework.cc
  5. +2
    -2
      test/framework/framework.hh
  6. +4
    -3
      test/test_adapter.cc
  7. +3
    -3
      test/test_adapter_cxx.cc
  8. +6
    -6
      test/test_ensure_passphrase.cc
  9. +5
    -4
      test/test_leave_device_group.cc
  10. +5
    -3
      test/test_message_cache.cc
  11. +5
    -5
      test/test_passphrase_cache.cc
  12. +2
    -1
      test/test_semaphore.cc

+ 1
- 1
src/Makefile View File

@ -6,7 +6,7 @@
include ../Makefile.conf
SOURCE=$(wildcard *.cc)
HEADERS=$(wildcard *.hh *.hxx)
HEADERS=$(wildcard *.hh *.hxx *.h)
OBJECTS=$(subst .cc,.o,$(SOURCE))
DEPENDS=$(subst .cc,.d,$(SOURCE))
CXXFLAGS+= -MMD -MP


+ 2
- 0
src/adapter_group.h View File

@ -4,6 +4,8 @@
#ifndef LIBPEPADAPTER_GROUP_HH
#define LIBPEPADAPTER_GROUP_HH
#include <pEp/message_api.h>
#include <pEp/group.h>
#ifdef __cplusplus
extern "C" {


+ 13
- 6
test/Makefile View File

@ -3,17 +3,24 @@ include ../Makefile.conf
LDFLAGS=-L../src $(ENGINE_LIB)
LDLIBS=-lstdc++ -lpEpEngine -lpEpAdapter
CXXFLAGS:=-I../src -DENGINE_TEST=$(ENGINE_TEST) $(CXXFLAGS)
SRC=$(wildcard test_*.cc)
TST=$(subst .cc,,$(SRC))
all: $(TST)
SRC_TEST=$(wildcard test_*.cc)
BIN_TEST=$(subst .cc,,$(SRC_TEST))
$(TST): framework.o
SRC_FRAMEWORK=$(wildcard framework/*.cc)
OBJ_FRAMEWORK=$(subst .cc,.o,$(SRC_FRAMEWORK))
.PHONY: all clean rmtestdata
all: $(BIN_TEST)
$(BIN_TEST): $(OBJ_FRAMEWORK)
.PHONY: clean rmtestdata
clean:
rm -f $(TST)
rm -f $(BIN_TEST)
rm -f $(OBJ_FRAMEWORK)
rm -Rf *.dSYM
rm -f *.o
rm -Rf /tmp/test_pEp.*


test/framework.cc → test/framework/framework.cc View File


test/framework.hh → test/framework/framework.hh View File


+ 4
- 3
test/test_adapter.cc View File

@ -1,18 +1,19 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "framework.hh"
#include "framework/framework.hh"
#include <iostream>
#include <assert.h>
#include <unistd.h>
#include <sys/param.h>
#include <pEpLog.hh>
#include <Adapter.hh>
#include <pEp/sync_api.h>
#include <pEp/keymanagement.h>
#include <pEp/message_api.h>
#include "../src/pEpLog.hh"
#include "../src/Adapter.hh"
using namespace std;
using namespace pEp;


+ 3
- 3
test/test_adapter_cxx.cc View File

@ -1,16 +1,16 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "framework.hh"
#include "framework/framework.hh"
#include <iostream>
#include <assert.h>
#include <unistd.h>
#include <pEp/keymanagement.h>
#include <pEpLog.hh>
#include <pEp/sync_api.h>
#include <Adapter.hh>
#include "../src/Adapter.hh"
#include "../src/pEpLog.hh"
using namespace pEp;


+ 6
- 6
test/test_ensure_passphrase.cc View File

@ -1,6 +1,8 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "framework/framework.hh"
#include <iostream>
#include <fstream>
#include <sstream>
@ -10,16 +12,14 @@
#include <string.h>
#include <sys/param.h>
#include "framework.hh"
#include <passphrase_cache.hh>
#include <status_to_string.hh>
#include <Adapter.hh>
#include <pEp/message_api.h>
#include <pEp/keymanagement.h>
#include <pEp/key_reset.h>
#include "../src/passphrase_cache.hh"
#include "../src/status_to_string.hh"
#include "../src/Adapter.hh"
using namespace pEp;
using namespace std;


+ 5
- 4
test/test_leave_device_group.cc View File

@ -1,16 +1,17 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "framework/framework.hh"
#include <iostream>
#include <vector>
#include <unistd.h>
#include "framework.hh"
#include <passphrase_cache.hh>
#include <callback_dispatcher.hh>
#include <pEp/sync_api.h>
#include "../src/callback_dispatcher.hh"
#include "../src/passphrase_cache.hh"
using namespace std;
using namespace pEp;


+ 5
- 3
test/test_message_cache.cc View File

@ -1,13 +1,15 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "framework.hh"
#include "framework/framework.hh"
#include <iostream>
#include <cassert>
#include <sys/param.h>
#include <unistd.h>
#include <message_cache.hh>
#include <Adapter.hh>
#include "../src/message_cache.hh"
#include "../src/Adapter.hh"
using namespace std;
using namespace pEp;


+ 5
- 5
test/test_passphrase_cache.cc View File

@ -1,16 +1,16 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include "framework.hh"
#include "framework/framework.hh"
#include <iostream>
#include <unistd.h>
#include <assert.h>
#include <sys/param.h>
#include <passphrase_cache.hh>
#include <status_to_string.hh>
#include <Adapter.hh>
#include "../src/passphrase_cache.hh"
#include "../src/status_to_string.hh"
#include "../src/Adapter.hh"
using namespace pEp;


+ 2
- 1
test/test_semaphore.cc View File

@ -4,7 +4,8 @@
#include <iostream>
#include <thread>
#include <unistd.h>
#include "Semaphore.hh"
#include "../src/Semaphore.hh"
using namespace std;
using namespace pEp;


Loading…
Cancel
Save