2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[master] Use -c to copy when using install-sh

This commit is contained in:
Mukund Sivaraman
2012-05-07 18:54:45 +05:30
parent 6567d28ea9
commit 84ce6a7875
5 changed files with 10 additions and 10 deletions

View File

@@ -195,9 +195,9 @@ zoneChecks(AuthSrv& server) {
void void
configureZones(AuthSrv& server) { 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")); 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")); TEST_DATA_BUILDDIR "/test2.zone.copied"));
configureAuthServer(server, Element::fromJSON( configureAuthServer(server, Element::fromJSON(
"{\"datasources\": " "{\"datasources\": "
@@ -236,10 +236,10 @@ newZoneChecks(AuthSrv& server) {
TEST_F(AuthCommandTest, loadZone) { TEST_F(AuthCommandTest, loadZone) {
configureZones(server_); 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 " "/test1-new.zone.in "
TEST_DATA_BUILDDIR "/test1.zone.copied")); 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 " "/test2-new.zone.in "
TEST_DATA_BUILDDIR "/test2.zone.copied")); TEST_DATA_BUILDDIR "/test2.zone.copied"));
@@ -376,7 +376,7 @@ TEST_F(AuthCommandTest,
TEST_F(AuthCommandTest, loadBrokenZone) { TEST_F(AuthCommandTest, loadBrokenZone) {
configureZones(server_); 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 " "/test1-broken.zone.in "
TEST_DATA_BUILDDIR "/test1.zone.copied")); TEST_DATA_BUILDDIR "/test1.zone.copied"));
result_ = execAuthServerCommand(server_, "loadzone", result_ = execAuthServerCommand(server_, "loadzone",
@@ -390,7 +390,7 @@ TEST_F(AuthCommandTest, loadUnreadableZone) {
configureZones(server_); configureZones(server_);
// install the zone file as unreadable // 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 " "/test1.zone.in "
TEST_DATA_BUILDDIR "/test1.zone.copied")); TEST_DATA_BUILDDIR "/test1.zone.copied"));
result_ = execAuthServerCommand(server_, "loadzone", result_ = execAuthServerCommand(server_, "loadzone",

View File

@@ -55,7 +55,7 @@ createSQLite3DB(RRClass zclass, const Name& zname,
{ {
// We always begin with an empty template SQLite3 DB file and install // We always begin with an empty template SQLite3 DB file and install
// the zone data from the zone file. // 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 "; "/rwtest.sqlite3 ";
const string install_cmd = string(install_cmd_prefix) + db_file; const string install_cmd = string(install_cmd_prefix) + db_file;
if (system(install_cmd.c_str()) != 0) { if (system(install_cmd.c_str()) != 0) {

View File

@@ -1155,7 +1155,7 @@ public:
// probably move this to some specialized templated method specific // probably move this to some specialized templated method specific
// to SQLite3 (or for even a longer term we should add an API to // to SQLite3 (or for even a longer term we should add an API to
// purge the diffs table). // 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 " TEST_DATA_BUILDDIR
"/rwtest.sqlite3.copied"; "/rwtest.sqlite3.copied";
if (system(install_cmd) != 0) { if (system(install_cmd) != 0) {

View File

@@ -764,7 +764,7 @@ protected:
SQLite3Update() { SQLite3Update() {
// Note: if "installing" the test file fails some of the subsequent // Note: if "installing" the test file fails some of the subsequent
// tests would fail. // 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 " TEST_DATA_BUILDDIR
"/test.sqlite3.copied"; "/test.sqlite3.copied";
if (system(install_cmd) != 0) { if (system(install_cmd) != 0) {

View File

@@ -67,7 +67,7 @@ createSQLite3Client(RRClass zclass, const Name& zname,
// We always begin with an empty template SQLite3 DB file and install // 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 // the zone data from the zone file to ensure both cases have the
// same test data. // 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 "; "/rwtest.sqlite3 ";
const string install_cmd = string(install_cmd_prefix) + db_file; const string install_cmd = string(install_cmd_prefix) + db_file;
if (system(install_cmd.c_str()) != 0) { if (system(install_cmd.c_str()) != 0) {