From ce46b82d0323fc54c387fb2e3c8c6f1813834189 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 20 Jul 2015 23:26:02 +0100 Subject: Switch to run rule for capturing output, undate paths in tests --- slicer/test/Jamfile.jam | 24 +++++++++++++++--------- slicer/test/fileStructure.cpp | 8 ++++++-- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/slicer/test/Jamfile.jam b/slicer/test/Jamfile.jam index cd3a8eb..aac9662 100644 --- a/slicer/test/Jamfile.jam +++ b/slicer/test/Jamfile.jam @@ -24,6 +24,8 @@ lib types : included//included ; +path-constant me : . ; + lib common : helpers.cpp conversions.cpp @@ -36,6 +38,7 @@ lib common : boost_filesystem boost_utf types + ROOT=\"$(me)\" : : types boost_filesystem @@ -46,20 +49,20 @@ lib common : types ; -unit-test preprocess : - preprocessor.cpp - : +run preprocessor.cpp + : : : -rdynamic dl common .. ../slicer//slicer ../tool//slicer + : + preprocess ; -unit-test compilation : - compilation.cpp - : +run compilation.cpp + : : : .. ../slicer//slicer types @@ -68,11 +71,12 @@ unit-test compilation : common .. ../slicer//slicer + : + compilation ; -unit-test serializers : - serializers.cpp - : +run serializers.cpp + : : : preprocess slicer-test common @@ -80,5 +84,7 @@ unit-test serializers : ../slicer//slicer ../xml//slicer-xml ../json//slicer-json + : + serializers ; diff --git a/slicer/test/fileStructure.cpp b/slicer/test/fileStructure.cpp index 7152e7b..0d27ce1 100644 --- a/slicer/test/fileStructure.cpp +++ b/slicer/test/fileStructure.cpp @@ -2,11 +2,15 @@ #include #include +#define XSTR(s) STR(s) +#define STR(s) #s +const boost::filesystem::path root(XSTR(ROOT)); + FileStructure::FileStructure() : me(boost::filesystem::canonical("/proc/self/exe")), base("types"), - bjamout(me.parent_path().parent_path().parent_path().leaf() / me.parent_path().parent_path().leaf() / me.parent_path().leaf()), - root(me.parent_path().parent_path().parent_path().parent_path()), + bjamout("bin" / me.parent_path().parent_path().leaf() / me.parent_path().leaf()), + root(::root), included(root / "included"), slice(fs::change_extension(root / base, ".ice")), tmp(root / "bin" / "slicer") -- cgit v1.2.3