summaryrefslogtreecommitdiff
path: root/test/test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-02-13 10:47:22 +0000
committerCarl Hetherington <cth@carlh.net>2018-02-13 10:47:22 +0000
commit8f8ffead78f16269f22b5b0354395d0a583873fa (patch)
tree62f1a714669e65779cb970bcf35789e3056766c5 /test/test.cc
parentec6b451c615134984688a2085d6c3f9fcfa870bc (diff)
Add some tolerance when checking audio references.
Diffstat (limited to 'test/test.cc')
-rw-r--r--test/test.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test.cc b/test/test.cc
index 551f64dbd..f829a86f6 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
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/compose.hpp"
+#include "test.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
-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);
}