summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-12-17 02:21:48 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-12-17 02:21:48 +0000
commit1e2910a5cf0f90fe780d78a02c1b7b074e622961 (patch)
tree5fffeae058e73b409219778067bc63c3bcac5be9
parentSwitch lib64 references for native ones (diff)
downloadslicer-1e2910a5cf0f90fe780d78a02c1b7b074e622961.tar.bz2
slicer-1e2910a5cf0f90fe780d78a02c1b7b074e622961.tar.xz
slicer-1e2910a5cf0f90fe780d78a02c1b7b074e622961.zip
Use definedDirs improvements to fix test behaviour
-rw-r--r--slicer/test/fileStructure.cpp11
-rw-r--r--slicer/test/fileStructure.h4
2 files changed, 6 insertions, 9 deletions
diff --git a/slicer/test/fileStructure.cpp b/slicer/test/fileStructure.cpp
index 0d27ce1..53b3c2d 100644
--- a/slicer/test/fileStructure.cpp
+++ b/slicer/test/fileStructure.cpp
@@ -1,16 +1,13 @@
#include "fileStructure.h"
#include <boost/test/unit_test.hpp>
#include <boost/filesystem/convenience.hpp>
-
-#define XSTR(s) STR(s)
-#define STR(s) #s
-const boost::filesystem::path root(XSTR(ROOT));
+#include <definedDirs.h>
FileStructure::FileStructure() :
- me(boost::filesystem::canonical("/proc/self/exe")),
+ me(selfExe),
base("types"),
- bjamout("bin" / me.parent_path().parent_path().leaf() / me.parent_path().leaf()),
- root(::root),
+ bjamout("bin" / buildVariant),
+ root(rootDir),
included(root / "included"),
slice(fs::change_extension(root / base, ".ice")),
tmp(root / "bin" / "slicer")
diff --git a/slicer/test/fileStructure.h b/slicer/test/fileStructure.h
index ac38637..e19f95c 100644
--- a/slicer/test/fileStructure.h
+++ b/slicer/test/fileStructure.h
@@ -11,10 +11,10 @@ class FileStructure {
~FileStructure();
protected:
- const fs::path me;
+ const fs::path & me;
const fs::path base;
const fs::path bjamout;
- const fs::path root;
+ const fs::path & root;
const fs::path included;
const fs::path slice;
const fs::path tmp;