/pkg/src/tests/api/ |
H A D | testutils.py | 10 # or http://www.opensolaris.org/os/licensing. 26 import os namespace 30 path_to_parent = os.path.join(os.path.dirname(__file__), "..")
|
H A D | t_smf.py | 10 # or http://www.opensolaris.org/os/licensing. 30 import os namespace 47 import os 63 with open(os.path.join(os.environ["PKG_TEST_DIR"], 64 os.environ["PKG_SVCPROP_OUTPUT"]), "r") as fh: 359 testdata_dir = os.path.join(self.test_root, "testdata") 360 svcadm_output = os.path.join(testdata_dir, 362 os.environ["PKG_TEST_DIR"] = testdata_dir 363 os [all...] |
H A D | t_file_manager.py | 10 # or http://www.opensolaris.org/os/licensing. 33 import os namespace 47 return os.path.join(s[0:2], s[2:8], s) 52 p = os.path.join(self.base_dir, self.old_hash(s)) 53 if not os.path.exists(os.path.dirname(p)): 54 os.makedirs(os.path.dirname(p)) 74 self.assertTrue(os.path.isfile(p)) 81 self.assertTrue(os [all...] |
H A D | t_plat.py | 10 # or http://www.opensolaris.org/os/licensing. 31 import os namespace 50 if os.name == 'posix' and os.getuid() == 0: 52 if os.name == 'posix' and os.getuid() != 0: 67 os.write(fd1, b"foo") 69 os.write(fd2, b"bar") 70 os.close(fd1) 71 os [all...] |
H A D | t_altroot.py | 10 # or http://www.opensolaris.org/os/licensing. 31 import os namespace 55 path = os.path.join(self.test_path, 67 self.p_d_f1 = os.path.join(self.p_d, "f1") 68 self.p_d_f2 = os.path.join(self.p_d, "f2") 69 self.p_d_none = os.path.join(self.p_d, "none") 73 self.p_d_f1_redir = os.path.join(self.p_d_redir, "f1") 74 self.p_d_f2_redir = os.path.join(self.p_d_redir, "f2") 75 self.p_d_none_redir = os.path.join(self.p_d_redir, "none") 84 os [all...] |
H A D | t_misc.py | 10 # or http://www.opensolaris.org/os/licensing. 33 import os namespace 50 os.chmod(tmpdir, stat.S_IRWXU) 51 fpath = os.path.join(tmpdir, "f") 52 fopath = os.path.join(fpath, "o") 53 foopath = os.path.join(fopath, "o") 61 assert(os.stat(tmpdir).st_mode & (stat.S_IREAD | stat.S_IWRITE) != 0) 62 assert(os.stat(fpath).st_mode & (stat.S_IREAD | stat.S_IWRITE) != 0) 63 assert(os.stat(fopath).st_mode & (stat.S_IREAD | stat.S_IWRITE) != 0) 64 assert(os [all...] |
H A D | t_indexer.py | 10 # or http://www.opensolaris.org/os/licensing. 34 import os namespace 46 os.mkdir(ind._tmp_dir) 48 ind._sort_fh = open(os.path.join(ind._tmp_dir, 90 for file in os.listdir(ind._tmp_dir): 91 fs = os.stat(os.path.join(ind._tmp_dir, file)) 102 self.assertTrue(os.stat(os.path.join(ind._tmp_dir , "sort.0")).st_size == 0) 107 for file in os [all...] |
H A D | t_pkgtarfile.py | 10 # or http://www.opensolaris.org/os/licensing. 34 import os namespace 48 filepath = os.path.join(cpath, "foo/bar") 50 create_path = os.path.join(filepath, filename) 51 os.makedirs(filepath) 53 buf = os.urandom(8192) 57 self.tarfile = os.path.join(self.tpath, "test.tar") 74 extractpath = os.path.join(self.tpath, "foo/bar") 75 os.makedirs(extractpath) 76 os [all...] |
/pkg/src/tests/cli/ |
H A D | testutils.py | 10 # or http://www.opensolaris.org/os/licensing. 26 import os namespace 30 path_to_parent = os.path.join(os.path.dirname(__file__), "..")
|
H A D | t_util_update_file_layout.py | 10 # or http://www.opensolaris.org/os/licensing. 33 import os namespace 48 self.base_dir = os.path.join(self.test_root, "fm") 49 os.mkdir(self.base_dir) 53 return os.path.join(s[0:2], s[2:8], s) 56 p = os.path.join(self.base_dir, self.old_hash(s)) 57 if not os.path.exists(os.path.dirname(p)): 58 os.makedirs(os [all...] |
H A D | t_origin_fw.py | 10 # or http://www.opensolaris.org/os/licensing. 29 import os namespace 42 import os 47 installed_version = os.environ.get("PKG_INSTALLED_VERSION", None) 48 devs_present = os.environ.get("PKG_NUM_FAKE_DEVICES", "1") 63 os.abort() 122 os.environ["PKG_INSTALLED_VERSION"] = "elf" 128 os.environ["PKG_INSTALLED_VERSION"] = "dwarf" 130 os.environ["PKG_INSTALLED_VERSION"] = "elf" 132 os [all...] |
H A D | t_actuators.py | 10 # or http://www.opensolaris.org/os/licensing. 29 import os namespace 241 self.testdata_dir = os.path.join(self.test_root, "testdata") 242 os.mkdir(self.testdata_dir) 307 os.environ["PKG_TEST_DIR"] = self.testdata_dir 308 os.environ["PKG_SVCADM_EXIT_CODE"] = "0" 309 os.environ["PKG_SVCPROP_EXIT_CODE"] = "0" 311 svcadm_output = os.path.join(self.testdata_dir, 315 os.environ["PKG_SVCPROP_OUTPUT"] = "svcprop_enabled" 327 os [all...] |
H A D | t_pkg_R_option.py | 10 # or http://www.opensolaris.org/os/licensing. 30 import os namespace 95 del os.environ["PKG_IMAGE"] 96 os.chdir(self.img_path()) 97 self.assertEqual(os.getcwd(), self.img_path()) 112 bad_live_root = os.path.join(self.test_root, "test_2_implicit") 113 os.mkdir(bad_live_root) 119 os.chdir(self.test_root) 126 os.environ["PKG_FIND_IMAGE"] = "true" 127 os [all...] |
/pkg/src/tests/testsuite/ |
H A D | testutils.py | 10 # or http://www.opensolaris.org/os/licensing. 26 import os namespace 30 path_to_parent = os.path.join(os.path.dirname(__file__), "..")
|
/pkg/src/tests/ |
H A D | pkg5testenv.py | 10 # or http://www.opensolaris.org/os/licensing. 26 import os namespace 73 cmddir, cmdname = os.path.split(sys.argv[0]) 74 cmddir = os.path.realpath(cmddir) 76 if "ROOT" in os.environ: 77 pkg_path = os.environ["ROOT"] 88 pkg_path = os.path.realpath(pkg_path) 89 proto_area = os.path.realpath(proto_area) 91 pkgs = os.path.join(pkg_path, "usr/lib/python{0}/vendor-packages".format( 93 bins = os [all...] |
/pkg/src/modules/ |
H A D | altroot.py | 10 # or http://www.opensolaris.org/os/licensing. 38 import os namespace 51 """Strip the leading '/' from a path using os.path.split().""" 55 (path, tail) = os.path.split(path) 59 path_new = os.path.join(tail, path_new) 67 path = "/proc/{0:d}/path/{1:d}".format(os.getpid(), fd) 68 return os.readlink(path) 75 """A function similar to os.open() that ensures that the path 93 assert os.path.isabs(root) 96 assert (flags & ~(os [all...] |
H A D | pkgtarfile.py | 10 # or http://www.opensolaris.org/os/licensing. 27 import os namespace 71 os.path.join(path, tarinfo.linkname) 77 upperdirs = os.path.dirname(os.path.join(path, filename)) 79 if upperdirs and not os.path.exists(upperdirs): 90 os.makedirs(upperdirs, stat.S_IRWXU) 94 self._extract_member(tarinfo, os.path.join(
|
/pkg/src/modules/portable/ |
H A D | util.py | 10 # or http://www.opensolaris.org/os/licensing. 25 import os namespace 33 if os.name == 'posix': 35 elif os.name == 'mac': 38 elif os.name == 'nt': 75 release = os.uname()[2] 77 # Windows has no os.uname, and platform.release
|
H A D | os_aix.py | 10 # or http://www.opensolaris.org/os/licensing. 30 import os namespace 43 return os.chown(path, owner, group) 46 return os.chown(path, -1, group)
|
H A D | os_windows.py | 10 # or http://www.opensolaris.org/os/licensing. 37 import os namespace 160 img = image.Image(os.path.dirname(path), 165 trashdir = os.path.join(img.imgdir, trashname) 183 if not os.path.exists(trashdir): 184 os.mkdir(trashdir) 188 os.rename(path, os.path.join(tdir, os.path.basename(path))) 195 os [all...] |
/pkg/src/modules/actions/ |
H A D | hardlink.py | 10 # or http://www.opensolaris.org/os/licensing. 34 import os namespace 54 # both need to be passed through os.path.normpath to ensure 59 target = os.path.normpath( 60 os.path.join(os.path.split(path)[0], target)) 62 target = os.path.normpath(target)[1:] 75 if not os.path.exists(os.path.dirname(path)): 76 self.makedirs(os [all...] |
H A D | legacy.py | 10 # or http://www.opensolaris.org/os/licensing. 34 import os namespace 56 return [os.path.normpath(os.path.join("var/sadm/pkg", 64 pkgdir = os.path.join(pkgplan.image.get_root(), "var/sadm/pkg", 67 if not os.path.isdir(pkgdir): 68 os.makedirs(pkgdir, misc.PKG_DIR_MODE) 70 pkginfo = os.path.join(pkgdir, "pkginfo") 115 open(os.path.join(pkgplan.image.get_root(), 121 os [all...] |
/pkg/src/modules/file_layout/ |
H A D | layout.py | 10 # or http://www.opensolaris.org/os/licensing. 61 import os namespace 87 return os.path.join(hashval[0:2], hashval[2:8], hashval) 91 return os.path.basename(path) 100 return os.path.join(hashval[0:2], hashval) 104 return os.path.basename(path)
|
/pkg/src/modules/flavor/ |
H A D | hardlink.py | 10 # or http://www.opensolaris.org/os/licensing. 27 import os namespace 35 base_names = [os.path.basename(path)] 36 paths = [os.path.dirname(path)]
|
/pkg/src/ |
H A D | setup.py | 10 # or http://www.opensolaris.org/os/licensing. 28 import os namespace 82 pwd = os.path.normpath(sys.path[0]) 93 sys.stdout = os.fdopen(sys.stdout.fileno(), "w", 0) 94 sys.stderr = os.fdopen(sys.stderr.fileno(), "w", 0) 96 dist_dir = os.path.normpath(os.path.join(pwd, os.pardir, "proto", "dist_" + arch)) 97 build_dir = os.path.normpath(os [all...] |