projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some tolerance when checking audio references.
[dcpomatic.git]
/
test
/
test.cc
diff --git
a/test/test.cc
b/test/test.cc
index 551f64dbde9bd74755e6672a6af4ce7724922cb7..f829a86f6892b5c441ba130b8e91ad6aedd08a2c 100644
(file)
--- a/
test/test.cc
+++ b/
test/test.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2012-201
7
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-201
8
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-34,6
+34,8
@@
#include "lib/ratio.h"
#include "lib/dcp_content_type.h"
#include "lib/log_entry.h"
#include "lib/ratio.h"
#include "lib/dcp_content_type.h"
#include "lib/log_entry.h"
+#include "lib/compose.hpp"
+#include "test.h"
#include <dcp/dcp.h>
#include <dcp/cpl.h>
#include <dcp/reel.h>
#include <dcp/dcp.h>
#include <dcp/cpl.h>
#include <dcp/reel.h>
@@
-436,9
+438,9
@@
write_image (shared_ptr<const Image> image, boost::filesystem::path file, string
}
void
}
void
-check_ffmpeg (boost::filesystem::path ref, boost::filesystem::path check)
+check_ffmpeg (boost::filesystem::path ref, boost::filesystem::path check
, int audio_tolerance
)
{
{
- int const r = system (
string("ffcmp " + ref.string() + " " +
check.string()).c_str());
+ int const r = system (
String::compose("ffcmp -t %1 %2 %3", audio_tolerance, ref.string(),
check.string()).c_str());
BOOST_REQUIRE_EQUAL (WEXITSTATUS(r), 0);
}
BOOST_REQUIRE_EQUAL (WEXITSTATUS(r), 0);
}