From 9a8b3e97477f1621d8dc5a968217e4b44eaf59a8 Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Fri, 3 Apr 2020 14:55:26 -0600 Subject: [PATCH] move out of tests/ --- Makefile | 2 +- tests/errors/main.cc => src/error-demo/error-demo.cc | 6 +++--- src/error-demo/local.mk | 10 ++++++++++ tests/errors/local.mk | 10 ---------- 4 files changed, 14 insertions(+), 14 deletions(-) rename tests/errors/main.cc => src/error-demo/error-demo.cc (95%) create mode 100644 src/error-demo/local.mk delete mode 100644 tests/errors/local.mk diff --git a/Makefile b/Makefile index 2d70aeb27..4fac27c47 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ makefiles = \ doc/manual/local.mk \ tests/local.mk \ tests/plugins/local.mk \ - tests/errors/local.mk + src/error-demo/local.mk -include Makefile.config diff --git a/tests/errors/main.cc b/src/error-demo/error-demo.cc similarity index 95% rename from tests/errors/main.cc rename to src/error-demo/error-demo.cc index cd6ca7caf..8fb20d38c 100644 --- a/tests/errors/main.cc +++ b/src/error-demo/error-demo.cc @@ -1,5 +1,5 @@ -#include "../../src/libutil/error.hh" -#include "../../src/libexpr/nixexpr.hh" +#include "error.hh" +#include "nixexpr.hh" #include #include @@ -9,7 +9,7 @@ int main() using namespace nix; // In each program where errors occur, this has to be set. - ErrorInfo::programName = std::optional("error-test"); + ErrorInfo::programName = std::optional("error-demo"); // There are currently four error types: // diff --git a/src/error-demo/local.mk b/src/error-demo/local.mk new file mode 100644 index 000000000..121cab9e3 --- /dev/null +++ b/src/error-demo/local.mk @@ -0,0 +1,10 @@ +programs += error-demo + +error-demo_DIR := $(d) + +error-demo_SOURCES := \ + $(wildcard $(d)/*.cc) \ + +error-demo_LIBS = libutil + +error-demo_LDFLAGS = -pthread $(SODIUM_LIBS) $(EDITLINE_LIBS) $(BOOST_LDFLAGS) -lboost_context -lboost_thread -lboost_system diff --git a/tests/errors/local.mk b/tests/errors/local.mk deleted file mode 100644 index 0d64c8dbd..000000000 --- a/tests/errors/local.mk +++ /dev/null @@ -1,10 +0,0 @@ -programs += error-test - -error-test_DIR := $(d) - -error-test_SOURCES := \ - $(wildcard $(d)/*.cc) \ - -error-test_LIBS = libutil - -error-test_LDFLAGS = -pthread $(SODIUM_LIBS) $(EDITLINE_LIBS) $(BOOST_LDFLAGS) -lboost_context -lboost_thread -lboost_system