mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-05 17:47:49 +08:00
fxing temp dir on windows
This commit is contained in:
@@ -17,18 +17,13 @@
|
||||
|
||||
#include <rtabmap/utilite/UConversion.h>
|
||||
#include <rtabmap/utilite/UFile.h>
|
||||
#include "TestUtils.h"
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#ifdef _WIN32
|
||||
#include <process.h>
|
||||
#define getpid _getpid
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
using namespace rtabmap;
|
||||
|
||||
@@ -49,8 +44,7 @@ namespace {
|
||||
// reloads fresh content on each TEST().
|
||||
std::string writeStubScript(int tag)
|
||||
{
|
||||
const std::string path = uFormat(
|
||||
"/tmp/rtabmap_test_pymatcher_%d_%d.py", getpid(), tag);
|
||||
const std::string path = test::tempPath(uFormat("rtabmap_test_pymatcher_%d_%d.py", test::getPid(), tag));
|
||||
std::ofstream out(path);
|
||||
out <<
|
||||
"import numpy as np\n"
|
||||
@@ -168,8 +162,7 @@ TEST(PyMatcher, AsymmetricCounts)
|
||||
// then short-circuits because pModule_ is null.
|
||||
TEST(PyMatcher, MissingPathReturnsEmpty)
|
||||
{
|
||||
const std::string scriptPath = uFormat(
|
||||
"/tmp/rtabmap_test_pymatcher_does_not_exist_%d.py", getpid());
|
||||
const std::string scriptPath = test::tempPath(uFormat("rtabmap_test_pymatcher_does_not_exist_%d.py", test::getPid()));
|
||||
PyMatcher matcher(scriptPath, 0.2f, 20, false, "indoor");
|
||||
|
||||
cv::Mat descFrom = makeDescriptors(2, 8);
|
||||
|
||||
Reference in New Issue
Block a user