Browse Source

Fixed output file path of tests.

Tatsuhiro Tsujikawa 14 years ago
parent
commit
a743bef220
2 changed files with 2 additions and 4 deletions
  1. 1 3
      test/FallocFileAllocationIteratorTest.cc
  2. 1 1
      test/UtilTest.cc

+ 1 - 3
test/FallocFileAllocationIteratorTest.cc

@@ -29,9 +29,7 @@ void FallocFileAllocationIteratorTest::testAllocate()
   // When fallocate is used, test fails if file system does not
   // support it. So skip it.
 #ifndef HAVE_FALLOCATE
-  std::string dir = "./";
-  std::string fname = "aria2_FallocFileAllocationIteratorTest_testAllocate";
-  std::string fn = dir+"/"+fname;
+  std::string fn = A2_TEST_OUT_DIR"/aria2_FallocFileAllocationIteratorTest_testAllocate";
   std::ofstream of(fn.c_str(), std::ios::binary);
   of << "0123456789";
   of.close();

+ 1 - 1
test/UtilTest.cc

@@ -649,7 +649,7 @@ void UtilTest::testAlphaToNum()
 
 void UtilTest::testMkdirs()
 {
-  std::string dir = "./aria2-UtilTest-testMkdirs";
+  std::string dir = A2_TEST_OUT_DIR"/aria2-UtilTest-testMkdirs";
   File d(dir);
   if(d.exists()) {
     CPPUNIT_ASSERT(d.remove());