[nemiver] Refer to the 'tests" sub-directory explicitly



commit 476f01040a528dba7e41a7bdb6604b37028b3957
Author: Dodji Seketeli <dodji seketeli org>
Date:   Tue Nov 22 10:37:02 2016 +0100

    Refer to the 'tests" sub-directory explicitly
    
    In the test-libtool-wrapper-detection.cc, we assume that the tests are
    run from within the "tests" sub-directory of the build directory.
    That is, the current directory should be $builddir/tests when the
    tests are run.
    
    This is wrong because invoking that test from anywhere should work by
    doing:
    
        make -C <builddir> check TESTS=runtestlibtoolwrapperdetection
    
    So to this this, I am changing the code of the tests to provide an
    absolute path to the "tests" directory.
    
        * tests/test-libtool-wrapper-detection.cc (test0)
        (test_filename_with_dashes): Refer to the "tests" sub-directory
        (of either the source directory or the build directory)
        explicitly.
    
    Signed-off-by: Dodji Seketeli <dodji seketeli org>

 tests/test-libtool-wrapper-detection.cc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tests/test-libtool-wrapper-detection.cc b/tests/test-libtool-wrapper-detection.cc
index 5c8b507..90628bc 100644
--- a/tests/test-libtool-wrapper-detection.cc
+++ b/tests/test-libtool-wrapper-detection.cc
@@ -18,6 +18,7 @@ BOOST_AUTO_TEST_CASE (test0)
 {
     vector<string> path_elems;
     path_elems.push_back (NEMIVER_BUILDDIR);
+    path_elems.push_back ("tests");
     path_elems.push_back ("runtestcore");
     string path = Glib::build_filename (path_elems);
     BOOST_REQUIRE (Glib::file_test (path, Glib::FILE_TEST_EXISTS));
@@ -28,6 +29,7 @@ BOOST_AUTO_TEST_CASE (test_filename_with_dashes)
 {
     vector<string> path_elems;
     path_elems.push_back (NEMIVER_SRCDIR);
+    path_elems.push_back ("tests");
     path_elems.push_back ("libtool-wrapper-with-dashes");
     string path = Glib::build_filename (path_elems);
     std::cout << "path: '" << path << "'" << std::endl;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]