mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 21:45:37 +00:00
[master] Use -c to copy when using install-sh
This commit is contained in:
@@ -195,9 +195,9 @@ zoneChecks(AuthSrv& server) {
|
||||
|
||||
void
|
||||
configureZones(AuthSrv& server) {
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " " TEST_DATA_DIR "/test1.zone.in "
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " -c " TEST_DATA_DIR "/test1.zone.in "
|
||||
TEST_DATA_BUILDDIR "/test1.zone.copied"));
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " " TEST_DATA_DIR "/test2.zone.in "
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " -c " TEST_DATA_DIR "/test2.zone.in "
|
||||
TEST_DATA_BUILDDIR "/test2.zone.copied"));
|
||||
configureAuthServer(server, Element::fromJSON(
|
||||
"{\"datasources\": "
|
||||
@@ -236,10 +236,10 @@ newZoneChecks(AuthSrv& server) {
|
||||
TEST_F(AuthCommandTest, loadZone) {
|
||||
configureZones(server_);
|
||||
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " " TEST_DATA_DIR
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " -c " TEST_DATA_DIR
|
||||
"/test1-new.zone.in "
|
||||
TEST_DATA_BUILDDIR "/test1.zone.copied"));
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " " TEST_DATA_DIR
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " -c " TEST_DATA_DIR
|
||||
"/test2-new.zone.in "
|
||||
TEST_DATA_BUILDDIR "/test2.zone.copied"));
|
||||
|
||||
@@ -376,7 +376,7 @@ TEST_F(AuthCommandTest,
|
||||
TEST_F(AuthCommandTest, loadBrokenZone) {
|
||||
configureZones(server_);
|
||||
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " " TEST_DATA_DIR
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " -c " TEST_DATA_DIR
|
||||
"/test1-broken.zone.in "
|
||||
TEST_DATA_BUILDDIR "/test1.zone.copied"));
|
||||
result_ = execAuthServerCommand(server_, "loadzone",
|
||||
@@ -390,7 +390,7 @@ TEST_F(AuthCommandTest, loadUnreadableZone) {
|
||||
configureZones(server_);
|
||||
|
||||
// install the zone file as unreadable
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " -m 000 " TEST_DATA_DIR
|
||||
ASSERT_EQ(0, system(INSTALL_PROG " -c -m 000 " TEST_DATA_DIR
|
||||
"/test1.zone.in "
|
||||
TEST_DATA_BUILDDIR "/test1.zone.copied"));
|
||||
result_ = execAuthServerCommand(server_, "loadzone",
|
||||
|
@@ -55,7 +55,7 @@ createSQLite3DB(RRClass zclass, const Name& zname,
|
||||
{
|
||||
// We always begin with an empty template SQLite3 DB file and install
|
||||
// the zone data from the zone file.
|
||||
const char* const install_cmd_prefix = INSTALL_PROG " " TEST_DATA_DIR
|
||||
const char* const install_cmd_prefix = INSTALL_PROG " -c " TEST_DATA_DIR
|
||||
"/rwtest.sqlite3 ";
|
||||
const string install_cmd = string(install_cmd_prefix) + db_file;
|
||||
if (system(install_cmd.c_str()) != 0) {
|
||||
|
@@ -1155,7 +1155,7 @@ public:
|
||||
// probably move this to some specialized templated method specific
|
||||
// to SQLite3 (or for even a longer term we should add an API to
|
||||
// purge the diffs table).
|
||||
const char* const install_cmd = INSTALL_PROG " " TEST_DATA_COMMONDIR
|
||||
const char* const install_cmd = INSTALL_PROG " -c " TEST_DATA_COMMONDIR
|
||||
"/rwtest.sqlite3 " TEST_DATA_BUILDDIR
|
||||
"/rwtest.sqlite3.copied";
|
||||
if (system(install_cmd) != 0) {
|
||||
|
@@ -764,7 +764,7 @@ protected:
|
||||
SQLite3Update() {
|
||||
// Note: if "installing" the test file fails some of the subsequent
|
||||
// tests would fail.
|
||||
const char *install_cmd = INSTALL_PROG " " TEST_DATA_DIR
|
||||
const char *install_cmd = INSTALL_PROG " -c " TEST_DATA_DIR
|
||||
"/test.sqlite3 " TEST_DATA_BUILDDIR
|
||||
"/test.sqlite3.copied";
|
||||
if (system(install_cmd) != 0) {
|
||||
|
@@ -67,7 +67,7 @@ createSQLite3Client(RRClass zclass, const Name& zname,
|
||||
// We always begin with an empty template SQLite3 DB file and install
|
||||
// the zone data from the zone file to ensure both cases have the
|
||||
// same test data.
|
||||
const char* const install_cmd_prefix = INSTALL_PROG " " TEST_DATA_COMMONDIR
|
||||
const char* const install_cmd_prefix = INSTALL_PROG " -c " TEST_DATA_COMMONDIR
|
||||
"/rwtest.sqlite3 ";
|
||||
const string install_cmd = string(install_cmd_prefix) + db_file;
|
||||
if (system(install_cmd.c_str()) != 0) {
|
||||
|
Reference in New Issue
Block a user