summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/test/Jamfile.jam1
-rw-r--r--slicer/test/fileStructure.cpp2
-rw-r--r--slicer/test/preprocessor.cpp11
3 files changed, 10 insertions, 4 deletions
diff --git a/slicer/test/Jamfile.jam b/slicer/test/Jamfile.jam
index dde7362..b4e1046 100644
--- a/slicer/test/Jamfile.jam
+++ b/slicer/test/Jamfile.jam
@@ -51,6 +51,7 @@ unit-test preprocess :
<library>common
<include>..
<library>../slicer//slicer
+ <dependency>../tool//slicer
;
unit-test compilation :
diff --git a/slicer/test/fileStructure.cpp b/slicer/test/fileStructure.cpp
index 28d1229..99f7165 100644
--- a/slicer/test/fileStructure.cpp
+++ b/slicer/test/fileStructure.cpp
@@ -5,7 +5,7 @@
FileStructure::FileStructure() :
me(boost::filesystem::canonical("/proc/self/exe")),
base("types"),
- bjamout(me.parent_path()),
+ 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()),
slice(fs::change_extension(root / base, ".ice")),
tmp(root / "bin" / "slicer")
diff --git a/slicer/test/preprocessor.cpp b/slicer/test/preprocessor.cpp
index fa65a44..8b4876a 100644
--- a/slicer/test/preprocessor.cpp
+++ b/slicer/test/preprocessor.cpp
@@ -51,12 +51,17 @@ BOOST_AUTO_TEST_CASE( slicer_test_ice )
const fs::path cpp = fs::change_extension(tmp / base, ".cpp");
BOOST_TEST_CHECKPOINT("cpp: " << cpp);
fs::remove(cpp);
- Slicer::Slicer::Apply(slice, cpp);
+ const std::string doslice = stringbf(
+ "%s %s %s",
+ root.parent_path() / "tool" / bjamout / "slicer",
+ slice, cpp);
+ BOOST_TEST_CHECKPOINT("slicer: " << doslice);
+ system(doslice);
const fs::path obj = fs::change_extension(tmp / base, ".o");
const std::string compile = stringbf(
"g++ -Os -fPIC -c -std=c++0x -I tmp -I /usr/include/Ice -I /usr/include/IceUtil -I %s -I %s %s -o %s",
- bjamout,
+ root / bjamout,
root / "..",
cpp, obj);
BOOST_TEST_CHECKPOINT("compile: " << compile);
@@ -65,7 +70,7 @@ BOOST_AUTO_TEST_CASE( slicer_test_ice )
const fs::path so = fs::change_extension(tmp / ("libslicer" + slice.filename().string()), ".so");
const std::string link = stringbf(
"g++ -shared -lIce -lIceUtil %s/lib%s.so %s -o %s",
- bjamout, base,
+ root / bjamout, base,
obj, so);
BOOST_TEST_CHECKPOINT("link: " << link);
system(link);