Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: src/platform/update_engine/test_utils.cc

Issue 891002: AU: Delta Diff Generator (Closed)
Patch Set: fixes for review Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "update_engine/test_utils.h" 5 #include "update_engine/test_utils.h"
6 #include <sys/stat.h> 6 #include <sys/stat.h>
7 #include <sys/types.h> 7 #include <sys/types.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 EXPECT_EQ(0, System(StringPrintf("echo hello > %s/hello", kMountPath))); 197 EXPECT_EQ(0, System(StringPrintf("echo hello > %s/hello", kMountPath)));
198 EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir", kMountPath))); 198 EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir", kMountPath)));
199 EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir/empty_dir", kMountPath))); 199 EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir/empty_dir", kMountPath)));
200 EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir/mnt", kMountPath))); 200 EXPECT_EQ(0, System(StringPrintf("mkdir %s/some_dir/mnt", kMountPath)));
201 EXPECT_EQ(0, System(StringPrintf("echo T > %s/some_dir/test", kMountPath))); 201 EXPECT_EQ(0, System(StringPrintf("echo T > %s/some_dir/test", kMountPath)));
202 EXPECT_EQ(0, System(StringPrintf("mkfifo %s/some_dir/fifo", kMountPath))); 202 EXPECT_EQ(0, System(StringPrintf("mkfifo %s/some_dir/fifo", kMountPath)));
203 EXPECT_EQ(0, System(StringPrintf("mknod %s/cdev c 2 3", kMountPath))); 203 EXPECT_EQ(0, System(StringPrintf("mknod %s/cdev c 2 3", kMountPath)));
204 EXPECT_EQ(0, System(StringPrintf("ln -s /some/target %s/sym", kMountPath))); 204 EXPECT_EQ(0, System(StringPrintf("ln -s /some/target %s/sym", kMountPath)));
205 EXPECT_EQ(0, System(StringPrintf("ln %s/some_dir/test %s/testlink", 205 EXPECT_EQ(0, System(StringPrintf("ln %s/some_dir/test %s/testlink",
206 kMountPath, kMountPath))); 206 kMountPath, kMountPath)));
207 EXPECT_EQ(0, System(StringPrintf("umount %s", kMountPath))); 207 EXPECT_EQ(0, System(StringPrintf("umount -d %s", kMountPath)));
208 208
209 if (out_paths) { 209 if (out_paths) {
210 out_paths->clear(); 210 out_paths->clear();
211 out_paths->push_back(""); 211 out_paths->push_back("");
212 out_paths->push_back("/hi"); 212 out_paths->push_back("/hi");
213 out_paths->push_back("/hello"); 213 out_paths->push_back("/hello");
214 out_paths->push_back("/some_dir"); 214 out_paths->push_back("/some_dir");
215 out_paths->push_back("/some_dir/empty_dir"); 215 out_paths->push_back("/some_dir/empty_dir");
216 out_paths->push_back("/some_dir/mnt"); 216 out_paths->push_back("/some_dir/mnt");
217 out_paths->push_back("/some_dir/test"); 217 out_paths->push_back("/some_dir/test");
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 EXPECT_TRUE(expected_paths.empty()); 263 EXPECT_TRUE(expected_paths.empty());
264 if (!expected_paths.empty()) { 264 if (!expected_paths.empty()) {
265 for (set<string>::const_iterator it = expected_paths.begin(); 265 for (set<string>::const_iterator it = expected_paths.begin();
266 it != expected_paths.end(); ++it) { 266 it != expected_paths.end(); ++it) {
267 LOG(INFO) << "extra path: " << *it; 267 LOG(INFO) << "extra path: " << *it;
268 } 268 }
269 } 269 }
270 } 270 }
271 271
272 } // namespace chromeos_update_engine 272 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « src/platform/update_engine/subprocess.cc ('k') | src/platform/update_engine/topological_sort.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698