Lines Matching refs:path
85 # Now build action objects from expected data indexed by path.
90 if a.attrs["path"] in exp_actions:
91 raise RuntimeError(a.attrs["path"])
93 exp_actions[a.attrs["path"]] = a
108 exp = exp_actions[a.attrs["path"]]
140 add dir mode=0755 owner=root group=bin path=/bin
170 junk_repo = os.path.join(self.test_root, "junk-repo")
178 self.pkgsend(os.path.join(dfurl, "nochance"),
204 self.pkgsend(url, "add file bin/ls path=/bin/ls",
216 imaginary_file = os.path.join(self.test_root, "imaginary_file")
234 # Should fail because path attribute is missing.
241 "path=/tmp/dummy1", exit=1)
246 """mode="" path=/tmp/dummy1""", exit=1)
249 "mode=44755 path=/tmp/dummy1", exit=1)
252 "mode=44 path=/tmp/dummy1", exit=1)
255 """mode=???? path=/tmp/dummy1""", exit=1)
260 "mode=0644 path=/tmp/dummy1", exit=1)
265 """mode=0644 path=/tmp/dummy1""", exit=1)
270 "mode=0644 path=/tmp/dummy1", exit=1)
275 """mode=0644 path=/tmp/dummy1""", exit=1)
277 # Should fail because path attribute is missing a value.
279 "add file bin/ls path=", exit=1)
283 "add file {0} path=/bin/ls".format(imaginary_file), exit=1)
285 # Should fail because path=/bin/ls will be interpreted
288 "add file path=/bin/ls", exit=1)
296 "add unknown path=foo", exit=1)
354 rpath = os.path.join(self.test_root, "example_repo")
356 # ensure we fail when presented with a file://host/path/example_repo
364 if os.path.exists(rpath):
374 assert os.path.exists(os.path.join(rpath,
403 lpath = os.path.join(self.test_root, "test_8_foo")
406 # Next, publish it using both the real path and the linked path
411 add file {0} mode=0755 owner=root group=bin path=/tmp/f.foo
412 add file {1} mode=0755 owner=root group=bin path=/tmp/l.foo
413 close""".format(os.path.basename(fpath), os.path.basename(lpath)))
425 dir_1 = os.path.join(rootdir, "dir_1")
426 dir_2 = os.path.join(rootdir, "dir_2")
429 open(os.path.join(dir_1, "A"), "w").close()
430 open(os.path.join(dir_2, "B"), "w").close()
431 mfpath = os.path.join(rootdir, "manifest_test")
433 mf.write("""file NOHASH mode=0755 owner=root group=bin path=/A
434 file NOHASH mode=0755 owner=root group=bin path=/B
452 src_dir1 = os.path.join(rootdir, "foo")
453 src_dir2 = os.path.join(rootdir, "bar")
475 name = os.path.basename(src_dir)
478 top_file = os.path.join(src_dir, "file-{0}".format(name))
479 self.make_misc_files(os.path.relpath(top_file, src_dir),
484 os.symlink(os.path.basename(top_file), "link-{0}".format(name))
488 os.link(top_file, os.path.join(src_dir,
492 top_dir = os.path.join(src_dir, "dir-{0}".format(name))
496 top_dir_file = os.path.join(top_dir,
498 self.make_misc_files(os.path.relpath(top_dir_file,
503 os.symlink(os.path.relpath(top_file, top_dir),
509 os.symlink(os.path.basename(top_dir_file),
514 os.link(top_file, os.path.join(top_dir,
518 os.link(top_dir_file, os.path.join(top_dir,
522 sub_dir = os.path.join(top_dir, "subdir-{0}".format(name))
526 sub_dir_file = os.path.join(sub_dir,
528 self.make_misc_files(os.path.relpath(sub_dir_file,
533 dir group=bin mode=0755 owner=root path=dir-foo
534 file 4b5e791c627772d731d6c1623228a9c147a7dc3a chash=57ac66d45c0c4adb6d3626bd711c6f09f10fd286 group=bin mode=0644 owner=root path=file-foo
535 link path=link-foo target=file-foo
536 hardlink path=hardlink-foo target=file-foo
537 dir group=bin mode=0750 owner=root path=dir-foo/subdir-foo
538 file a10c7e788532fd2e7ee7eb9682733dd4e3fbe9de chash=aa3025ca5df3f9f6560db438b1b748d8155c9763 group=bin mode=0444 owner=root path=dir-foo/subfile-foo
539 link path=dir-foo/sublink-foo target=../file-foo
540 link path=dir-foo/subfilelink-foo target=subfile-foo
541 hardlink path=dir-foo/subhardlink-foo target=../file-foo
542 hardlink path=dir-foo/subfilehardlink-foo target=subfile-foo
543 file 7e810bfd0fddc15334ae8f8c5720417c19d26d65 chash=d4e6a65e17cad442857eea1885b909b09e96f40e group=bin mode=0400 owner=root path=dir-foo/subdir-foo/subdirfile-foo
544 dir group=bin mode=0755 owner=root path=dir-bar
545 file 994c33bbd9d77c3a54a1130d07f87f9d57c91d53 chash=98b4c123eefd676a472924e004dc293ddd44f73a group=bin mode=0644 owner=root path=file-bar
546 link path=link-bar target=file-bar
547 hardlink path=hardlink-bar target=file-bar
548 dir group=bin mode=0750 owner=root path=dir-bar/subdir-bar
549 file 1e4760226a169690da06b592e8eedb6d79c1b3a0 chash=71d14067e564c3c52261918788f353e99d249a87 group=bin mode=0444 owner=root path=dir-bar/subfile-bar
550 link path=dir-bar/sublink-bar target=../file-bar
551 link path=dir-bar/subfilelink-bar target=subfile-bar
552 hardlink path=dir-bar/subhardlink-bar target=../file-bar
553 hardlink path=dir-bar/subfilehardlink-bar target=subfile-bar
554 file 6a1ae3def902f5612a43f0c0836fe05bc4f237cf chash=be9c91959ec782acb0f081bf4bf16677cb09125e group=bin mode=0400 owner=root path=dir-bar/subdir-bar/subdirfile-bar"""
556 # Test with and without trailing slash on import path.
566 # Test with and without trailing slash on generate path.
573 non_existing_bundle = os.path.join(self.test_root,
600 # path name to
689 pkgroot = os.path.join(rootdir, "sysvpkg")
696 dirname = os.path.dirname(entry)
698 os.makedirs(os.path.join(pkgroot, dirname))
702 fpath = os.path.join(pkgroot, entry)
714 os.makedirs(os.path.join(pkgroot, entry), mode)
719 pkginfopath = os.path.join(pkgroot, "pkginfo")
724 prototypepath = os.path.join(pkgroot, "prototype")
752 mpath = os.path.join(self.test_root, "sysv.p5m")
777 spath = os.path.join(self.test_root, "nopkg")
781 rpath = os.path.join(self.test_root, "test11-repo")
803 spath = os.path.join(self.test_root, "nopkg")
808 rpath = os.path.join(self.test_root, "test11-genrepo")
825 os.path.join(self.test_root, "nopkg.pkg")),
829 spath = os.path.join(self.test_root, "nopkg")
834 rpath = os.path.join(self.test_root, "test12-genrepo")
848 name = os.path.join(self.img_path(), entry)
852 self.assertTrue(os.path.isfile(name))
854 self.assertTrue(os.path.isdir(name))
856 self.assertTrue(os.path.islink(name))
859 self.assertFalse(os.path.exists(name))
874 st = os.stat(os.path.join(self.img_path(), name))
896 self.pkgsend(dfurl, "add file {0} {1} path=/tmp/f.foo" \
917 self.pkgsend(dhurl, "add file {0} {1} path=/tmp/f.foo" \
939 add dir path=usr mode=0755 owner=root group=root
948 add dir path=usr mode=0755 owner=root group=root
956 add dir path=usr mode=0755 owner=root group=root
994 junk_repo = os.path.join(self.test_root, "obs-junkrepo")
1034 dir path=foo mode=0755 owner=root group=bin
1035 dir path=foo/bar mode=0755 owner=root group=bin
1039 fpath = os.path.join(self.test_root, "manifest")
1082 for path in test_files:
1083 manfpath = path + ".manifest"
1087 "path=/foo{1}".format(path, path)})
1092 manifests = " ".join([path + ".manifest" for path in test_files])
1098 for path in test_files:
1100 " grep {0}".format(path))
1131 self.pkgsend(url, "import {0}".format(os.path.join(rootdir, "nopkg")),
1135 self.pkgsend(url, "generate {0}".format(os.path.join(rootdir, "nopkg")),
1147 os.path.join(rootdir, "nopkg.pkg")), coverage=False)
1157 self.pkgsend(url, "import {0}".format(os.path.join(rootdir, "nopkg.pkg")),
1161 self.pkgsend(url, "generate {0}".format(os.path.join(rootdir,
1196 os.path.join(rootdir, "nopkg.pkg")), coverage=False)
1197 self.pkgsend(url, "generate {0}".format(os.path.join(rootdir,
1203 """Verify that a repository path with characters that must be
1207 rpath = os.path.join(self.test_root, name)
1245 dir_1 = os.path.join(rootdir, "dir_1")
1246 dir_2 = os.path.join(rootdir, "dir_2")
1249 open(os.path.join(dir_1, "A"), "w").close()
1250 open(os.path.join(dir_2, "B"), "w").close()
1251 mfpath = os.path.join(rootdir, "manifest_test")
1253 mf.write("""file NOHASH mode=0755 owner=root group=bin path=/A
1254 file NOHASH mode=0755 owner=root group=bin path=/B
1260 elfmfpath = os.path.join(self.test_root, "elftest.p5m")
1264 file elftest.so.1 mode=0755 owner=root group=bin path=bin/true
1283 dir_1 = os.path.join(rootdir, "dir_1")
1285 open(os.path.join(dir_1, "A"), "w").close()
1286 mfpath = os.path.join(rootdir, "manifest_test")
1288 mf.write("""file NOHASH mode=0755 owner=root group=bin path=/A
1300 mfpath = os.path.join(self.test_root, "foo.p5m")
1303 link payload-pathname path=/usr/bin/foo target=bar""")
1310 dir path=/usr/bin/foo target=bar hash=payload-pathname""")
1343 mfpath = os.path.join(self.test_root, "pkgsend_multihash.mf")
1349 file {0} path=/foo owner=root group=sys mode=0644 pkg.hash.rot13=caesar
1386 src_dir = os.path.join(rootdir, "foo")
1399 name = os.path.basename(src_dir)
1402 top_file = os.path.join(src_dir, "file-{0}".format(name))
1403 self.make_misc_files(os.path.relpath(top_file, src_dir),
1406 top_dir = os.path.join(src_dir, "dir-{0}".format(name))
1410 top_dir_file = os.path.join(top_dir,
1412 self.make_misc_files(os.path.relpath(top_dir_file,
1416 sub_dir = os.path.join(top_dir, "subdir-{0}".format(name))
1420 sub_dir_file = os.path.join(sub_dir,
1422 self.make_misc_files(os.path.relpath(sub_dir_file,
1430 os.chown(os.path.join(root,f), owner_id,
1439 dir group={group} mode=0755 owner={owner} path=dir-foo
1440 file file-foo group={group} mode=0644 owner={owner} path=file-foo
1441 dir group={group} mode=0750 owner={owner} path=dir-foo/subdir-foo
1442 file dir-foo/subfile-foo group={group} mode=0444 owner={owner} path=dir-foo/subfile-foo
1444 path=dir-foo/subdir-foo/subdirfile-foo\n""".format(
1454 mfpath = os.path.join(self.test_root, "content-attrs.p5m")
1458 file elftest.so.1 mode=0755 owner=root group=bin path=bin/true pkg.size=ignored pkg.csize=ignored elfhash=ignored elfbits=ignored elfarch=ignored pkg.content-hash=ignored
1482 'path': 'bin/true',
1504 rootdir = os.path.join(self.test_root, "bundletest")
1509 # Strip all attributes from file actions other than path
1514 "path": a.attrs["path"]
1535 dir = os.path.dirname(dir)
1551 expected_mf = "file {0} path={1}\n".format(target, target)
1557 lpath = os.path.join(rootdir, link)
1558 ldir = os.path.dirname(lpath)
1559 if not os.path.exists(ldir):
1562 expected_mf += "hardlink path={0} target={1}\n".format(
1563 link, os.path.relpath(tpath, ldir))
1565 dirs.update(dirlist(os.path.dirname(link)))
1568 dirs.update(dirlist(os.path.dirname(target)))
1571 expected_mf += "dir path={0}\n".format(d)
1638 self.verboten = os.path.join(self.test_root, "tmp/verboten")
1647 dir_1 = os.path.join(rootdir, "dir_1")
1649 open(os.path.join(dir_1, "A"), "w").close()
1650 open(os.path.join(dir_1, "B"), "w").close()
1651 mfpath = os.path.join(rootdir, "manifest_test")
1653 mf.write("""file NOHASH mode=0755 owner=root group=bin path=/A
1654 file NOHASH mode=0755 owner=root group=bin path=/B
1659 "cert": os.path.join(self.cs_dir, self.get_cli_cert("test")),
1660 "key": os.path.join(self.keys_dir, self.get_cli_key("test")),
1664 "empty": os.path.join(self.test_root, "tmp/empty"),
1665 "noexist": os.path.join(self.test_root, "octopus"),